# Student's t-Distribution: Definition, Formula and Examples

The t distribution is a continuous probability distribution that is symmetric and bell-shaped, with tails heavier than those of the normal distribution. It describes the behavior of a sample mean when the population standard deviation is unknown and is estimated from the data. As sample size grows, the t distribution converges to the standard normal distribution.

## Quick Answer

- The t distribution is a family of curves indexed by one parameter, the degrees of freedom ($\nu$ or df).
- It is symmetric around 0 and has a total area under the curve of 1 [1].
- With few degrees of freedom the tails are thick, so extreme values are more likely [1].
- As degrees of freedom increase, the tails thin out and the curve approaches the standard normal distribution [1][2].
- It is the reference distribution for t tests and confidence intervals for a mean when $\sigma$ is unknown.

## What the t Distribution Means

In plain terms, the t distribution tells you how far a sample mean is likely to sit from the true population mean when you have to estimate the spread from a small sample. It looks like the normal curve but with fatter shoulders and tails, which makes it more forgiving of the extra uncertainty that comes from estimating the standard deviation.

The precise definition starts with a normal population. Draw a random sample of size $n$ from a normal population with mean $\mu$, and let $s$ be the sample standard deviation. The quantity

$$t = \frac{\bar{x} - \mu}{s / \sqrt{n}}$$

follows a t distribution with $n - 1$ degrees of freedom [3]. There is a different t distribution for each sample size, so the t distribution is a class of distributions, and you must specify the degrees of freedom to identify a specific one [3]. The degrees of freedom come from the sample standard deviation $s$ in the denominator [3].

The substitution of $s$ for the unknown $\sigma$ is what creates the t distribution. Because $s$ varies from sample to sample and only approximates $\sigma$, the test statistic carries extra variability, so its distribution is no longer normal [1].

## How It Works

The probability density function of the t distribution is

$$f(x) = \frac{\Gamma\left(\frac{\nu+1}{2}\right)}{\sqrt{\nu\pi}\,\Gamma\left(\frac{\nu}{2}\right)}\left(1 + \frac{x^2}{\nu}\right)^{-\frac{\nu+1}{2}}$$

where $\nu$ is the degrees of freedom and $\Gamma$ is the gamma function [4]. The NIST handbook writes the same density using the beta function, $f(x) = (1 + x^2/\nu)^{-(\nu+1)/2} / (\sqrt{\nu}\,B(1/2, \nu/2))$, with $\nu$ a positive integer shape parameter [2].

Each symbol means the following.

| Symbol | Meaning |
|---|---|
| $x$ | A value of the t statistic, any real number |
| $\nu$ (df) | Degrees of freedom, a positive number |
| $\Gamma$ | The gamma function, a continuous extension of the factorial |
| $B$ | The beta function, defined as $B(\alpha,\beta)=\int_0^1 t^{\alpha-1}(1-t)^{\beta-1}dt$ [2] |

The cumulative distribution function has no simple closed form and is computed numerically [2]. In practice you use software or a printed table of critical values. The t distribution is symmetric in all cases, so tables list only positive critical values [2][5].

Two properties are worth remembering. The mean is 0, and the variance is $\nu/(\nu-2)$, which is defined only for $\nu > 2$ [2]. The variance is always greater than 1 and approaches 1 from above as the sample size increases [3].

## Worked Example

A lab runs 12 measurements of a solution concentration with a target value of $\mu = 5.0$. The measurements are:

| # | Measurement |
|---|---|
| 1 | 4.6 |
| 2 | 5.1 |
| 3 | 5.5 |
| 4 | 4.9 |
| 5 | 5.8 |
| 6 | 5.3 |
| 7 | 4.7 |
| 8 | 5.6 |
| 9 | 5.0 |
| 10 | 5.4 |
| 11 | 5.2 |
| 12 | 5.9 |

The steps are:

1. Sample size: $n = 12$.
2. Sample mean: $\bar{x} = 63.0 / 12 = 5.2500$.
3. Sample standard deviation: $s = \sqrt{\sum (x - 5.2500)^2 / 11} = 0.4123$.
4. Standard error: $SE = 0.4123 / \sqrt{12} = 0.1190$.
5. Degrees of freedom: $n - 1 = 11$.
6. t statistic: $(5.2500 - 5.0) / 0.1190 = 2.1004$.
7. Two-tailed p-value: $2 \times P(T > 2.1004)$ with 11 df $= 0.0596$.
8. Critical t at 95 percent, two-tailed: 2.2010.

