Calculator

Student's t Distribution Calculator Online

Calculate density, cumulative probability and critical values for the t distribution based on its degrees of freedom.

Settings

Calculator focused on this distribution.

Result and visualization

Calculate PDF/PMF, CDF and percentiles instantly.

Result pending…

Explanation

The Student's t distribution is a continuous distribution, symmetric around zero, similar to the standard normal but with heavier tails. This reflects the extra uncertainty that exists when the population variance is unknown and is estimated from the sample. The parameter governing it is the degrees of freedom \( \nu \), which in the most common case (a sample of size \( n \)) equal \( n - 1 \). The more degrees of freedom, the closer the t distribution gets to the standard normal: from \( \nu \approx 30 \) onward the practical difference is minimal.

It is mainly used in three contexts: (1) confidence intervals for a mean when \( \sigma \) is unknown; (2) hypothesis tests on means (one-sample t-test, independent two-sample t-test, or paired-samples t-test); and (3) inference on regression coefficients. The heavy tails make the critical values of t larger than those of the normal for the same significance level, producing wider confidence intervals and more conservative decisions when the sample is small.

Formula

$$ 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)^{-(\nu+1)/2} $$

Parameters

  • ν (nu): degrees of freedom of the distribution.

Worked example

Situation: The reaction time (in ms) of a sample of \(n = 10\) drivers is measured. Assuming the population variance is unknown, the test statistic follows a Student's \(t\) distribution with \(\nu = n - 1 = 9\) degrees of freedom.

Question 1: What is the cumulative probability \(P(T \leq 2.262)\) with \(\nu = 9\)?

Solution: Looking up the CDF of \(t_{9}\) at \(t = 2.262\): \[ P(T \leq 2.262) \approx 0.975 \] That is, 97.5% of the values of the \(t_9\) distribution lie below 2.262. Equivalently, the right tail is \(P(T > 2.262) = 0.025\).

Question 2: What is the critical value \(t^*\) for a two-tailed test at level \(\alpha = 0.05\) with \(\nu = 9\)?

Solution: In a two-tailed test at 5% we need the quantile that leaves \(\alpha/2 = 0.025\) in each tail, that is \(P(T \leq t^*) = 0.975\): \[ t^*_{0.025,\,9} = 2.262 \] If the statistic \(|t_{\text{obs}}| > 2.262\), we reject \(H_0\) at the 5% level.

Interpretation: With only 9 degrees of freedom the tails of the \(t\) distribution are heavier than those of the standard normal (where the two-tailed critical value at 5% would be 1.96). As \(\nu\) grows, \(t_\nu\) converges to the standard normal and the critical values approach \(\pm 1.96\).

How to interpret the result

The calculator offers three types of output. The PDF value, \( f(t) \), is a probability density: it indicates how concentrated the t distribution is around a specific value. Since it has heavier tails than the normal, the density near zero is somewhat lower than in the standard normal, but extreme values have higher density than under the normal. The chart shows the full curve; the green region corresponds to the selected range.

The CDF, \( P(T \leq t) \), gives the probability that the t statistic is less than or equal to \( t \). In statistical inference, this value is used directly to obtain the p-value of a left-tailed test. The right tail \( P(T > t) = 1 - P(T \leq t) \) is the p-value for a right-tailed test, and \( 2 \cdot P(T > |t|) \) is the two-tailed p-value. With few degrees of freedom the tails are substantially heavier than in the standard normal, so the same value of \( t \) produces a larger p-value (a less significant result).

The quantile result is the most common one in practice: given a confidence level \( 1-\alpha \), the calculator returns the critical value \( t^* \) such that \( P(T \leq t^*) = p \). For example, for a two-tailed test at 95% with 10 degrees of freedom, the critical value is \( t^* \approx 2.228 \). If the statistic in your test exceeds that value in absolute terms, you reject the null hypothesis at the 5% level.

Frequently asked questions

  • When should I use the t instead of the normal? When the population standard deviation σ is unknown and you estimate it with the sample s, especially for small samples. The t has heavier tails to reflect that extra uncertainty.
  • What are degrees of freedom? The number of independent pieces of information available to estimate variability; for a single sample of size n they equal n − 1. They control how heavy the tails of the distribution are.
  • What happens as the degrees of freedom grow? The t converges to the standard normal: beyond 30 degrees of freedom the two are nearly indistinguishable, and t critical values approach the z ones (for example, 1.96 for 95%).

Reference: Student's t-distribution — Wikipedia