Inference for Quantitative Variables 3/12/12 Single Mean, µ t-distribution Intervals and tests Difference in means, µ 1 – µ 2 Distribution Matched pairs.

Slides:



Advertisements
Similar presentations
Testing a Claim about a Proportion Assumptions 1.The sample was a simple random sample 2.The conditions for a binomial distribution are satisfied 3.Both.
Advertisements

Hypothesis Testing I 2/8/12 More on bootstrapping Random chance
Confidence Intervals Chapter 10. Rate your confidence Name my age within 10 years? 0 within 5 years? 0 within 1 year? 0 Shooting a basketball.
Statistics: Unlocking the Power of Data Lock 5 Inference Using Formulas STAT 101 Dr. Kari Lock Morgan Chapter 6 t-distribution Formulas for standard errors.
© 2013 Pearson Education, Inc. Active Learning Lecture Slides For use with Classroom Response Systems Introductory Statistics: Exploring the World through.
Statistics: Unlocking the Power of Data Lock 5 STAT 101 Dr. Kari Lock Morgan 10/25/12 Sections , Single Mean t-distribution (6.4) Intervals.
Copyright ©2011 Brooks/Cole, Cengage Learning Testing Hypotheses about Means Chapter 13.
Copyright ©2011 Brooks/Cole, Cengage Learning Testing Hypotheses about Means Chapter 13.
Significance Testing Chapter 13 Victor Katch Kinesiology.
Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. More About Significance Tests Chapter 13.
Hypothesis Testing Using a Single Sample
PSY 307 – Statistics for the Behavioral Sciences
Slide Copyright © 2009 Pearson Education, Inc. Active Learning Lecture Slides For use with Classroom Response Systems Intro Stats Third Edition.
Chapter 11: Inference for Distributions
Hypothesis Testing Using The One-Sample t-Test
Getting Started with Hypothesis Testing The Single Sample.
Quantitative Business Methods for Decision Making Estimation and Testing of Hypotheses.
Simple Linear Regression Least squares line Interpreting coefficients Prediction Cautions The formal model Section 2.6, 9.1, 9.2 Professor Kari Lock Morgan.
Inference for Categorical Variables 2/29/12 Single Proportion, p Distribution Intervals and tests Difference in proportions, p 1 – p 2 One proportion or.
AM Recitation 2/10/11.
Overview Definition Hypothesis
Inference for One-Sample Means
Normal Distribution Chapter 5 Normal distribution
Copyright © 2010 Pearson Education, Inc. Chapter 23 Inference About Means.
Copyright © 2009 Pearson Education, Inc. Chapter 23 Inferences About Means.
Slide 23-1 Copyright © 2004 Pearson Education, Inc.
Lesson Comparing Two Means.
Sullivan – Fundamentals of Statistics – 2 nd Edition – Chapter 11 Section 2 – Slide 1 of 25 Chapter 11 Section 2 Inference about Two Means: Independent.
Inference for Means (C23-C25 BVD). * Unless the standard deviation of a population is known, a normal model is not appropriate for inference about means.
Student’s t-distributions. Student’s t-Model: Family of distributions similar to the Normal model but changes based on degrees-of- freedom. Degrees-of-freedom.
Chapter 11 Inference for Distributions AP Statistics 11.1 – Inference for the Mean of a Population.
CHAPTER 18: Inference about a Population Mean
Statistics: Unlocking the Power of Data Lock 5 Normal Distribution STAT 101 Dr. Kari Lock Morgan 10/18/12 Chapter 5 Normal distribution Central limit theorem.
Statistics: Unlocking the Power of Data Lock 5 STAT 250 Dr. Kari Lock Morgan Simple Linear Regression SECTION 9.1 Inference for correlation Inference for.
AP Statistics Chapter 23 Notes
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide
Chapter 23 Inference for One- Sample Means. Steps for doing a confidence interval: 1)State the parameter 2)Conditions 1) The sample should be chosen randomly.
Section 8-5 Testing a Claim about a Mean: σ Not Known.
Essential Statistics Chapter 161 Inference about a Population Mean.
Lesson Comparing Two Means. Knowledge Objectives Describe the three conditions necessary for doing inference involving two population means. Clarify.
AP Statistics Chapter 24 Comparing Means.
Statistics: Unlocking the Power of Data Lock 5 Exam 2 Review STAT 101 Dr. Kari Lock Morgan 11/13/12 Review of Chapters 5-9.
Chapter 12 Confidence Intervals and Hypothesis Tests for Means © 2010 Pearson Education 1.
Inferring the Mean and Standard Deviation of a Population.
Statistics: Unlocking the Power of Data Lock 5 Inference for Means STAT 250 Dr. Kari Lock Morgan Sections 6.4, 6.5, 6.6, 6.10, 6.11, 6.12, 6.13 t-distribution.
AP Statistics.  If our data comes from a simple random sample (SRS) and the sample size is sufficiently large, then we know that the sampling distribution.
Statistics: Unlocking the Power of Data Lock 5 Section 6.4 Distribution of a Sample Mean.
Statistics: Unlocking the Power of Data Lock 5 Inference for Means STAT 250 Dr. Kari Lock Morgan Sections 6.4, 6.5, 6.6, 6.10, 6.11, 6.12, 6.13 t-distribution.
© 2010 Pearson Prentice Hall. All rights reserved Chapter Hypothesis Tests Regarding a Parameter 10.
Inference About Means Chapter 23. Getting Started Now that we know how to create confidence intervals and test hypotheses about proportions, it’d be nice.
Synthesis and Review 2/20/12 Hypothesis Tests: the big picture Randomization distributions Connecting intervals and tests Review of major topics Open Q+A.
6.3 One- and Two- Sample Inferences for Means. If σ is unknown Estimate σ by sample standard deviation s The estimated standard error of the mean will.
Statistics: Unlocking the Power of Data Lock 5 Section 6.12 Test for a Difference in Means.
10.2 Comparing Two Means Objectives SWBAT: DESCRIBE the shape, center, and spread of the sampling distribution of the difference of two sample means. DETERMINE.
Statistics: Unlocking the Power of Data Lock 5 STAT 250 Dr. Kari Lock Morgan Simple Linear Regression SECTION 9.1 Inference for correlation Inference for.
Objectives (PSLS Chapter 18) Comparing two means (σ unknown)  Two-sample situations  t-distribution for two independent samples  Two-sample t test 
AP Statistics Chapter 24 Comparing Means. Objectives: Two-sample t methods Two-Sample t Interval for the Difference Between Means Two-Sample t Test for.
16/23/2016Inference about µ1 Chapter 17 Inference about a Population Mean.
Copyright © 2013, 2010 and 2007 Pearson Education, Inc. Chapter Hypothesis Tests Regarding a Parameter 10.
Statistics: Unlocking the Power of Data Lock 5 Section 6.6 Test for a Single Mean.
Chapter 9 Roadmap Where are we going?.
Distribution of a Difference in Means
Paired Difference in Means
Elementary Statistics
Elementary Statistics
Lesson Comparing Two Means.
Chapter 22 Inference About Means.
Chapter 23 Inference About Means.
Presentation transcript:

