WordGPT

Student's t distribution

Student's t distribution: like the normal curve, but with heavier tails for small samples. With the default parameters (degrees of freedom ν = 5) its mean is 0 and its standard deviation 1.291. Use the simulator below to draw samples and see it take shape.

Simulate it

Change the parameters, then draw random samples. The bars are the samples; the line is the exact density. With more samples the bars settle onto it.

Samples to draw

00.10.20.30.4-6-4-20246x
Mean
sample - · exact 0
Standard deviation
sample - · exact 1.291

What is the Student's t distribution?

Student's t distribution looks like the standard normal bell curve but with heavier tails. It arises when you standardise a sample mean using the sample's own standard deviation instead of the unknown population value: the extra uncertainty from estimating the spread makes extreme values more likely.

It is controlled by one parameter, the degrees of freedom ν (for a one-sample test, n − 1). As ν grows the heavy tails disappear and the t distribution becomes the standard normal. It is the basis of t-tests and of confidence intervals for means.

Where it is used

  • Confidence interval for a mean when σ is unknown.
  • One-sample, two-sample and paired t-tests.
  • Testing the coefficients of a regression.
  • Modelling heavy-tailed data such as financial returns (as a robust alternative to the normal).

Shape and parameters

Symmetric around 0 like the normal. With ν = 1 it is the Cauchy distribution, which has no mean; the mean exists for ν > 1 and the variance ν/(ν − 2) for ν > 2. By ν around 30 it is already very close to the normal.

What it assumes

  • Data from a roughly normal population (the t procedures are fairly robust for moderate samples).
  • Independent observations.

How it relates to other distributions

  • Normal distribution: The limit as the degrees of freedom grow.
  • Chi-square distribution: A t variable is Z divided by √(χ²/ν).
  • F distribution: The square of a t variable with ν df is an F with (1, ν) df.

Common mistakes

  • Using the normal (z) critical value for a small sample, which makes the interval too narrow.
  • Using n instead of n − 1 for the degrees of freedom.
  • Confusing one-tailed and two-tailed critical values.

How to work it out

  1. 1

    The probability density function (the formula that gives the shape):

    f(x)=Γ ⁣(ν+12)νπ Γ ⁣(ν2)(1+x2ν)−ν+12f(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}}
  2. 2

    Its mean (the long-run average) and variance (the spread):

    μ=0 (ν>1),σ2=νν−2 (ν>2)\mu = 0\ (\nu>1),\qquad \sigma^2 = \frac{\nu}{\nu-2}\ (\nu>2)
  3. 3

    Worked example with the default parameters (degrees of freedom ν = 5): With 5 degrees of freedom, what is the probability that |T| exceeds 2.571?

    answer=0.0500\text{answer} = 0.0500
LaTeX source of the formulas on this page
\[ 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}} \]
\[ \mu = 0\ (\nu>1),\qquad \sigma^2 = \frac{\nu}{\nu-2}\ (\nu>2) \]
\[ \text{answer} = 0.0500 \]

At a glance

PropertyValue
TypeContinuous (measurements)
Parametersdegrees of freedom ν
Possible valuesall real numbers
Mean0
Variance1.6667
Standard deviation1.291
Example (degrees of freedom ν = 5)With 5 degrees of freedom, what is the probability that |T| exceeds 2.571? Answer: 0.0500.

How to compute it in Excel, Python and R

ToolFunction
Excel / Google Sheets=T.DIST(x, ν, TRUE) (T.INV.2T for the two-tailed critical value)
Python (SciPy)scipy.stats.t.cdf(x, df) (t.ppf for critical values)
Rpt(x, df) (qt for critical values)

Questions

What is the Student's t distribution used for?

Like the normal curve, but with heavier tails for small samples. Typical uses: Confidence interval for a mean when σ is unknown. One-sample, two-sample and paired t-tests. Testing the coefficients of a regression.

What are the mean and variance of the Student's t distribution?

Mean: μ = 0\ (\nu>1). Variance: σ² = (\nu)/(\nu-2)\ (\nu>2).

What does the Student's t distribution assume?

Data from a roughly normal population (the t procedures are fairly robust for moderate samples). Independent observations.

How do I calculate it in Excel?

=T.DIST(x, ν, TRUE) (T.INV.2T for the two-tailed critical value)

How is the Student's t distribution related to other distributions?

Normal distribution: The limit as the degrees of freedom grow. Chi-square distribution: A t variable is Z divided by √(χ²/ν). F distribution: The square of a t variable with ν df is an F with (1, ν) df.

Related distributions

Choosing a distribution

Tables

    Student's t distribution: what it is, when to use it, formulas and simulator | WordGPT