June 7th, 2026

What is a t-statistic?

The t-statistic is used in a t-test when deciding if you should support to reject a null hypothesis.

It measures how far a result is from a reference value after adjusting for variability.

It is used when there is a small sample size, or if the population standard deviation is unknown.

Who introduced the t-statistic?

  • William Sealy Gosset introduced it in 1908 while working at the Guinness Brewery in Dublin.
  • Strict policies prevented employees from publishing trade secrets or scientific research so he published it under the pseudonym “Student”
  • Barley came from different plots and farmers so he needed reliable way to estimate the mean and evaluate significance of small samples.
  • Ronald A. Fisher mathematically proved it in 1922.

T-statistic formula

There isn’t an exact formula for the t-statistic but they all follow a core structure.

\[t = \frac{estimate-hypothesized\ value}{standard\ error}\] Common t-test

  • One-Sample
  • Independent Two-Sample
  • Paired Sample

One-Sample t-test

\[t = \frac{\bar{x} - \mu_0}{s / \sqrt{n}}\]

Symbol Meaning
\(\bar{X}\) Sample mean
\(\mu_0\) Hypothesized population mean
\(s\) Sample standard deviation
\(n\) Sample size

Independent Two-Sample t-test

\[t = \frac{\bar{x_1} - \bar{x_2}}{\sqrt{\frac{s^2_1}{n_1} + \frac{s^2_2}{n_2}}}\]

Symbol Meaning
\(\bar{x_1}\), \(\bar{x_2}\) Sample means
\(s^2_1\), \(s^2_2\) Sample variances
\(n_1\), \(n_2\) Sample sizes

Paired Sample t-test

\[t = \frac{\bar{d} - \mu_d}{s_d / \sqrt{n}}\]

Symbol Meaning
\(\bar{d}\) Average of the difference between 2 observations
\(\mu_d\) Hypothesized mean difference
\(s_d\) Sample standard deviation of the differences
\(n\) Number of pairs

The t-Distribution

Probability density function

\[f(t \mid \nu) = \frac{\Gamma\!\left(\tfrac{\nu+1}{2}\right)} {\sqrt{\nu\pi}\;\Gamma\!\left(\tfrac{\nu}{2}\right)} \left(1 + \frac{t^2}{\nu}\right)^{-(\nu+1)/2}\]

  • For \(\nu \to \infty\), the t-distribution converges to \(N(0,1)\)
  • Heavier tails than normal for small \(\nu\) — accounts for extra uncertainty in estimating \(\sigma\)
  • Symmetric and bell-shaped, centred at 0

t-distribution Density

3D t-density surface

\(H_0\) Testing with the t-Statistic

Decision rule

We reject \(H_0: \mu = \mu_0\) at significance level \(\alpha\) when

\[|t_{\text{obs}}| > t_{\alpha/2,\; n-1}\]

where \(t_{\alpha/2,\; n-1}\) is the upper \(\alpha/2\) critical value of the t-distribution with \(n - 1\) degrees of freedom.

The two-tailed p-value is

\[p = 2\,P\!\left(T_{n-1} \geq |t_{\text{obs}}|\right)\]

Confidence Interval by the t-Statistic

Two-sided \(100(1-\alpha)\%\) confidence interval for \(\mu\)

\[\bar{X} \;\pm\; t_{\alpha/2,\; n-1} \cdot \frac{s}{\sqrt{n}}\]

The half-width \(h = t_{\alpha/2,\; n-1} \cdot s/\sqrt{n}\) shrinks as:

  • \(n\) increases (more data → more precision)
  • \(\alpha\) increases (less confidence → narrower interval)
  • \(s\) decreases (less variability → tighter interval)

A wider CI does not mean the interval is “bad” — it reflects uncertainty in small samples.

CI graph by Sample Size