Inference for Quantitative Variables 3/12/12 Single Mean, µ t-distribution Intervals and tests Difference in means, µ 1 – µ 2 Distribution Matched pairs Correlation,  Distribution Section 6.4, 6.5, 6.6, 6.10, 6.11, 6.12, 6.13 Professor Kari Lock Morgan Duke University

Homework 6 (due Monday, 3/19) Homework 6 Project 1 (due Thursday, 3/22) Project 1 To Do

If the distribution of the sample statistic is normal: A confidence interval can be calculated by where z * is a N(0,1) percentile depending on the level of confidence. A p-value is the area in the tail(s) of a N(0,1) beyond Inference Using N(0,1)

CLT for a Mean Population Distribution of Sample Data Distribution of Sample Means n = 10 n = 30 n = 50

The standard error for a sample mean can be calculated by SE of a Mean

The standard deviation of the population is a)  b) s c) Standard Deviation

The standard deviation of the sample is a)  b) s c) Standard Deviation

The standard deviation of the sample mean is a)  b) s c) Standard Deviation

If n ≥ 30*, then CLT for a Mean *Smaller sample sizes may be sufficient for symmetric distributions, and 30 may not be sufficient for very skewed distributions or distributions with high outliers

We don’t know the population standard deviation , so estimate it with the sample standard deviation, s Standard Error

