Salick Academy

The zz-test needs the population standard deviation σ\sigma. In practice it is almost never known — so it is estimated by ss, and that extra uncertainty is exactly what the tt-distribution accounts for.

When to use the t-distribution

Use tt rather than zz when:

  • the population standard deviation σ\sigma is unknown and estimated by the sample ss, and
  • the sample is small (roughly n<30n < 30).

For large samples ss estimates σ\sigma well and the two tests agree, which is why tt and zz become interchangeable as nn grows.

The tt-distribution looks like the standard normal — symmetric, bell-shaped, centred on 0 — but has heavier tails. Extreme values are more likely, because ss itself varies from sample to sample.

As the degrees of freedom increase, the tt-distribution converges to the standard normal. By n=30n = 30 the difference is slight; by n=100n = 100 it is negligible.

Degrees of freedom

For a one-sample tt-test:

ν=n1\nu = n - 1

One degree of freedom is lost because xˉ\bar{x} was computed from the same data. Once the mean and n1n-1 of the values are fixed, the last value is determined — it is not free to vary.

For a paired test on nn pairs, ν=n1\nu = n - 1 as well, since the test is applied to the nn differences.

The one-sample t-test

t=xˉμ0s/nν=n1t = \frac{\bar{x} - \mu_0}{s/\sqrt{n}} \qquad \nu = n-1

A sample of 16 has mean 105 and standard deviation 12. Test at the 5% level whether the population mean exceeds 100.

1. Hypotheses. H0:μ=100H_0: \mu = 100; H1:μ>100H_1: \mu > 100 — one-tailed, since "exceeds" gives a direction.

2. Critical value. ν=15\nu = 15, one-tailed 5%: tcrit=1.753t_{\text{crit}} = 1.753.

3. Test statistic.

SE=1216=3t=1051003=1.67\text{SE} = \frac{12}{\sqrt{16}} = 3 \qquad t = \frac{105 - 100}{3} = 1.67

4. Compare. 1.67<1.7531.67 < 1.753, so the statistic is not in the critical region.

5. Conclude. Do not reject H0H_0: at the 5% level there is insufficient evidence that the population mean exceeds 100.

Confidence intervals using t

xˉ±tsn\bar{x} \pm t\,\frac{s}{\sqrt{n}}

with tt read at ν=n1\nu = n-1 for the required confidence level.

A 95% interval for the sample above:

ν=15\nu = 15, two-tailed 5%: t=2.131t = 2.131.

105±2.131(3)=105±6.39=(98.6, 111.4)105 \pm 2.131(3) = 105 \pm 6.39 = (98.6,\ 111.4)

Notice the interval contains 100 — consistent with the test's failure to reject H0H_0. The two methods must always agree.

The paired t-test

When the same subjects are measured twice — before and after a treatment, or by two methods — the observations are not independent, and a two-sample test would be wrong.

Instead, work with the differences d=x2x1d = x_2 - x_1 and apply a one-sample test to them:

t=dˉ0sd/nν=n1t = \frac{\bar{d} - 0}{s_d/\sqrt{n}} \qquad \nu = n - 1

testing H0:μd=0H_0: \mu_d = 0 — no average change.

Pairing is powerful because it removes the variation between subjects. Ten people's weights may differ enormously, yet their individual weight changes can be measured with precision.

Assumptions

Every tt-test assumes:

  1. The sample is random.
  2. The population is approximately normally distributed. This matters most for small samples; the Central Limit Theorem protects larger ones.
  3. The observations are independent — within the sample for a one-sample test, or between pairs for a paired test.

For a two-sample tt-test using a pooled estimate, a fourth assumption is added: the two populations have equal variances.