```python
from scipy import stats
t = 2.1004
df = 11
p = 2 * stats.t.sf(abs(t), df)  # 0.0596
```

Output:

```
t = 2.1004, df = 11, two-tailed p = 0.0596, critical t = 2.2010
```

The observed t of 2.1004 falls short of the critical value of 2.2010, and the p-value of 0.0596 sits just above 0.05. At the 5 percent level you would fail to reject the null hypothesis that the true mean is 5.0, though the result is close enough to warrant a larger sample.

## How to Interpret It

The t statistic measures how many estimated standard errors the sample mean sits from the hypothesized mean. A large absolute value means the sample mean is far from the target relative to the noise in the data.

The p-value converts that distance into a probability. For a two-sided test you compare the absolute value of the test statistic to the critical value and reject the null hypothesis when it is greater [5]. For an upper one-sided test you reject when the statistic exceeds the table value, and for a lower one-sided test you reject when it falls below the negative of the table value [5].

The degrees of freedom control how demanding the test is. With 11 df the critical value is 2.2010. With 30 df it drops to about 2.042, and with a very large sample it approaches 1.96, the normal value. Small samples pay a penalty in the form of a wider critical region.

## When to Use It (and when not to)

Use the t distribution when you are working with a sample mean and the population standard deviation is unknown, which is the usual situation in real data. It underpins the one-sample t test, the two-sample t test, and confidence intervals for a mean. If you use the normal distribution for hypothesis testing instead of the t distribution, the probability of error becomes bigger [3].

The t distribution also appears in regression, where each coefficient estimate is tested with a t statistic whose degrees of freedom depend on the number of observations and predictors.

Do not use it when the population standard deviation is known and the data are normal. In that case the sampling distribution of the mean is exactly normal [3]. Do not use it for data that are heavily skewed or contain strong outliers unless the sample is large enough for the central limit theorem to help. And do not use it for variances or counts, which have their own distributions.

## t Distribution vs Normal Distribution

The two curves share a shape but differ in the tails and in what they assume.

| Feature | t distribution | Standard normal |
|---|---|---|
| Shape | Symmetric, bell-shaped, peak at 0 | Symmetric, bell-shaped, peak at 0 |
| Tails | Heavier, especially at low df | Lighter |
| Spread | Greater than the standard normal [3] | Fixed at variance 1 |
| Parameters | Degrees of freedom $\nu$ | None |
| Inputs | Uses sample standard deviation $s$ | Uses known population $\sigma$ |
| Convergence | Approaches normal as $\nu$ grows [1][2] | Is the limit |

For $n > 30$ the differences between the two are small [3]. The t distribution with $\nu = 1$ is much heavier-tailed than the normal, and the approximation becomes quite good for larger values of $\nu$ [2].

## Common Mistakes

- **Using the normal critical value 1.96 for a small sample.** The fix is to look up the t critical value for your degrees of freedom, which is larger and correctly accounts for the estimated standard deviation.
- **Forgetting to subtract 1 from the sample size.** For a one-sample test the degrees of freedom are $n - 1$, not $n$. Using $n$ makes the test too liberal.
- **Confusing a one-sided and two-sided critical value.** For a two-sided test at $\alpha = 0.05$ you use the column for $1 - \alpha/2 = 0.975$, not 0.95 [5]. Pick the column that matches your alternative hypothesis before you look at the data.
- **Treating the t distribution as a single fixed curve.** It is a family. Two t tests with different sample sizes use different curves and different critical values [3].
- **Applying a t test to badly skewed data with a tiny sample.** Check a plot first. With a small $n$ and strong skew, the t distribution is the wrong reference.
- **Reporting the p-value without the degrees of freedom.** The same t statistic means different things at different df, so always report both.

## Limitations

The t distribution assumes the underlying data come from a normal population. When that assumption fails badly and the sample is small, the nominal p-value and confidence level can be misleading. The heavier tails protect you against the extra uncertainty from estimating $\sigma$, but they do not correct for skew or outliers.

