A z‑test needs σ, the population standard deviation — and outside a handful of manufactured cases, nobody has it. So you do the obvious thing: you use s, the standard deviation of your own sample, and carry on. That single substitution has a price. Your sample mean was already bouncing around from sample to sample; now the ruler you measure it with bounces too, because s is just another estimate. Two moving parts instead of one means extreme values happen more often than the normal curve predicts, and the correct reference curve gets heavier tails. That curve is the t distribution, and it has one dial: degrees of freedom. Drag it below. At df = 1 the curve is almost unrecognisable; by df = 30 you have to look hard to see the difference; and as df grows the two curves become indistinguishable, because a big sample pins down s so tightly that it stops being a guess at all.
Two curves, one dial
Zoom in on the tail — that is the whole story
In the panel above, both curves look like the same hill; the difference lives out in the tails, where the heights are so small that pixels cannot show them. So here the vertical scale is squeezed logarithmically — every gridline down is ten times smaller than the one above it. Now the gap is unmissable. Notice too that the curves cross: near the middle the t curve is actually shorter than the normal, because the extra area it spends in the tails has to be taken from somewhere. Total area under each curve is still exactly 1.
Why the tails get fat: s wobbles
Here is one real sample of n observations, drawn from a population whose true mean is μ = 100 and whose true standard deviation is σ = 15. The pale band is the population; each dot is one observation. Both statistics below are computed from the same sample and measure the same gap — they differ only in what goes in the denominator. z divides by σ/√n, a fixed number you would never actually know. t divides by s/√n, computed from these dots. Draw sample after sample and watch: whenever this sample happens to come out unusually tight, s lands below σ, the denominator shrinks, and t is thrown farther out than z. Those are the draws that build the heavy tails.
Do the simulated t’s really follow the t curve?
One sample proves nothing. So repeat it: each run below draws a fresh sample of n observations from that same population, computes both statistics, and drops them into the histogram. The bars are the simulated t values. The dark line is the theoretical t curve for your df — nothing here was fitted to the bars, it is drawn straight from the formula. The grey outline is the same runs scored as z. If the theory is right, the bars should settle onto the dark line and stand visibly wider than the grey outline.
simulated t valuestheoretical t curvesame runs, scored as z
Samples drawn0
Share with |t| > cut—
Exact t probability—
Share with |z| > cut—
The t distributiondrag the degrees of freedom
The one dial
For a one‑sample t procedure, df = n − 1. Drag it, or press the arrow keys once the slider has focus.
8
Jump straight to a landmark
Confidence level / significance level
The numbers, computed live
Degrees of freedom—
Sample size n—n = df + 1
Critical value t*—
Critical value z*—df = ∞
t* is wider by—interval width penalty
SD of this curve—√(df / (df − 2))
Area beyond ±z*—
True cover of x̄ ± z*s/√n—
The table in the back of every textbook, built from scratch
Nothing below is stored. Every entry is the value of t that puts exactly the stated area in the two tails, found by inverting the t distribution on the spot. Your current row is highlighted; the last row is the normal curve, which is what the table converges to.
Read down any column and you are watching the same convergence the chart shows: the numbers fall fast at first, then crawl. Most of the distance from df = 1 to df = ∞ is covered by df = 10, and almost all of it by df = 30 — which is exactly where the old “n ≥ 30” folklore came from.
Say it right
Seven things people say about the t distribution. Three are correct. Tap each one.
The t curve in one lineIt is the curve that (x̄ − μ) ÷ (s/√n) actually follows when you had to estimate the standard deviation — the normal curve, widened by exactly enough to pay for that estimate, and un‑widened again as the estimate gets good.
What the dial is really counting
Why df = n − 1, and not n. The sample standard deviation is built from the deviations xi − x̄. Those n numbers are not free to be anything: by the definition of the mean, they must add to zero. Tell me any n − 1 of them and I can compute the last one without looking at your data. So although you wrote down n observations, only n − 1 independent pieces of information went into s — and that count, not the sample size, is what fixes the shape of the curve. Dividing by n − 1 instead of n when you compute s is the same idea wearing different clothes.
The direction of the error matters. Reaching for 1.960 when the honest critical value is larger does not make you cautious — it makes you reckless. Your cut‑off sits too close to the middle, so more results clear it than you bargained for: the tile above shows the real false‑alarm rate at your current df, and it is above α every time df is finite. The same slip in interval form gives you a “95%” interval that is too short and covers the truth less than 95% of the time. Both mistakes push in the direction of claiming more than your data support.
Where the “switch back to z at n = 30” rule came from — and why it is obsolete. When critical values had to be looked up in a printed table, tables ran out of rows; past df ≈ 30 the entries barely moved, so the bottom row was labelled ∞ and everyone used it. That was a printing convenience, not a statistical rule. If σ is unknown, the correct reference distribution is t at every sample size, and every piece of statistical software computes it that way. The rule is harmless in the sense that at df = 30 the error is small — check the tile: about 4% on the critical value — but there is no longer any reason to accept even that.
What t still assumes. Fat tails buy you protection against having estimated σ. They buy you nothing against the other assumptions. You still need independent observations from a random sample — no sample size and no widened curve repairs a biased sampling scheme. And you still need the sample mean to be approximately normally distributed, which follows automatically if the population is roughly normal, and follows from the Central Limit Theorem as n grows if it is not. The dangerous case is the one where both excuses fail at once: a small sample from a strongly skewed population, or a sample with a genuine outlier. t is reasonably robust to mild skew; it is not robust to outliers, because a single wild point moves x̄ and inflates s simultaneously.
One last thing worth noticing on the chart. The t curve is not just “the normal curve stretched sideways” — a stretched normal would still have thin, fast‑dying tails. Look at the logarithmic panel: far from zero, the normal curve dives away like e−x²/2 while the t curve descends gently, as a power of x. That is a difference in kind, not degree, and it is why the correction matters most exactly where you care most — out where the decisions get made.