Elementary tatistics and Inference :5 or 7P:5 Lecture 36 Elementary tatistics and Inference :5 or 7P:5 Chapter 7 3
Chapter 7 More Tests for verages ) The tandard Error for a Difference etween Two verages This chapter discussed the process for comparing the differences between two means. For example, suppose you want to compare the differences between boys and girls, or differences between students who were instructed with method versus students instructed with method. 4 Chapter 7 More Tests for verages (cont.) uppose you have two boxes: (Population) ox μ verage D 6 (Population) ox μ verage 9 D 4 ample ample n 4 n E(avg) μ E(avg) n 6 3 4 E(avg) 9 μ E(avg) n 4 4 5 Chapter 7 More Tests for verages (cont.) ee page 5-53. E ( X X ) E E ( X X ) μ μ 9 ( X X ) 9 6 5 5 X X 6 4 4 36 6 4 The histogram of differences in averages (sampling distribution of differences in averages) is approximately normal in shape with mean and E as: Mean μ μ differences in means of the populations E square root of the sum of the error variances of populations and 6
Chapter 7 More Tests for verages (cont.) Example: (page 5) One hundred draws are made from a box (population) are made with replacement from box C, shown below. Independently, draws are made with replacement from box D. Find the expected value and standard error for the difference between the number of s in box C and the number of 4s drawn from box D. 7 Chapter 7 More Tests for verages (cont.) C D 3 4 avg μc D C E(count) n avg 5 E(count) n D 5 avg μ D D D E(count) n avg 5 E(count) n D 5 8 Chapter 7 More Tests for verages (cont.) E(Difference) E(count C) - E(count D) 5-5 E(Difference) 5 5 5 5 7.7 E( Diff) 7.7 7 Differences The probability histogram for differences in sample means would be approximately normal with mean equal to difference in means of the populations (boxes) and E equal to the square root of the sum of the squares of the E for each box. 9 3
Chapter 7 More Tests for verages (cont.) Exercise et (p. 53) #, 3 #. ox has an average of and a D of. ox has an average of 5 and a D of 8. Now 5 draws are made at random with replacement from box, and independently 36 draws are made at random with replacement from box. Find the expected value and standard error for the difference between the average of the draws from box and the average of the draws from box. Chapter 7 More Tests for verages (cont.) Population (ox) μ Population (ox) μ 5 8 n 5 n 36 E(Differences in Means) - 5 5 E(Differences in Means) E 34 5 36 ( Differences in Means) 4 9 3 3.65 3. 6 Chapter 7 More Tests for verages (cont.) The sampling distribution of differences in averages would be approximately normal with mean 5, and E 3.6. X X μ μ X X 4
Chapter 7 More Tests for verages (cont.). Comparing Two ample verages (Means) ince the theoretical probability histogram (sampling distribution) of differences in averages is approximately normal, we can use the Z-test to test the hypothesis that independent samples were taken from two populations that have the same mean (i.e., H : μ μ ). 3 Chapter 7 More Tests for verages (cont.) Population μ?? Population μ?? ample (n ) ample (n ) X 36.7 X 3.4 3. H : μ μ H : μ μ > 34.9 4 Chapter 7 More Tests for verages (cont.) The sampling distribution of differences is approximately normal. E(diff) 3. 34.9 E(diff) E(diff).46.96.8 H : μ μ 6.3 4.3 X X Z score - Z D of score Z mean of score ( X X ) ( ) ( X X ) ( μ μ) 6.3 4.3.46 E(diff) 5 5
Chapter 7 More Tests for verages (cont.) The p-value associated with Z4.3 is very small..% 99.9983 99.9983% ).7%.85% Z -4.3 4.3 The likelihood of obtaining a difference in means of 6.3 from two independent samples from the populations is much less than % of the time (i.e.,.85%), if the hypothesis were true as a result, we reject the hypothesis and accept the alternative that the mean of population is significantly larger than population. 6 Chapter 7 More Tests for verages (cont.) Example: large university takes a simple random sample of male students, and another simple random sample of females. The sample sizes are and 3. s is turned out, 7 of the sample men used a personal computer on a regular basis, compared to 3 of the women: 53.5% versus 44.%. Is the difference between the percentages real, or a chance variation? 7 Chapter 7 More Tests for verages (cont.) Males Females n n 3 7 3 p.535 p.44 3 E( avg) p E( avg) p E(avg) p ( p ) n est. E(Diff in %) E(Diff in %) p % p % 53.5 44. 9.5% p ( p ) p ( p ) E(avg) (.535)(.465) (.44)(.56) est. E(Diff in %) 3 est. E(Diff in %) 4.54% p ( p ) n 8 6
Chapter 7 More Tests for verages (cont.) H : Male% - Female % H : Male% - Femle % > ( φ φ ) M F est. E(Diff in %) 4.54%.79%.9 score - mean of scores Diff in % - Expected Diff in % Z D of scores est. E of diff in % ( p % p %) () 9.5 Z.9 p ( ) ( ) 4.54 p p p Male% - Female % Z 9 Chapter 7 More Tests for verages (cont.) The chance of obtaining a Z-score of.9 or 96.43 greater is about.79% - so the p-value.79%. ecause this is less than 5%, we reject hypothesis that the percent of males and females with computers is equal, more males had computers than females. Exercise et (p. 56) #7, 8 7
Chapter 7 More Tests for verages (cont.) C. Experiments The methods use to compare differences in two independent sample means can be applied to experiments. For example, at the start of our course we discussed the alk vaccine trials to see if the vaccine was effective in reducing the incidence of polio. Example 4: There are subjects in a small clinical trial on vitamin C. Half the subjects are assigned at random to treatment (, mg of vitamin C daily) and half to control (, mg of placebo). Over the period of the experiment, the treatment group averaged.3 colds, and the D was 3.. The controls did a little worse: they averaged.6 colds and the D was.9. Is the difference in averages statistically significant? Chapter 7 More Tests for verages (cont.) Treatment (n) Vitamin C Treatment (n) Placebo X.3 colds 3. H : μ μ H : μ μ < ( X Z X ) ( μ μ ) (.3.6) 3..9.3.3 Z.77.96.84.45 X.6 colds.9 ee page 58-59 3 Chapter 7 More Tests for verages (cont.) E(diff in means).45 5.6% 4% 4% -.3 -.77 (-.7) H H.7 Differencein means X X Z The p-value is about 4% - since it is greater than 5%, retain H. 4 8
Chapter 7 More Tests for verages (cont.) Note: Read the caution section about randomized experiments on pages 58-5. 5 Chapter 7 More Tests for verages (cont.) There is a box of tickets. Each ticket has two numbers: one shows what the response would be to treatment ; the other, to treatment ; only one of the numbers can be observed. ome tickets are drawn at random without replacement from the box; in this sample, the responses to treatment are observed. Then, a second sample is drawn at random without replacement from the remaining tickets. In the second sample, the responses to treatment are observed. The E for the difference between the two sample averages can be conservatively estimated as follows: i. compute the Es for the averages as if drawing with replacement; ii. combine the Es as if the samples were independent. 6 Chapter 7 More Tests for verages (cont.) Exercise et C (p. 5) #, 3 #. Is Wheaties a power breakfast? To find out, a study is done in a large elementary statistics class: 499 students agree to participate; after the midterm, 5 are randomized to the treatment group, and 49 to the control group. The treatment group is fed Wheaties for breakfast 7 days a week. The control group gets ugar Pops. a) Final scores averaged 66 for the treatment group; the D was. For the control group, the figures were 59 and. What do you conclude? b) What aspects of the study could have been done blind? Note: Wheaties and ugar Pops are registered 7 trademarks. The study is hypothetical. 9
Chapter 7 More Tests for verages (cont.) Wheaties ugar Pops n 5 X 66 n 49 X 59 H : μ μ H : μ μ 8 Chapter 7 More Tests for verages (cont.) a) X X 7 est. E (Diff) est. E(Diff).764.66 5 49 3.37.835 9 Chapter 7 More Tests for verages (cont.) b) 99.986% est. E(Diff).835 7-3.8 3.8 X X ( X Z X ) n n 3
Chapter 7 More Tests for verages (cont.) c) Z ( X X ) n n 7.835 3.8 d) P-value.4%, since it is less than 5%, reject H Wheaties are more powerful! 3