The distribution also says nothing about practical importance. A small p-value tells you the sample mean is unlikely under the null hypothesis, not that the difference matters in your field. And the t distribution is designed for means. It does not apply to variances, proportions, or counts, each of which needs a different distribution. If you want to run the numbers on your own data, the [T-Test Calculator](/tools/t-test-calculator) handles the arithmetic for you.

## Frequently Asked Questions

### What is the difference between the t distribution and the normal distribution?

Both are symmetric and bell-shaped, but the t distribution has thicker tails and a larger spread because it uses the sample standard deviation instead of the known population standard deviation [3]. As the sample size grows, the t distribution approaches the normal distribution [1][2].

### What are degrees of freedom in a t distribution?

Degrees of freedom measure how much independent information is available to estimate variability. For a one-sample t test they equal $n - 1$, and they come from the sample standard deviation in the denominator of the t statistic [3]. More degrees of freedom means a thinner-tailed curve and a smaller critical value.

### When should I use a t distribution instead of a z distribution?

Use the t distribution whenever the population standard deviation is unknown and you estimate it from the sample. Use the z (normal) distribution when $\sigma$ is known and the data are normal, because then the sampling distribution of the mean is exactly normal [3].

### Why does the t distribution have heavier tails?

The sample standard deviation $s$ varies from sample to sample and only approximates $\sigma$, which adds variability to the test statistic [1]. That extra variability makes extreme values more likely, which shows up as thicker tails. With fewer degrees of freedom the sample standard deviation varies more, so the tails are heavier [1].

### What is the mean and variance of the t distribution?

The mean is 0. The variance is $\nu/(\nu-2)$, which is defined only for $\nu > 2$ [2]. The variance is always greater than 1 and approaches 1 from above as the sample size increases [3].

For related background, see [Probability Distributions: Definition, Types and Examples](/blog/data-analysis/probability-distributions-explained), the [t Statistic Formula](/blog/data-analysis/t-statistic-formula), and the [One-Sample t-Test](/blog/guides/one-sample-t-test-formula-calculation-and-interpretation). The [Chi-Square Distribution](/blog/data-analysis/chi-square-distribution) is the analogous tool for variance and categorical tests, and [Understanding the t-Test](/blog/guides/understanding-the-t-test-meaning-assumptions-and-applications) covers the wider family of tests built on this distribution.

## References

1. [7.2: The Student’s T-Distribution - Statistics LibreTexts](https://stats.libretexts.org/Bookshelves/Introductory_Statistics/Introductory_Statistics_(Hannah_Seidler-Wright)/07%3A_Inference_Involving_a_Single_Population_Mean/7.02%3A_The_Students_T-Distribution)
2. [1.3.6.6.4. t Distribution](https://www.itl.nist.gov/div898/handbook/eda/section3/eda3664.htm)
3. [Student's T Distribution](https://www.me.psu.edu/casestudy/Statistics/t.htm)
4. [scipy.stats.t, SciPy v1.18.0 Manual](https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.t.html)
5. [1.3.6.7.2. Critical Values of the Student's-t Distribution](https://www.itl.nist.gov/div898/handbook/eda/section3/eda3672.htm)

## Further Reading

- [NIST/SEMATECH e-Handbook of Statistical Methods](https://www.itl.nist.gov/div898/handbook/index.htm)

## Related Articles

- [t Statistic Formula: Definition, Calculation and Examples](/blog/data-analysis/t-statistic-formula)
- [Probability Distributions: Definition, Types and Examples](/blog/data-analysis/probability-distributions-explained)
- [Chi-Square Distribution: Definition, Formula and Examples](/blog/data-analysis/chi-square-distribution)
- [Uniform Distribution: Definition, Formula and Examples](/blog/data-analysis/uniform-distribution)
- [Exponential Distribution: Definition, Formula and Examples](/blog/data-analysis/exponential-distribution)
- [Poisson Distribution: Formula and Examples](/blog/research-skills/poisson-distribution-formula-and-examples)
- [Understanding the t-Test: Meaning, Assumptions, and Applications](/blog/guides/understanding-the-t-test-meaning-assumptions-and-applications)
- [One-Sample t-Test: Formula, Calculation, and Interpretation](/blog/guides/one-sample-t-test-formula-calculation-and-interpretation)