Exercise 1: The t-test for two independent samples
Comparing two means is the most frequent operation in advanced quantitative methods. The t-test compares the observed gap with what the luck of sampling would produce, and everything hinges on the denominator.
Two groups in a quantitative methods course: the treated group, 25 students, mean 72.4 and standard deviation 8.2; the control group, 28 students, mean 67.9 and standard deviation 9.6.
- a) State the null and alternative hypotheses.
- b) Compute the pooled variance and the standard error of the difference.
- c) Compute the statistic and the number of degrees of freedom.
- d) The two-tailed critical value at the 5% level is 2.008. Conclude.
- e) The graph shows two distributions that overlap heavily. Does that contradict a test?
Show the solution
Answers
- a) : . Two-tailed :
- b) , , standard error
- c) , with degrees of freedom
- d) : fail to reject; the p-value is about
- e) No: the test is about the means, far more precise than individuals; the overlap tells the PRACTICAL SIGNIFICANCE
NULL hypothesis: , the two groups come from populations with the same mean, and the observed gap is due only to the luck of sampling. Two-tailed ALTERNATIVE hypothesis: . We choose the two-tailed version because nothing was announced in advance about the DIRECTION of the effect; adopting a one-tailed test after seeing that the treated group is ahead would quietly double the significance level.
, so . Standard error of the difference: . The pooled variance is an average WEIGHTED by the degrees of freedom: the larger group counts for more, which makes sense since it estimates the common variance better.
. Degrees of freedom: . The statistic reads as a ratio: the observed gap is 1.82 times the standard error of what luck alone would produce.
: we FAIL TO REJECT the null hypothesis. The data therefore do not allow us to conclude that the means differ at the 5% level. We must be careful not to write that the two groups are equal: the p-value is about 0.074 here, which leaves the hypothesis of a difference very much alive, and a larger sample might bring it out.
No, it is not contradictory, and the graph helps explain the result. The test is NOT about the overlap of the individual distributions but about the precision of the MEANS, which is much better than that of individuals, since it is divided by the square root of the number of subjects. Two distributions can overlap almost entirely and have very significantly different means if the samples are large. Conversely, as here, a huge overlap signals that even if the difference were real, its PRACTICAL SIGNIFICANCE would be limited: a student drawn from the treated group has a little under seven chances in ten of beating the median of the control group.
Tick the exercises you have done or want to review: a free account, no password, keeps your ticks and your right answers from one visit to the next, tells you which chapter to tackle next and lets you ask for the exercise you are missing. Create your space, an email is enough.