Student's t Distribution, Explained
After reading this you can compute a p-value from a t statistic, find the critical value for a chosen significance level, and know when the t distribution is the right choice instead of the normal.
What the t distribution is
The t distribution describes how a sample mean behaves when you estimate the standard deviation from the same small sample. When you know the population standard deviation, a standardized mean follows the standard normal distribution. When you do not know it and must estimate it, the extra uncertainty makes the distribution wider in the tails. That wider distribution is Student's t.
The shape depends on one number: the degrees of freedom, written \nu or df. Small df gives heavy tails. Large df looks almost exactly like the standard normal.
Here is the hook. Suppose you run a small study with 11 measurements, giving df = 10. You get a t statistic of 2.228. With a normal distribution, a value of 2.228 sits far out: the two-tailed probability is about 0.026. With the t distribution at df = 10, that same value gives a two-tailed probability of exactly 0.05. The heavier tails make the result less surprising, so you need a larger t before you reject a null hypothesis.
When to use it, and when not
Use the t distribution when all three of these hold: you are working with a mean (or a difference of means, or a regression coefficient), the population standard deviation is unknown and estimated from the data, and the underlying data is roughly normal or the sample is large enough for the mean to be roughly normal.
The main settings are the one-sample t test, the two-sample t test, paired tests, and confidence intervals for a mean. Regression software reports a t statistic and a p-value for every coefficient using this distribution.
If you know the population standard deviation, use the Normal calculator or the Z-Score calculator instead. In practice you rarely know it, so the t distribution is the usual choice for means.
Do not use it for counts (see the Poisson and Binomial calculators), for variances (use the Chi-Square calculator), or for comparing two variances (use the F calculator).
The formula and the intuition
The t statistic for one sample compares the sample mean to a hypothesized value:
Here \bar{x} is the sample mean, \mu_0 is the value under the null hypothesis, s is the sample standard deviation, and n is the sample size. The degrees of freedom are \nu = n - 1. The denominator s / \sqrt{n} is the standard error of the mean.
The density of the t distribution is:
The symbol \Gamma is the gamma function, which extends the factorial. The only free part that matters for intuition is the term (1 + t^2/\nu)^{-(\nu+1)/2}. As \nu grows, that term approaches e^{-t^2/2}, which is the shape of the standard normal. That is why the footnote on the calculator says the t distribution approaches the normal for large df.
You do not evaluate this density directly for a test. You integrate it to get a tail area, which is the p-value.
Worked example: reproducing the demo
p-value from t = 2.228 at df = 10
The demo uses df = 10 and t = 2.228. Follow these steps.
- Find the right-tail area beyond
2.228. Fordf = 10this area is0.0250. - The t distribution is symmetric, so the left tail beyond
-2.228is also0.0250. - For a two-tailed test, add both tails:
0.0250 + 0.0250 = 0.0500. - For a one-tailed test in the direction of the observed effect, report just
0.0250.
So the two-tailed p-value is 0.05. If your significance level is \alpha = 0.05, this result sits exactly on the boundary.
Critical value from α = 0.05 at df = 10
Switch to critical-value mode with \alpha = 0.05 and df = 10. For a two-tailed test, put \alpha/2 = 0.025 in each tail. The value of t that leaves 0.025 in the upper tail is 2.228. That is where the demo t statistic comes from: it is the two-tailed critical value for these settings, so the p-value lands right at 0.05.
Reading and interpreting the results
Two numbers come out of this calculator, depending on mode.
- p-value
- The probability of getting a t statistic at least as extreme as yours if the null hypothesis is true. Small p means the data would be unusual under the null. At
df = 10, a t of2.228gives a two-tailed p of0.05; a t of3.169gives0.01. - Critical value
- The cutoff for t at a chosen \alpha. If your observed t exceeds the critical value in absolute size, you reject the null. At
df = 10and two-tailed \alpha = 0.05, the cutoff is2.228.
Decide one-tailed versus two-tailed before you see the data. A two-tailed test splits \alpha across both tails, so each tail holds \alpha/2. A one-tailed test puts all of \alpha in one tail, which lowers the cutoff. At df = 10, the one-tailed 5% cutoff is 1.812, smaller than the two-tailed 2.228.
| df | Critical t | Gap above 1.960 |
|---|---|---|
| 1 | 12.71 | 10.75 |
| 2 | 4.303 | 2.343 |
| 5 | 2.571 | 0.611 |
| 10 | 2.228 | 0.268 |
| 30 | 2.042 | 0.082 |
| 100 | 1.984 | 0.024 |
Common mistakes
The most frequent error is doubling or not doubling the tail area by accident. A calculator that reports a one-tailed p of 0.025 and a hypothesis stated as two-tailed need to agree. Decide the test direction first, then match the p-value to it.
A second mistake is using the wrong degrees of freedom. For a one-sample test with n = 11, use df = 10, not 11. For a paired test with 11 pairs, again df = 10. For a two-sample test with equal variances, \nu = n_1 + n_2 - 2, and with unequal variances the Welch approximation gives a fractional df that you round down or keep as a decimal.
A third mistake is reaching for the normal distribution with a small sample. At df = 5 the two-tailed 5% cutoff is 2.571, not 1.960. Using 1.960 there would reject the null too often, inflating your false positive rate well past 5%.
A fourth mistake is treating a p-value as the probability that the null is true. It is not. It is the probability of the data (or more extreme) given the null.
Related calculators
For known-variance problems, use the Normal calculator. To convert values, percentiles and areas directly, the Z-Score calculator is quicker. For a memory of the normal spread, the Empirical Rule calculator covers the 68-95-99.7 ranges.
For tests on variances use the Chi-Square calculator, and for ratios of variances or ANOVA use the F calculator. For non-mean data, see the Gamma, Beta, Exponential, Weibull, Log-Normal, Uniform, Geometric, Hypergeometric, and Negative Binomial calculators.
Frequently asked questions
How do I get degrees of freedom for a t test?
For one sample or a paired test, df = n - 1. For two independent samples with pooled variance, df = n1 + n2 - 2. For Welch's unequal-variance test, the software gives a decimal df from a formula that weights the two standard errors.
Why is my t p-value larger than the normal p-value?
The t distribution has heavier tails, so a given t value has more area beyond it. At df = 10, t = 2.228 gives two-tailed 0.05, while the normal gives about 0.026 for the same value. The gap shrinks as df grows.
When does t become effectively normal?
By df = 100 the two-tailed 5% cutoff is 1.984, only 0.024 above the normal 1.960. Beyond a few hundred, the difference is negligible for most work.
Should I use one-tailed or two-tailed?
Use two-tailed unless you have a specific directional prediction stated before collecting data. Two-tailed is the safer default and is what most reported p-values assume.
Can t statistics be negative?
Yes. A negative t just means the sample mean fell below the hypothesized value. Because the distribution is symmetric, the tail area for -2.228 equals the tail area for +2.228.