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.
CDF
mean 0 · variance 3 · sd 1.732 · mode 0 · entropy 1.773 nats
Formulas
| Parameters |
|
|---|---|
| Support | |
| 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
- Special case→ Cauchy: Student's with is the standard Cauchy. checked by code
- Limit→ Normal: As , Student's tends to the standard normal. checked by code
- Transformation← Chi-squared: If is standard normal and an independent Chi-squared(), is .
- Transformation→ F: If is , is F(). checked by code
- Special case← Multivariate t: Each coordinate of a multivariate is a scaled Student's with the same degrees of freedom: . checked by code
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?