Replacing  with s changes the distribution of the z-statistic from normal to t The t distribution is very similar to the standard normal, but with slightly fatter tails to reflect this added uncertainty t-distribution

The t-distribution is characterized by its degrees of freedom (df) Degrees of freedom are calculated based on the sample size The higher the degrees of freedom, the closer the t-distribution is to the standard normal Degrees of Freedom

t-distribution

Aside: William Sealy Gosset

t-distribution To calculate area in the tail(s), or to find percentiles of a t-distribution, use

Normality Assumption Using the t-distribution requires an extra assumption: the data comes from a normal distribution Note: this assumption is about the original data, not the distribution of the statistic For large sample sizes we do not need to worry about this, because s will be a very good estimate of , and t will be very close to N(0,1) For small sample sizes (n < 30), we can only use the t-distribution if the distribution of the data is approximately normal

Normality Assumption One small problem: for small sample sizes, it is very hard to tell if the data actually comes from a normal distribution! Population Sample Data, n = 10

Small Samples If sample sizes are small, only use the t-distribution if the data looks reasonably symmetric and does not have any extreme outliers. Even then, remember that it is just an approximation! In practice/life, if sample sizes are small, you should just use simulation methods (bootstrapping and randomization)

Confidence Intervals df = n – 1 IF n is large or the data is normal t * is found as the appropriate percentile on a t- distribution with n – 1 degrees of freedom

Hypothesis Testing The p-value is the area in the tail(s) beyond t in a t-distribution with n – 1 degrees of freedom, IF n is large or the data is normal df = n – 1

Chips Ahoy! ? A group of Air Force cadets bought bags of Chips Ahoy! cookies from all over the country to verify this claim. They hand counted the number of chips in 42 bags. Source: Warner, B. & Rutledge, J. (1999). “Checking the Chips Ahoy! Guarantee,” Chance, 12(1).

Chips Ahoy! Can we use hypothesis testing to prove that there are 1000 chips in every bag? (“prove” = find statistically significant) (a) Yes (b) No

Chips Ahoy! Can we use hypothesis testing to prove that the average number of chips per bag is 1000? (“prove” = find statistically significant) (a) Yes (b) No

Chips Ahoy! Can we use hypothesis testing to prove that the average number of chips per bag is more than 1000? (“prove” = find statistically significant) (a) Yes (b) No

Chips Ahoy! ? 1)Are there more than 1000 chips in each bag, on average? (a) Yes (b) No (c) Cannot tell from this data 2)Give a 99% confidence interval for the average number of chips in each bag.

Chips Ahoy! > pt(14.4, df=41, lower.tail=FALSE) [1] e-18 This provides extremely strong evidence that the average number of chips per bag of Chips Ahoy! cookies is significantly greater than State hypotheses: 2. Check conditions: 3. Calculate test statistic: 4. Compute p-value: 4. Interpret in context:

Chips Ahoy! We are 99% confident that the average number of chips per bag of Chips Ahoy! cookies is between and chips. 1. Check conditions: 2. Find t*: 4. Compute confidence interval: 4. Interpret in context:

t-distribution Which of the following properties is/are necessary for to have a t-distribution? a)the data is normal b)the sample size is large c)the null hypothesis is true d)a or b e)d and c

SE for Difference in Means df = smaller of n 1 – 1 and n 2 – 1

CLT for Difference in Means *Smaller sample sizes may be sufficient for symmetric distributions, and 30 may not be sufficient for skewed distributions

t-distribution For a difference in means, the degrees of freedom for the t-distribution is the smaller of n 1 – 1 and n 2 – 1 The test for a difference in means using a t-distribution is commonly called a t-test

The Pygmalion Effect Source: Rosenthal, R. and Jacobsen, L. (1968). “Pygmalion in the Classroom: Teacher Expectation and Pupils’ Intellectual Development.” Holt, Rinehart and Winston, Inc. Teachers were told that certain children (chosen randomly) were expected to be “growth spurters,” based on the Harvard Test of Inflected Acquisition (a test that didn’t actually exist). These children were selected randomly. The response variable is change in IQ over the course of one year.

The Pygmalion Effect ns Control Students “Growth Spurters” Does this provide evidence that merely expecting a child to do well actually causes the child to do better? (a) Yes (b) No If so, how much better? *s 1 and s 2 were not given, so I set them to give the correct p-value

