Probability Distributions › The t-Distribution

Michael BrenndoerferMay 13, 20252 min read
Machine Learning from ScratchAll chapters
Part 1 of 9Statistics 101
Chapter 7Probability Distributions › The t-Distribution
Reading section 4 of 13 · The t-Distribution · 2 minSection 4 of 13 · 2 min

Book contents

Section 4 of 13 · 2 min read

Probability Distributions › The t-DistributionOne section · Sections in this chapter4 / 13 ↓
Reading tools Definitions & inline links

Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.

Article links

Make inline references clickable

While the normal distribution assumes known population parameters, real-world inference typically works with sample estimates that carry their own uncertainty. The t-distribution addresses this reality by accounting for the additional variability introduced when estimating the population standard deviation from sample data.

The probability density function for the t-distribution is:

f(x∣ν)=Γ(ν+12)νπ Γ(ν2)(1+x2ν)−ν+12f(x | \nu) = \frac{\Gamma(\frac{\nu+1}{2})}{\sqrt{\nu\pi}\,\Gamma(\frac{\nu}{2})} \left(1 + \frac{x^2}{\nu}\right)^{-\frac{\nu+1}{2}}

Where:

  • xx: The random variable
  • ν\nu: Degrees of freedom (typically n−1n-1 for a sample of size nn)
  • Γ\Gamma: The gamma function

The t-distribution resembles a normal distribution but with heavier tails, meaning it assigns higher probability to extreme values. This characteristic reflects the greater uncertainty present when working with small samples. As the degrees of freedom increase (corresponding to larger sample sizes), the t-distribution converges to the standard normal distribution, capturing the intuition that larger samples provide more reliable estimates.

Data scientists encounter the t-distribution primarily in hypothesis testing and confidence interval construction when sample sizes are modest (typically fewer than 30 observations) and the population standard deviation is unknown. The t-test for comparing group means, one of the most widely used statistical procedures, derives its name and theoretical foundation from this distribution. When reporting whether an observed difference between groups is statistically significant, researchers rely on the t-distribution to quantify how unusual the observed result would be under the null hypothesis.

Example: t-Distribution Visualization

Out[3]:
Visualization
Comparison plot showing t-distribution with heavier tails vs normal distribution.
t-distribution with 5 degrees of freedom (solid) compared to standard normal (dashed). The heavier tails of the t-distribution reflect additional uncertainty when estimating parameters from small samples. As degrees of freedom increase, the t-distribution converges to the normal distribution.