Ch. 10 Comparing Two Populations or Groups Ch. 10-2 Comparing Two Means
𝑥 1 =123.8 less decay 𝑥 2 =116.4 more decay 123.8 116.4 7.4 Maybe, but it could be that we got this difference of means purely by chance. We need to perform a significance test.
𝐻 0
= # 𝑜𝑓 𝑑𝑜𝑡𝑠 ≥ 7.4 𝑡𝑜𝑡𝑎𝑙 # 𝑜𝑓 𝑑𝑜𝑡𝑠 = statistically significant? 𝑝-value Assuming there’s no difference in decay, there is a ____________ probability of obtaining a 𝑥 1 − 𝑥 2 value of 7.4 or more purely by chance. This provides _____________ evidence, so we __________ conclude that the length of time in the ground does affect the breaking strength of the polyester specimen.
𝑥 1 𝜇 1 𝑡 𝑑𝑓 N 𝜇 1 , 𝜎 𝑥 1 𝜇 1 𝜎 𝑥 1 = 𝜎 1 𝑛 1 𝑠 1 𝑛 1 𝜇 1 𝑧 dist 𝑥 1 𝜇 1 𝑡 𝑑𝑓 N 𝜇 1 , 𝜎 𝑥 1 𝜇 1 𝜎 𝑥 1 = 𝜎 1 𝑛 1 𝑠 1 𝑛 1 𝜇 1 OR 𝑧 dist 𝑡 dist 𝑥 2 𝜇 2 𝑡 𝑑𝑓 N 𝜇 2 , 𝜎 𝑥 2 𝜇 2 𝜎 𝑥 2 = 𝜎 2 𝑛 2 𝑠 2 𝑛 2 OR 𝜇 2 𝑧 dist 𝑡 dist
𝑥 1 − 𝑥 2 𝜇 1 − 𝜇 2 𝑡 𝑐𝑟𝑎𝑧𝑦 𝑓𝑜𝑟𝑚𝑢𝑙𝑎 𝜇 1 − 𝜇 2 𝑥 1 − 𝑥 2 𝜇 1 − 𝜇 2 𝑡 𝑐𝑟𝑎𝑧𝑦 𝑓𝑜𝑟𝑚𝑢𝑙𝑎 𝜇 1 − 𝜇 2 N 𝜇 1 − 𝜇 2 , 𝜎 𝑥 1 − 𝑥 2 𝜎 𝑥 1 − 𝑥 2 = 𝜎 1 2 𝑛 1 + 𝜎 2 2 𝑛 2 𝜇 1 − 𝜇 2 𝑧 dist OR 𝑠 1 2 𝑛 1 + 𝑠 2 2 𝑛 2 𝑡 dist
𝑥 1 − 𝑥 2 𝜇 1 − 𝜇 2 𝑡 𝑐𝑟𝑎𝑧𝑦 𝑓𝑜𝑟𝑚𝑢𝑙𝑎 𝜇 1 − 𝜇 2 𝑥 1 − 𝑥 2 𝜇 1 − 𝜇 2 𝑡 𝑐𝑟𝑎𝑧𝑦 𝑓𝑜𝑟𝑚𝑢𝑙𝑎 𝜇 1 − 𝜇 2 N 𝜇 1 − 𝜇 2 , 𝜎 𝑥 1 − 𝑥 2 𝜎 𝑥 1 − 𝑥 2 = 𝜎 1 2 𝑛 1 + 𝜎 2 2 𝑛 2 𝜇 1 − 𝜇 2 𝑧 dist OR 𝑠 1 2 𝑛 1 + 𝑠 2 2 𝑛 2 𝑡 dist
𝑥 1 =96 𝑛 1 =38 𝑠 1 =3.5 𝑥 2 =94 𝑛 2 =40 𝑠 2 =2.5 𝜇 1 → true mean lap time for old tires (in seconds) 𝜇 2 → true mean lap time for new tires (in seconds) We want to estimate the true difference 𝜇 1 − 𝜇 2 at a 95% confidence level.
Two-sample 𝑡 interval for 𝜇 1 − 𝜇 2 Random: “SRS of 38 laps” and “SRS of 40 laps” Normal: 𝑛 1 ≥30 and 𝑛 2 ≥30, so by CLT the sampling distribution of 𝑥 1 − 𝑥 2 is approximately normal. Independent: Two things to check: The two samples need to be independent of each other. Individual observations in each sample have to be independent. When sampling without replacement for both samples, must check 10% condition for both. We must assume the old lap times are independent from new lap times. We must also assume that Mr. Hussey has driven more than 10 38 =380 laps with the old tires and 10 40 =400 laps with the new tires.
𝑥 1 =96 𝑛 1 =38 𝑠 1 =3.5 𝑥 2 =94 𝑛 2 =40 𝑠 2 =2.5 Estimate ± Margin of Error 𝑠 1 2 𝑛 1 + 𝑠 2 2 𝑛 2 𝑥 1 − 𝑥 2 ± 𝑡 ∗ Standard Error Calculating degrees of freedom for two sample means: Option 1: Use calculator (2-SampTInt). Actual 𝑑𝑓 formula is: Option 2: (conservative approach) Use the smaller 𝑑𝑓 of 𝑛 1 −1 and 𝑛 2 −1. 𝑑𝑓= 𝑠 1 2 𝑛 1 + 𝑠 2 2 𝑛 2 2 1 𝑛 1 −1 𝑠 1 2 𝑛 1 2 + 1 𝑛 2 −1 𝑠 2 2 𝑛 2 2
𝑥 1 =96 𝑛 1 =38 𝑠 1 =3.5 𝑥 2 =94 𝑛 2 =40 𝑠 2 =2.5 Estimate ± Margin of Error 𝑠 1 2 𝑛 1 + 𝑠 2 2 𝑛 2 𝑥 1 − 𝑥 2 ± 𝑡 ∗ smaller 𝑑𝑓 Option 1 Option 2 With calculator: 𝑑𝑓= 𝑛 1 −1=37 STAT TESTS 2-SampTInt (0) 𝑡 ∗ =invT .975, 37 =2.026 or use 𝑡-table 𝑑𝑓=30, 𝑡 ∗ =2.042 Inpt: Data Stats x1: Sx1: n1: x2: Sx2: n2: C-Level: Pooled: No Yes 96 3.5 3.5 2 38 + 2.5 2 40 0.619, 3.381 38 96−94± 2.026 94 𝑑𝑓=66.695 2.5 2±1.402 40 0.95 0.598, 3.402 ALWAYS do no pooled for 𝑡 procedures
We are 95% confident that the interval from 0. 619 to 3 We are 95% confident that the interval from 0.619 to 3.381 captures the true difference in means 𝜇 1 − 𝜇 2 of mean lap times between the old and new tires. This suggests that the mean lap time with the old tires is between 0.619 and 3.381 seconds longer than the mean lap time with the new tires. Yes, because 0 is NOT captured in the interval.
two-sample No, this is not a matched pairs design. Use 1 Var-Stats on each list to find 𝑥 and 𝑠 𝑥 . 𝑥 1 =23.2 𝑛 1 =10 𝑠 1 =3.52 𝑥 2 =22.125 𝑛 2 =8 𝑠 2 =3.76 𝜇 1 → true mean ACT score for students who take “smart pill” 𝜇 2 → true mean ACT score for students who take placebo We want to estimate the true difference 𝜇 1 − 𝜇 2 at a 90% confidence level.
Two-sample 𝑡 interval for 𝜇 1 − 𝜇 2 Random: “10 student chosen at random are given the ‘smart pill’” and “8 students chosen at random are given a placebo” Normal: Both population distributions are normal so the sampling distribution of 𝑥 1 − 𝑥 2 is approximately normal. Independent: Two things to check: The two groups need to be independent of each other. Individual observations in each group have to be independent. When sampling without replacement for both samples, must check 10% condition for both. Due to random assignment, these two groups can be viewed as independent. No 10% condition since there was no sampling. Individual observations in each group should also be independent: knowing one subject’s ACT score gives no information about another subject’s ACT score.
Estimate ± Margin of Error 𝑥 1 =23.2 𝑛 1 =10 𝑠 1 =3.52 𝑥 2 =22.125 𝑛 2 =8 𝑠 2 =3.76 Estimate ± Margin of Error 𝑠 1 2 𝑛 1 + 𝑠 2 2 𝑛 2 𝑥 1 − 𝑥 2 ± 𝑡 ∗ smaller 𝑑𝑓 Option 1 Option 2 We can use the “data” option now since our data is in lists. 𝑑𝑓=8−1=7 𝑡 ∗ =invT .95, 7 =1.895 or use 𝑡-table 𝑑𝑓=7, 𝑡 ∗ =1.895 With calculator: STAT TESTS 2-SampTInt (0) Inpt: Data Stats List1: List2: Freq1: Freq2: C-Level: Pooled: No Yes 3.52 2 10 + 3.76 2 8 𝐿 1 23.2−22.125± 1.895 𝐿 2 −1.969, 4.1188 1 1.075±3.286 1 𝑑𝑓=14.66 0.90 −2.211, 4.361 ALWAYS do no pooled for 𝑡 procedures
Answer key will use conservative approach for degrees of freedom. We are 90% confident that the interval from −1.969 to 4.1188 captures the true difference in means 𝜇 1 − 𝜇 2 for ACT scores between kids given a smart pill and kids given a placebo. This suggests that the “smart pill” may improve scores by up 4.1188 points or the placebo may improve scores by up 1.969 points. −0.756, −0.564 Answer key will use conservative approach for degrees of freedom.
𝜇 1 → true mean ACT score for students who take “smart pill” one sided 𝑥 1 =23.2 𝑛 1 =10 𝑠 1 =3.52 𝑥 2 =22.125 𝑛 2 =8 𝑠 2 =3.76 State: 𝜇 1 → true mean ACT score for students who take “smart pill” 𝜇 2 → true mean ACT score for students who take placebo 𝐻 0 : 𝐻 𝑎 : 𝜇 1 − 𝜇 2 =0 𝜇 1 = 𝜇 2 𝑥 1 − 𝑥 2 =23.2−22.125=1.075 OR 𝜇 1 − 𝜇 2 >0 𝜇 1 > 𝜇 2 𝛼=0.05 OR
Plan: Two sample 𝑡 test for 𝜇 1 − 𝜇 2 Random: “10 student chosen at random are given the ‘smart pill’” and “8 students chosen at random are given a placebo” Normal: Both population distributions are normal so the sampling distribution of 𝑥 1 − 𝑥 2 is approximately normal. Independent: Two things to check: The two groups need to be independent of each other. Individual observations in each group have to be independent. When sampling without replacement for both samples, must check 10% condition for both. Due to random assignment, these two groups can be viewed as independent. No 10% condition since there was no sampling. Individual observations in each group should also be independent: knowing one subject’s ACT score gives no information about another subject’s ACT score.
Do: 𝑥 1 =23.2 𝑛 1 =10 𝑠 1 =3.52 𝑥 2 =22.125 𝑛 2 =8 𝑠 2 =3.76 Sampling Distribution of 𝑥 1 − 𝑥 2 conservative approach: N 0, ________ 1.734 𝑑𝑓=8−1=7 smaller 𝑑𝑓 1.075 𝜎 𝑥 1 − 𝑥 2 = 𝑠 1 2 𝑛 1 + 𝑠 2 2 𝑛 2 = 3.52 2 10 + 3.76 2 8 =1.734 𝑡= 𝑥 1 − 𝑥 2 − 𝜇 1 − 𝜇 2 𝜎 𝑥 1 − 𝑥 2 = 23.2−22.125 −0 1.734 =0.62 𝑡cdf 0.62, 99999, 7 =0.277 𝑝-value
Conclude: Assuming 𝐻 0 is true 𝜇 1 = 𝜇 2 , there is a .277 probability of obtaining a 𝑥 1 − 𝑥 2 value of 1.075 or more purely by chance. This provides weak evidence against 𝐻 0 and is not statistically significant at 𝛼=.05 level .277>.05 . Therefore, we fail to reject 𝐻 0 and cannot conclude that the smart pill increases ACT scores. With calculator: 𝑡=0.62 𝑝=0.272 𝑑𝑓=14.66 𝑥 1 =23.2 𝑥 2 =22.125 𝑆 𝑥 1 =3.52 𝑆 𝑥 2 =3.76 𝑛 1 =10 𝑛 2 =8 STAT TESTS 2-SampTTest (4) 𝑝-value Inpt: Data Stats List1: List2: Freq1: Freq2: 𝜇: ≠𝜇 <𝜇 >𝜇 Pooled: No Yes 𝐿 1 𝐿 2 1 1 ALWAYS do no pooled for 𝑡 procedures
What population can we target? experiment Yes Not a random sample, so conclusion only holds for the people in the experiment What population can we target?
matched pairs Yes, since it’s a matched pairs design. Very important to know when you use a matched pairs 𝑡 test for 𝜇 𝑑 or a two sample 𝑡 test for 𝜇 1 − 𝜇 2 If groups were formed using a completely randomized design: ⇒ two-sample 𝑡 test for 𝜇 1 − 𝜇 2 If subjects were paired, then split at random into two treatments or if each subject receives both treatments: ⇒ matched pairs 𝑡 test for 𝜇 𝑑
We will do (smart – placebo) so that + values represent pill worked Differences 2 9 −3 −2 10 6 5 4 12 Use 1 Var-Stats 𝑥 𝑑 =4.3 𝑠 𝑑 =5.10 State: 𝐻 0 : 𝐻 𝑎 : 𝜇 𝑑 =0 𝜇 𝑑 → true mean difference (smart pill – placebo) in test scores 𝜇 𝑑 >0 𝛼=0.05 Plan: Matched pairs T test for 𝜇 𝑑 Random: Treatments were randomized Normal: Population distribution is normal so the sampling distribution of 𝑥 𝑑 is approximately normal. Independent: There are more than 10 10 =100 students at ECRCHS.
Do: 𝑥 𝑑 =4.3 𝑠 𝑑 =5.10 Sampling Distribution of 𝑥 𝑑 𝜎 𝑥 𝑑 = 𝑠 𝑑 𝑛 = 5.10 10 =1.613 N 0, ________ 1.613 𝑑𝑓=𝑛−1=10−1=9 4.3 𝑡= 𝑥 𝑑 − 𝜇 𝑑 𝜎 𝑥 𝑑 = 4.3−0 1.613 =2.67 area = tcdf 2.67, 99999, 9 =.013 𝑝-value
Conclude: Assuming 𝐻 0 is true 𝜇 𝑑 =0 , there is a .013 probability of obtaining a 𝑥 𝑑 value of 4.3 or higher purely by chance. This provides strong evidence against 𝐻 0 and is statistically significant at 𝛼=0.05 level (.013<.05). Therefore, we reject 𝐻 0 and can conclude that the smart pills work. experiment Yes All ECRCHS students
Two sample 𝑧 test for 𝑝 1 − 𝑝 2 Matched pairs 𝑡 test for 𝜇 𝑑 more less Equal