Pygmalion Effect We have evidence that positive teacher expectations significantly increase IQ scores in elementary school children. 1. State hypotheses: 2. Check conditions: 3. Calculate t statistic: 4. Compute p-value: 5. Interpret in context:

Pygmalion Effect From the paper: “The difference in gains could be ascribed to chance about 2 in 100 times”

Pygmalion Effect We are 95% confident that telling teachers a student will be an intellectual “growth spurter” increases IQ scores by between 0.17 and 7.43 points on average, after 1 year. 1. Check conditions: 2. Find t * : 3. Compute the confidence interval: 4. Interpret in context:

A matched pairs experiment compares units to themselves or another similar unit, rather than just compare group averages Data is paired (two measurements on one unit, twin studies, etc.). Look at the difference in responses for each pair Matched Pairs

Do pheromones (subconscious chemical signals) in female tears affect testosterone levels in men? Cotton pads had either real female tears or a salt solution that had been dripped down the same female’s face 50 men had a pad attached to their upper lip twice, once with tears and once without, order randomized. Response variable: testosterone level Pheromones in Tears Gelstein, et. al. (2011) “Human Tears Contain a Chemosignal," Science, 1/6/11.

Why do a matched pairs experiment? a)Decrease the standard deviation of the response b)Increase the power of the test c)Decrease the margin of error for intervals d)All of the above e)None of the above Matched Pairs

Matched pairs experiments are particularly useful when responses vary a lot from unit to unit We can decrease standard deviation of the response (and so decrease standard error of the statistic) by comparing each unit to a matched unit Matched Pairs

For a matched pairs experiment, we look at the difference between responses for each unit, rather than just the average difference between treatment groups Get a new variable of the differences, and do inference for the difference as you would for a single mean Matched Pairs

The average difference in testosterone levels between tears and no tears was pg/ml. The standard deviation of these differences was 46.5 Average level before sniffing was 155 pg/ml. The sample size was 50 men Pheromones in Tears “pg” = picogram = nanogram = gram Do female tears lower male testosterone levels? (a) Yes(b) No(c) ??? By how much? Give a 95% confidence interval.

Pheromones in Tears This provides strong evidence that female tears decrease testosterone levels in men, on average. 1. State hypotheses: 2. Check conditions: 3. Calculate test statistic: 4. Compute p-value: 5. Interpret in context: > pt(-3.3, df=49, lower.tail=TRUE) [1]

Pheromones in Tears We are 95% confident that female tears on a cotton pad on a man’s upper lip decrease testosterone levels between 8.54 and pg/ml, on average. 1. Check conditions: 2. Find t * : 3. Compute the confidence interval: 4. Interpret in context: > qt(0.975 df=49) [1]

Correlation df = n - 2 t-distribution

Social Networks and the Brain Is the size of certain regions of your brain correlated with the size of your social network? Social network size measured by many different variables, one of which was number of facebook friends. Brain size measured by MRI. The sample correlation between number of Facebook friends and grey matter density of a certain region of the brain (left middle temporal gyrus), based on 125 people, is r = Is this significant? (a) Yes (b) No Source: R. Kanai, B. Bahrami, R. Roylance and G. Ree (2011). “Online social network size is reflected in human brain structure,” Proceedings of the Royal Society B: Biological Sciences. 10/19/11.

Social Networks and the Brain This provides strong evidence that the size of the left middle temporal gyrus and number of facebook friends are positively correlated. 1. State hypotheses: 2. Check conditions: 3. Calculate test statistic: 4. Compute p-value: 5. Interpret in context: > pt(4.2, df=123,lower.tail=FALSE) [1] e-05

ParameterDistributionConditionsStandard Error Proportion Normal All counts at least 10 np ≥ 10, n(1 – p) ≥ 10 Difference in Proportions Normal All counts at least 10 n 1 p 1 ≥ 10, n 1 (1 – p 1 ) ≥ 10, n 2 p 2 ≥ 10, n 2 (1 – p 2 ) ≥ 10 Meant, df = n – 1n ≥ 30 or data normal Difference in Means t, df = smaller of n 1 – 1, n 2 – 1 n 1 ≥ 30 or data normal, n 2 ≥ 30 or data normal Paired Diff. in Means t, df = n d – 1n d ≥ 30 or data normal Correlation t, df = n – 2n ≥ 30 pg 454