Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Chapter 9. Inferences from Two Samples Chapter Problem: Is the “Freshman 15” real, or is it a myth? 1. Popular belief: college students gain 15 lb during freshmen year 2. Journal of American College Health, Vol.55, No.1. 3. Data set 3 in Appendix B (weights in kg, 15 lb = 6.8 kg) 4. Two weight for each of 67 students (obtained in Sept. and Apr.) 5. Use weight change: April weight – September weight 6. The published paper has some limitations: i. ii. All subjects volunteered for the study All the subjects were attending Rutgers 7. The “Freshmen 15” constitutes a Claim made about the population of college students 8. Let d denote the mean of “April weight – September weight” 9. H0: d = 15 1 9-1 Review and Preview 1. Chapter 7: Construction CI 2. Chapter 8: methods of testing claims made about population 3. This Chapter: i. ii. Extend the methods for estimating values of population parameters Extend the methods for testing hypotheses to situations involving two sets of sample data instead of one. 4. Methods for using sample data from two populations so that inferences can be made about those populations Test that H0: d = 15 Test the claim that the proportion of children who contract polio is less for children given the Silk Vaccine than for children given placebo iii. Test the claim that subjects treated with Lipitor have a mean cholesterol level that is lower than the mean cholesterol level for subjects given a placebo i. ii. 2 9-2 Inference About Two Populations 1. Testing a claim made about the two population proportions 2. Constructing a CI estimating the difference between the two population proportions (can be also applied to claims about probabilities, percentages) 3 9-2 Inference About Two Populations 1. Testing a claim made about the two population proportions Objective: Test a claim about two population proportions or construct a CI of the difference between two population proportions. Notation: p1 = population proportion for population 1 n1 = sample size for population 1 x1 = number of success in the sample for population 1 x pˆ 1 1 n1 qˆ1 1 pˆ1 (similar for population 2, change index from 1 to 2) 4 9-2 Inference About Two Populations 1. Testing a claim made about the two population proportions Pooled Sample Proportion: the pooled sample proportion is denoted by p and is given by: p x1 x2 n1 n2 q 1 p Requirements: 1) The sample proportions are from two simple random samples that are independent. (two samples are independent if the sample values selected from one population are not related to or somewhat naturally paired or matched with the sample values selected from the other sample.) 2) np ≥ 5, nq ≥ 5 (in words, the number of success is at least 5, the number of failure is also at least 5) 5 9-2 Inference About Two Populations 1. Testing a claim made about the two population proportions Test statistic for two proportions (with H0 : p1 = p2 ) ( pˆ 1 pˆ 2 ) ( p1 p2 ) where p1 – p2 = 0 (assumed in null hypothesis) pq p q n1 n2 x x pˆ 1 1 and pˆ 2 2 , n1 n2 z p is the pooled sample proportion, and q 1 p. P-Value: use Table A-2. Follow the procedure in Figure 8 – 5. Critical Value: use Table A-2. (Based on , follow steps in section 8-2. 6 9-2 Inference About Two Populations 1. Testing a claim made about the two population proportions Confidence Interval Estimate of p1 – p2 The CI estimate of the difference p1 – p2 is: ˆ1 p ˆ 2 ) E ( p1 p2 ) ( p ˆ1 p ˆ2) E (p where the margin of error E is given by E z 2 pˆ 1qˆ1 pˆ 2 qˆ 2 . n1 n2 Rounding: rounding the confidence interval limits to three significant digits. 7 9-2 Inference About Two Populations 1. Testing a claim made about the two population proportions e.g.1 Do Airbags Save Lives? The table below lists results from a simple random sample of front-seat occupants involved in car crashes (real data, Chance, Vol.18, No. 2). Use 0.05 significance level to test the claim that the fatality rate of occupants is lower for those in the cars equipped with airbags. Airbags Available No Airbags Available Occupants Fatalities 41 52 Total Number of Occupants 11,541 9,853 Sol. Requirements. 1) both are simple random samples, and two samples are independent. 2) in case 1, #success = 41, # of failure = 11,500; in case 2, # success = 52, # failure = 9,801. All > 5. 8 9-2 Inference About Two Populations 1. Testing a claim made about the two population proportions P-Value Method. Step 1. p1 < p2 Step 2. Alternative: p1 ≥ p2 Step 3. H0: p1 = p2 H1: p1 < p2 Step 4. = 0.05 Step 5. Use normal distribution. Use pooled sample: p x1 x2 41 52 0.004347 n1 n2 11,541 9,853 q 1 p 1 0.004347 0.995653 9 9-2 Inference About Two Populations 1. Testing a claim made about the two population proportions Step 6. Test statistic. Find the value of the test statistic: ( pˆ 1 pˆ 2 ) ( p1 p2 ) z pq p q n1 n2 z 52 41 0 11,541 9,853 1.91 (0.004347)(0.995653) (0.004347)(0.995653) 11,541 9,853 This is a left-tailed test, so P-value = 0.0281 Step 7. P-value < 0.05, we reject the null hypothesis of p1 = p2 . 10 9-2 Inference About Two Populations 1. Testing a claim made about the two population proportions Interpretation. See Figure 8-7 for wording) Because we reject the null hypothesis, we conclude that there is sufficient evidence to support the claim that the proportion of accident fatalities for occupants with airbags is less than the proportion of fatalities for occupants in cars without airbags. Based on these result, it appears that airbags are effective in saving lives. 11 9-2 Inference About Two Populations 1. Testing a claim made about the two population proportions Traditional Method. Step 6. For = 0.05, left-tailed test, the critical value is z = –1.645. The test statistic has a value of –1.91 falls in the critical region. So we reject Null hypothesis. 12 9-2 Inference About Two Populations 2. CI method CI Method. With 90% confidence interval, z/2 = 1.645. E z 2 pˆ 1qˆ1 pˆ 2 qˆ 2 n1 n2 41 11,500 52 9,801 11 , 541 11 , 541 9 , 853 9 , 853 1.645 11,541 9,853 0.001507 p̂1 = 41/11,541 = 0.003553, p̂2 = 52/9,853 = 0.005278, so Lower limit ( pˆ1 pˆ 2 ) E 0.00323; Upperlimit ( pˆ1 pˆ 2 ) E 0.000218; 13 9-2 Inference About Two Populations 2. CI Method CI Method. So, the CI is: –0.00323 < (p1 – p2) < –0.000218 Interpretation. The CI do not contain 0, implying that the significant difference between two proportions. The CI method suggest that the fatality rate is lower for occupants in cars with airbags than for occupants in cars without airbags. The CI also provides an estimate of the amount of the difference between the two fatality rates. 14 9-2 Inference About Two Populations Rationale: why do the procedures of this section work? p̂1 can be approximated by normal distribution with mean p and 1 standard deviation p1q1 / n1 p̂2 can be approximated by normal distribution with mean p2 and standard deviation p2 q2 / n2 pˆ1 pˆ 2 can be approximated by normal distribution with mean p1 – p2 and variance (2pˆ pˆ ) p2ˆ p2ˆ 1 2 1 2 p1q1 p2 q2 n1 n2 15 9-2 Inference About Two Populations Rationale: why do the procedures of this section work? Use the pooled estimate. The pooled estimate of the common value of p1 and p2 is x1 x2 p n1 n2 . If we replace p1 and p2 by p, and replace q1 and q2 by q , the variance leads to the following standard deviation: ( pˆ pˆ ) 1 2 pq p q n1 n2 This leads to the z test statistic introduced earlier. 16 9-2 Inference About Two Populations Rationale: why do the procedures of this section work? The form of the confidence interval requires an expression for the variance different from the one given above. When constructing a CI estimate of the difference between two different proportions, we don’t assume that the two proportions are equal, and we estimate the standard deviation as ( pˆ pˆ ) 1 In the test statistic, z 2 pˆ 1qˆ1 pˆ 2 qˆ 2 n1 n2 ( pˆ 1 pˆ 2 ) ( p1 p2 ) , pˆ 1qˆ1 pˆ 2 qˆ 2 n1 n2 Use the positive and negative values of z (for two tails) and solve for p1 – p2. 17 9-3 Inference About Two Means: Independent Samples Part 1. 1 and 2 are unknown, are NOT assumed to be equal Part 2. 1. 1 and 2 are known 2. 1 and 2 are unknown, 1 = 2 Typically, is unknown 18 9-3 Inference About Two Means: Independent Samples Part 1. 1 and 2 are unknown, are NOT assumed to be equal Definition. Two samples are independent if the sample values from one population are not related to or somehow naturally paired or matched with the same sample values from the other population. Two samples are dependent if sample values are paired. (that is, each pair of sample values consists of two measurements from the same subject (such as before/after data), or each pair of sample values consists of matched pairs (such as husband/wife data), where the matching is based on some inherent relationship.) 19 9-3 Inference About Two Means: Independent Samples Part 1. 1 and 2 are unknown, are NOT assumed to be equal e.g.1 Independent Samples. University of Arizona psychologists conducted a study in which 210 women and 186 men wore microphones so that the numbers of words that they spoke could be recorded. The sample word counts for men and the sample word counts for women are two independent samples. E.g.2. Dependent Samples. Rutgers University researchers conducted a study in which 67 students were weighed in September of their freshmen year and again in April of their Freshmen year. The two samples are dependent, because each September weight is paired with the April weight for the same student. 20 9-3 Inference About Two Means: Independent Samples Part 1. 1 and 2 are unknown, are NOT assumed to be equal e.g.3 Clinical Experiment. In an experiment designed to study the effectiveness of treatments for viral group, • 46 children were treated with low humidity • 46 other were treated with high humidity • Used The Westley Group Score to assess the results after 1 hour. • Both samples have the same number of subjects and the sample scores can be listed in adjacent columns of the same length; • Two samples are independent. the scores are from two different groups of subjects. 21 9-3 Inference About Two Means: Independent Samples Part 1. 1 and 2 are unknown, are NOT assumed to be equal Objective: Test a claim about two independent means or construct a CI estimate of the difference between two population means. Notation: 1 = population mean for population 1 1 = population standard deviation for population 1 n1 = size of the sample for population 1 x1 = sample mean s1 = sample standard deviation (similar for population 2, change index from 1 to 2) 22 9-3 Inference About Two Means: Independent Samples Part 1. 1 and 2 are unknown, are NOT assumed to be equal Requirement: 1) 1 and 2 are unknown, and it is not assumed that 1 = 2 2) Two samples are independent 3) Both samples are simple random samples 4) Either or both of these conditions are satisfied – The two samples are both larger (n1 > 30, n2 > 30) – Both samples come from populations having normal distribution 23 9-3 Inference About Two Means: Independent Samples Part 1. 1 and 2 are unknown, are NOT assumed to be equal Hypothesis Test Statistic for Two Means: Independent Samples t ( x1 x2 ) ( 1 2 ) s12 s22 n1 n2 ( where 1 – 2 is often assumed to be 0 ) Degree of Freedom (denoted by df): when finding critical values or P-Values, use the following: 1) In this book, we use: df = smaller of n1 – 1 and n2 – 1 (simple and conservative estimate) 2) More accurate but more difficult estimate: ( A B) 2 df A2 B2 n1 1 n2 1 where A = s12 n1 and B = s22 n2 24 9-3 Inference About Two Means: Independent Samples Part 1. 1 and 2 are unknown, are NOT assumed to be equal P-Values: Refer to the t distribution in Table A-3, use the procedure in Figure 8-5 Critical values: Refer to the t distributions in Table A-3. CI Estimate of 1 – 2 : Independent Samples The CI estimate of the difference 1 – 2 is: ( x1 x2 ) E (1 2 ) ( x1 x2 ) E where the margin of error E is given by E t 2 s12 s22 n1 n2 . 25 9-3 Inference About Two Means: Independent Samples Part 1. 1 and 2 are unknown, are NOT assumed to be equal e.g.4 Are Men and Women Equal Talkers? USA-Today proclaim: “Men, women are equal talkers”. Research report, “Are Women Really More Talkative Than Men”, Science, Vol.317, No. 5834. Data set 8 in Appendix B. Number of Words Spoken In a Day Men Women n1 = 186 n2 = 210 x1 = 15,668.5 x2 = 16,215.0 s1 = 8632.5 s2 = 7301.2 Sol. Requirements. 1) 1 and 2 are unknown, and it is not assumed that 1 = 1; 2) two samples are independent; 3) simple random samples; 4) Both samples are large (can also verify the normality using Statdisk) 26 9-3 Inference About Two Means: Independent Samples Part 1. 1 and 2 are unknown, are NOT assumed to be equal Traditional Method Step 1. 1 = 2 Step 2. Alternative: 1 2 Step 3. H0: 1 = 2 (original claim) H1: 1 2 We now proceed with the assumption that 1 – 2 = 0 Step 4. = 0.05 Step 5. We have two independent samples, and we are testing a claim about two population means, we use t distribution. 27 9-3 Inference About Two Means: Independent Samples Part 1. 1 and 2 are unknown, are NOT assumed to be equal Step 6. Test statistic: t ( x1 x2 ) ( 1 2 ) 2 1 2 2 s s n1 n2 (15,668.5 16,215) 0 2 8632.5 7301.2 186 210 2 0.676 We find the critical values are t = 1.972 (A-3, df = 185, use df = 200). (use Calculator, can find P-value = 0.4998) Step 7. The test statistic is not in the critical region. We fail to reject null hypothesis. Interpretation: There is not sufficient evidence to warrant rejection of the claim that men and women speak the same number of words in a day. There does not appear to be a significant difference between the two means. 28 9-3 Inference About Two Means: Independent Samples Part 1. 1 and 2 are unknown, are NOT assumed to be equal e.g.5 Using the sample data in e.g.4, construct a 95% CI of the difference between the mean number of words spoken by men and the mean number of words spoken by women. CI Method Step 1. Requirement check done in e.g.4. t/2 = 1.972. is found in e.g.4. So the margin of error: E t 2 s12 s22 8632.52 7301.2 2 1.972 1595.4 n1 n2 186 210 Use x1 = 15,668.5, x2 = 16,215.0, and E = 1595.4, we get –2141.9 < (1 – 2) < 1048.9 29 9-3 Inference About Two Means: Independent Samples Part 1. 1 and 2 are unknown, are NOT assumed to be equal Interpretation. We are 95% confident that the limit of –2141.9 words and 1048.9 words actually do contain the difference between the two population means. Because this CI contains 0, this suggest that it is very possible that the two population means are equal. So there is no significant difference between the two means. Rationale: why do the Test Statistic and CI have the particular form presented here? x1 x2 can be approximated by t distribution with mean 2 2 standard deviation equals to s1 s2 n1 n2 1 – 2 and 30 9-3 Inference About Two Means: Independent Samples Part 2. 1 and 2 are known Requirement: 1) 1 and 2 are known 2) Two samples are independent 3) Both samples are simple random samples 4) Either or both of these conditions are satisfied – The two samples are both larger (n1 > 30, n2 > 30) – Both samples come from populations having normal distribution 31 9-3 Inference About Two Means: Independent Samples Part 2. 1 and 2 are known (not realistic) Hypothesis Test Statistic for Two Means z ( x1 x2 ) ( 1 2 ) 12 n1 22 n2 P-Values and Critical Values: refer to Table A-2 CI Estimate of 1 – 2 : Independent Samples The CI estimate of the difference 1 – 2 is: ( x1 x2 ) E (1 2 ) ( x1 x2 ) E where the margin of error E is given by E z 2 12 n1 22 n2 32 9-3 Inference About Two Means: Independent Samples Part 2. Alternative Method: 1 = 2 and Pool the Sample Variances Requirement: 1) 1 and 2 are NOT known, but 1 = 2 2) Two samples are independent 3) Both samples are simple random samples 4) Either or both of these conditions are satisfied – The two samples are both larger (n1 > 30, n2 > 30) – Both samples come from populations having normal distribution 33 9-3 Inference About Two Means: Independent Samples Part 2. Alternative Method: 1 = 2 and Pool the Sample Variances Hypothesis Test Statistic for Two Means t Where ( x1 x2 ) ( 1 2 ) s 2p s 2p n1 n2 (n1 1) s12 (n2 1) s22 s (n1 1) (n2 1) 2 p (pooled variance) And df = n1 + n2 – 2. 34 9-3 Inference About Two Means: Independent Samples Part 2. Alternative Method: 1 = 2 and Pool the Sample Variances CI Estimate of 1 – 2 : Independent Samples The CI estimate of the difference 1 – 2 is: ( x1 x2 ) E (1 2 ) ( x1 x2 ) E where the margin of error E is given by E t s 2p 2 n1 s 2p n2 And df = n1 + n2 – 2. 35 9-3 Inference About Two Means: Independent Samples Part 2. 1 and 2 are known Figure 9-3 36 9-3 Inference About Two Means: Independent Samples Part 2. Alternative Method: 1 = 2 and Pool the Sample Variances Why Alternative method? • Df is little higher, so the hypothesis test has more power • CI littler narrower • That’s why statistician use this method. 37 9-4 Inference from Dependent Samples Introduction. Methods for testing hypothesis and constructing CI involving mean of the differences of the values from two dependent populations. Typical examples of dependent samples: • Each pair of sample values consists of two measurements from the same subject • Each pair of sample consists of a matched pair. 38 9-4 Inference from Dependent Samples Objective: Test a claim about mean of the differences from dependent samples or construct CI estimate of the mean of the differences from dependent samples. Notation: d = individual difference between the two values in a single matched pair d = mean value of the different d for the population of all pairs of data d = mean value of the difference d for the paired sample data sd = standard deviation of the differences d for the paired sample data n = number of pairs of data 39 9-4 Inference from Dependent Samples Requirements: 1) Sample data are dependent 2) The samples are simple random sample 3) Either or both of these conditions are satisfied – The number of pairs of sample data is large (n > 30) – Or the pairs of values have differences that are from a population having a distribution that is approximately normal. Hypothesis Test Statistic for Dependent Samples t d d sd n Where degree of freedom df = n – 1 P-values and Critical values: Table A-3 (t-distribution) 40 9-4 Inference from Dependent Samples Confidence Intervals for Dependent Samples d E d d E where: E t 2 sd n 41 9-4 Inference from Dependent Samples e.g.1 Hypothesis Test of Claimed Freshman Weight Gain. Data set 8 in Appendix B includes measured weights of college students in September and April of their freshman year. Table 9-1 lists a small portion of those sample values. (we use the small portion of the data so that we can better illustrate the method of hypothesis testing.) Use the sample data in Table 9-1 to test the claim that for the population of students, the mean change in weight from September to April is equal to zero. Table 9-1 Weight (kg) Measurements of Students in Their Freshman Year April weight 66 52 68 69 71 September weight 67 53 64 71 70 Difference d = (April weight) – (September weight) –1 –1 4 –2 1 42 9-4 Inference from Dependent Samples Requirement: 1) Dependent samples (because the values are paired) 2) NOT simple random sample (because all subjects volunteered for the study. We will proceed as if it is simple random sample. 3) 5 pairs of data values. Histogram by Statdisk shows that the data is approximately normal. 43 9-4 Inference from Dependent Samples Traditional Method Step 1. d = 0 kg Step 2. Alternative: d 0 kg Step 3. H0: d = 0 kg (original claim) H1: d 0 kg We now proceed with the assumption that d = 0 Step 4. = 0.05 Step 5. We use t distribution. Step 6. d = 0.2; sd = 2.4, so the statistic t d d sd n 0.2 0 2.4 5 0.186 44 9-4 Inference from Dependent Samples Step 6. Continue: so the t-statistic = 0.186 For = 0.05, df = 5 – 1 = 4, use the column for 0.05 (Area in two tails) in table A-3, we find critical values t = 2.776. Step 7. Because the test statistic does NOT fall in the critical region, we fail to reject the null hypothesis. Interpretation. There is not sufficient evidence to warrant rejection of the claim that for the population of students, the mean change in weight from September to April is equal to zero. Based on the sample results listed in table 9-1, there does not appear to be a significant weight gain from September to April. 45 9-4 Inference from Dependent Samples P-Value Method Step 6. Use technology, P-value = 0.8605 which is greater than 0.05. So we fail to reject the null hypothesis. 46 9-4 Inference from Dependent Samples e.g.2 Hypothesis Test of Claimed Freshman Weight Gain. Data values in Data set 8 in Appendix B includes measured weights of college students in September and April of their freshman year. Use all 67 data values to test the claim that for the population of students, the mean change in weight from September to April is equal to zero. Sol. Test statistic = 2.48. P-value is 0.016. We now reject the null hypothesis, and conclude that there is sufficient evidence to warrant rejection of the claim that the mean difference is equal to zero. (there is a significant change) Next two examples will construct the CI 47 9-4 Inference from Dependent Samples e.g.3 CI for Estimating the Mean Weight Change. Using data in Table 9-1, construct a 95% CI estimate of d , which is the mean of the “April-September” weight differences of college students in their freshman year. Sol. Requirement check see e.g.1. d = 0.2; sd = 2.4; n = 5; t/2 = 2.776. We find the margin of error E t 2 So the CI is sd 2.4 2.776 3.0 n 5 0.2 – 3.0 < d < 0.2 + 3.0, Or –2.8 < d < 3.2 Interpretation. We have 95% confidence that the limits of –2.8 kg and 3.2 kg contains the true value of the mean weight change from 48 September to April. 9-4 Inference from Dependent Samples e.g.4 CI for Estimating the Mean Weight Change. Using all data values in Data set 3 in Appendix B, construct a 95% CI estimate of d , which is the mean of the “April-September” weight differences of college students in their freshman year. Sol. Repeat e.g.3 using Statdisk with all 67 pair of data values, we obtain: CI: 0.2306722 < d < 2.127537 Interpretation. The CI suggests that the mean weight gain is likely to be between 0.2 kg and 2.1 kg. The CI does NOT include zero, so the larger data set suggest that the typical college student does gain some weight during the freshman year. 49 9-4 Inference from Dependent Samples e.g.5 Is the Freshman 15 a Myth? Freshman 15 is the claim that d = 6.8 kg (note that 6.8 kg = 15 lb). Using all data values in Data set 3 in Appendix B, to test the claim that d = 6.8 kg, with = 0.05. Minitab shows that the statistic = –11.83, and the P-value is 0.000 (round to three decimal places). Because P-value < 0.05, we reject the null hypotheses, and there is sufficient evidence to warrant rejection of the claim that the mean weight change is equal to 6.8 kg. e.g.4 Shows that the mean weight gain is likely between 0.2 kg and 2.1 kg, so the claim of a mean weight gain of 15 lb appears to be unfounded. These results shows that the “Freshman 15” is a myth. 50 9-4 Inference from Dependent Samples Experimental Design. Design principle: When designing an experiment or planning an observational study, using dependent samples with paired data is generally better than using two independent samples. • E.g. compare the effectiveness of two different types of fertilizer (one organic and another chemical) • The fertilizers are to be used on 20 plots of land with equal area • Divide each of the 20 plots in half. One half treated with organic fertilizer, another half treated with chemical fertilizer • Resulted in paired data 51