← SciSim / Statistics
t-Distribution
📊 Tier: Standard Undergraduate
§1 Interactive Simulation
Degrees of freedom
10
Mean
0
Variance df/(df-2)
1.25
P(|T|>t)
t_{0.025,df}
Samples n
0
Degrees of freedom ν 10
t query value 2
Speed 20/s
§2 The Idea, Step by Step

Suppose you want the average height of everyone at a giant school, but you can only measure a few students. With just a handful of measurements your guess could easily be off — and you can't even be sure how off, because you also had to guess how spread out the heights are. The t-distribution is the honest math that says: "with this little data, stay humble — the truth might be further away than the usual bell curve suggests."

BUILD IT UP

From a sample we get a sample mean $\bar{X}$ and we estimate the spread with the sample standard deviation $S$ — because the true spread $\sigma$ is unknown. We then form the standardized score $t=(\bar{X}-\mu)/(S/\sqrt{n})$. If we somehow knew $\sigma$ exactly, this score would follow the familiar bell curve $N(0,1)$. But because we estimated $S$ from the same small sample, the score wobbles a little more, so it follows a slightly wider bell with heavier tails: the t-distribution. The one dial that sets its shape is the degrees of freedom $\nu=n-1$ — small $n$ means small $\nu$ means fatter tails.

A WORKED NUMBER

Take a sample of $n=11$, so $\nu=10$. The cutoff that captures the middle 95% of the t-curve is $t_{0.025,10}=2.228$, noticeably wider than the normal's $1.960$. So your 95% confidence interval comes out about $2.228/1.960\approx 1.14$, i.e. roughly 14% wider — that extra width is the honest price of not knowing $\sigma$.

THE PRECISE PICTURE

Formally $t=Z/\sqrt{V/\nu}$, where $Z\sim N(0,1)$ and $V\sim\chi^2_\nu$ are independent. The random denominator is what pushes probability out into the tails: they fall off polynomially like $(1+t^2/\nu)^{-(\nu+1)/2}$ instead of the Gaussian's much faster $e^{-t^2/2}$. As $\nu\to\infty$, $S$ becomes a reliable estimate of $\sigma$, the extra wobble vanishes, and the t-curve relaxes back into the normal. The ν slider above is exactly this dial, and the t query slider lets you read off tail probabilities.

TRY THIS IN THE SIM ABOVE

(1) Set $\nu=1$ and open the Tail Comparison tab — that red curve is the Cauchy distribution, so heavy-tailed it has no finite mean. (2) Drag $\nu$ from 1 up toward 100 and watch the red t-curve melt onto the dashed normal. (3) On the Live Sampling tab, press Play with $\nu=3$ and notice how often samples land far out in the tails compared to what a normal would allow.

§3 Mathematical Derivation

Student's t-Distribution — William Gosset "Student", 1908

If $Z\sim N(0,1)$ and $V\sim\chi^2_\nu$ independently: $T=Z/\sqrt{V/\nu}\sim t_\nu$

$$\boxed{f(t;\nu)=\frac{\Gamma\!\left(\frac{\nu+1}{2}\right)}{\sqrt{\nu\pi}\,\Gamma\!\left(\frac{\nu}{2}\right)}\left(1+\frac{t^2}{\nu}\right)^{-\frac{\nu+1}{2}},\quad t\in\mathbb{R}}$$

$E[T]=0$ (ν>1), $\text{Var}(T)=\nu/(\nu-2)$ (ν>2)

ν (df)t_{0.025,ν}Var(T)Compared to Normal
1 (Cauchy)12.706Extremely heavy tails
52.5715/3≈1.67Noticeably heavier
102.22810/8=1.25Moderately heavier
302.04230/28≈1.07Nearly normal
1.9601Exactly normal
DERIVATION

From the one-sample t-test: $T=(ar{X}-\mu)/(S/\sqrt{n})$. Since $Z=(ar{X}-\mu)/(\sigma/\sqrt{n})\sim N(0,1)$ and $V=(n-1)S^2/\sigma^2\sim\chi^2_{n-1}$ are independent (Cochran's theorem), $T=Z/\sqrt{V/(n-1)}\sim t_{n-1}$.

HEAVY TAILS

At ν=1: $t_1$ is the Cauchy distribution — no finite mean or variance. As ν→∞: $t_ u o N(0,1)$. The tails decay as $t^{-( u+1)}$ — polynomial, much heavier than the Gaussian $e^{-t^2/2}$. This is why critical values like $t_{0.025,5}=2.571$ are larger than $z_{0.025}=1.960$.

Worked Example

Find P(T > 2.228) for T ~ t_{10}:

From the t-table: P(T > 2.228) = 0.025 (one-tailed). So P(|T| > 2.228) = 0.05.

Compare: P(|Z| > 2.228) = 2(1-Φ(2.228)) ≈ 0.026 — slightly less. The t-distribution assigns more probability to the tails.

Hogg, McKean & Craig — Introduction to Mathematical Statistics, Ch. 4.4
Casella & Berger — Statistical Inference, Ch. 5.3
§4 FAQ
§5 Misconceptions & Common Errors
❌ Misconception 1

"t-distribution is just a fatter normal — they're basically the same."
At ν=1 (Cauchy), the t-distribution has NO finite mean or variance — radically different from normal. At ν=5, tail probability P(|T|>3)=0.030 vs P(|Z|>3)=0.003 — 10x more. The difference matters for small samples. Only for ν≥100 are they practically indistinguishable.
📖 Hogg, McKean & Craig — Ch. 4.4

❌ Error 1

Using df=n instead of df=n-1 for one-sample t-test
✅ One sample: df=n-1. Two sample (equal var): df=n₁+n₂-2. Paired: df=n-1 (n pairs). Wrong df → wrong critical values → wrong p-values.
🔍 Looking up t_{n} instead of t_{n-1}.

❌ Error 2

Using the normal table when σ is unknown (z-test instead of t-test)
✅ When σ is unknown (nearly always), use the t-distribution. For n>100 the difference is negligible, but for n=10 the critical value difference (2.228 vs 1.960) is substantial — using z inflates Type I error.
🔍 Using z=1.96 for any hypothesis test regardless of whether σ is known.

❌ Error 3

Not realizing t_{ν=1} is the Cauchy distribution
✅ t with ν=1 df equals the Cauchy distribution — it has no finite mean or variance. This is relevant for regression with 1 df for residuals, or for understanding why df matters so much for small samples.
🔍 Treating t_{1} as approximately normal.

Casella & Berger — Statistical Inference, Ch. 5.3
Hogg, McKean & Craig — Ch. 4.4, 8.1