Let's answer the following oven-burning question: Do two brands of
cookies have, on average, the same numbers of chocolate chips? Do a
two-sample t-test on the data. You may assume normality, but you should
test for equality of variances first and set your own level of
significance before beginning your analyses.
BRAND A BRAND B
32 23
31 18
28 15
29 19
31 22
33 26
35 17
29 19
28 21
30
sA=2.27 sB=3.35
------------------------------------------------------
ANSWERS
sA=2.27, sA^2=05.16, xbarA=30.6 nA=10
sB=3.35, sB^2=11.25, xbarB=20.0 nB=9
Test for equality of variances: Fobserved= 11.25/5.16 = 2.18. Critical
F-value [df=8,9] .05[2] =4.10, therefore it is OK to pool variances as
they do not appear different. Pooled variance sp^2 = [9(5.16) +
8(11.25)]/17= 8.03.
sp^2(1/10 + 1/9) = 1.6943; sqrt = 1.30 = SE(xbarA=xbarB).
tobs=(30.6 - 20.0)/1.30 = 8.14, compare to t, df=17, P<<0.001.
Therefore we can reject the null hypothesis of equality of means and
declare that the two means are significantly different.