The t-Test for a Mean
In real life you almost never know , so you estimate it with the sample's . That extra guesswork makes the statistic a bit more spread out than a z-score, so you compare it with a slightly wider curve, the t distribution with degrees of freedom.
What the symbols mean
- Test statistic
Standard errors between the sample mean and the claimed mean.
- Sample standard deviation
Stands in for the unknown σ.
Explanation
The t-test is simply the z-test from the last lesson for the realistic case where you don't know the population's standard deviation. Look at the formula: it's the same z-score with one swap, (the standard deviation you measured in your sample) in place of (the true one you don't have). The only other new piece is (degrees of freedom, which tells you which t curve to use, and grows with the sample size). It's also called Student's t, after the pen name William Gosset used when he published it, and "t" is simply the letter later attached to his statistic.
Why a different curve? Think about what happens when you estimate . In a small sample, could easily come out too small by luck, and dividing by a too-small number makes the statistic look more extreme than it really is. The t distribution accounts for that: it has fatter tails than the normal, so you need a more extreme statistic before you call it significant. With more data becomes a reliable estimate, and the t curve turns into the normal.
Decision by critical value. Instead of a p-value, compare with the critical value from a table: reject when the statistic falls beyond it. The two approaches always agree, since "beyond " is exactly "tail area less than ."
Assumptions: a random sample from a roughly normal population, or a large enough sample. Check for strong skew or outliers with a quick plot first; the t-test is sensitive to them in small samples.
A common mistake. It's tempting to use the z cutoff 1.96 whenever you have a t statistic, since it's the number you remember. With small samples that's too lenient. For the two-tailed cutoff is , and a of that would pass the z cutoff fails here.
See it
Worked examples
A cereal box should hold 368 g. A sample of 25 boxes has g and g. Test at (critical value , ).
- 1
The standard error is , so .
Practice
Type your answer and check it. Solve them all to complete the lesson.
, , , . Find the statistic.
How many degrees of freedom does that test have?
With critical value for the left-tailed test, what is the decision?
A sample of 9 has , . Test : find .
For that two-tailed test, (, ). Decision?
A coffee chain says its large cup holds 16 oz. A sample of 12 cups averages 15.6 oz with standard deviation 0.5 oz. Find the statistic for .
For the same cups, the 95% confidence interval is . What does it say about the claim of 16 oz?
The hardest one here. Get it, and you've got this lesson.
Five students' score improvements after a tutoring session are 2, 4, 1, 5 and 3 points. Compute the statistic for testing .
Where it's used
Manufacturers test whether products meet labeled amounts, and researchers test whether a treatment changes an average outcome.