Continuous distribution · also called t

Student's t distribution

The distribution of for a normal sample of size with : what you get when you standardize using an estimated standard deviation. It looks like the normal with heavier tails, more so for few degrees of freedom, and is also used as a robust, outlier-tolerant model for errors.

Student's t probability calculator

P(X ≤ 0) = 0.5

At the parameters set by the sliders. The shaded region on the plot is the probability; the dots on the CDF mark F at its ends.

PDF

00.10.20.3−6−4−20246f(x)mean

CDF

00.250.50.751−6−4−20246F(x)

mean 0 · variance 3 · sd 1.732 · mode 0 · entropy 1.773 nats

Formulas

Parameters
  • , the degrees of freedom
Support
PDF
CDF
Mean
Variance
Mode
MGF
Entropy

For use symmetry: .

Worked example

Eight measurements have mean 5.4 and standard deviation 1.2. Test whether the true mean could be 4.5 (two-sided).

on degrees of freedom. The p-value is : not significant at the 5% level, though a normal table would have said 0.034. answer checked by code

How it relates to others

All the relationships, as a diagram →

In Python

from scipy import stats
import numpy as np

X = stats.t(df=3)
X.pdf(1)  # f(1) = 0.2067
X.cdf(1)  # P(X ≤ 1) = 0.8045
X.mean(), X.var()  # 0, 3
X.ppf(0.95)  # 95th percentile
X.rvs(size=10, random_state=0)

rng = np.random.default_rng(0)
rng.standard_t(df=3, size=10)

Choosing between this and its neighbours? Which distribution for extremes and heavy tails? · Which distribution for measurements and errors? · Which prior distribution should I use?

← ArcsineF →