Comparing two means with t and F tests
Ask the tutor about Comparing two means with t and F testsOpen the graphing workbench
Empirical correlation and regression asks whether two measurement sequences move together. The second basic question is different: do the underlying random variables differ in a way that matters? This page checks the standard deviations first, then the means.
Both tests below assume the two series come from normally distributed random variables and , the case a probability-paper check is meant to clear. Write the series as and , with empirical means and empirical standard deviations and .
Square the larger spread
Form the ratio of the larger empirical standard deviation to the smaller one, and square it:
Look up the bold-faced table value with degrees of freedom and .
- If , the standard deviations are not the same; the difference has a deeper meaning.
- If , take the standard deviations as essentially the same.
Both statements carry an error probability of : in about such situations, roughly two conclusions will be wrong.
Example. The medicine table below has and , so . For the table gives . Because , treat the two spreads as the same.
Drag and . The blue point sits at on the axis; the gray mark is the critical value .
A shared spread turns the mean gap into
Now assume, in addition, that the two normal variables share one standard deviation (the F-test just checked that). Form
Choose a small error probability and look up with .
- If , the means of and differ significantly; the gap is not just random scatter.
- If , the means do not differ significantly.
An error probability means that in such tests, about conclusions will be wrong. Taking therefore risks being wrong about once in a hundred times.
Example. Fifteen patients on medicine A and fifteen on medicine B give
| mean | |||
|---|---|---|---|
| medicine A | |||
| medicine B |
(The means are days until recovery.) Substituting into the formula with the positive gap yields . For and , the -table gives . Because , the means differ significantly: medicine A is better than B.
Drag the mean gap and the two spreads. The blue point sits at ; the gray mark is the critical value . Passing that mark to the right is the significant-difference case.
Drop normality and the t-test stops
The -test applies only to normally distributed quantities. The Wilcoxon test is much more general: it can check whether two sequences come from variables with different distributions. A fuller account of that test comes later. The numerical and tables themselves belong to a later section.