T-Distribution Calculator

Calculate p-value from t-statistic.

Please enter a valid t-value

Examples:

Enter t-value and degrees of freedom

What Is the T-Distribution?

The t-distribution (Student's t) is a probability distribution used for statistical inference when sample sizes are small and the population standard deviation is unknown. It resembles the normal distribution but has heavier tails—accounting for extra uncertainty from estimating the population SD.

Key parameter: Degrees of freedom (df), typically n - 1 for a single sample.

As df increases, the t-distribution approaches the standard normal. For df > 30, the differences are small.

From T-Statistic to P-Value

This calculator converts a t-statistic to a p-value, given the degrees of freedom.

Example: t = 2.45, df = 20

Two-tailed p-value: P(|T| > 2.45) = 0.024 One-tailed p-value: P(T > 2.45) = 0.012

One-Tailed vs. Two-Tailed

Two-Tailed Test

Tests for any difference (positive or negative):

  • H₀: μ = μ₀ vs. H₁: μ ≠ μ₀
  • P-value = 2 × P(T > |t|)

Most common in practice.

One-Tailed Test

Tests in a specific direction:

  • Right-tailed: H₀: μ ≤ μ₀ vs. H₁: μ > μ₀
  • Left-tailed: H₀: μ ≥ μ₀ vs. H₁: μ < μ₀
  • P-value = P(T > t) or P(T < t)

Use only with strong prior justification.

Applications

One-Sample T-Test

"Is the sample mean significantly different from a hypothesized value?"

t=xˉ−μ0s/n,df=n−1t = \frac{\bar{x} - \mu_0}{s/\sqrt{n}}, \quad df = n - 1

Two-Sample T-Test

"Do two groups have different means?"

Pooled: df=n1+n2−2df = n_1 + n_2 - 2 Welch: df calculated by formula (often non-integer)

Paired T-Test

"Is there a difference between paired measurements?"

t=dˉsd/n,df=n−1t = \frac{\bar{d}}{s_d/\sqrt{n}}, \quad df = n - 1 (n = number of pairs)

Regression Coefficients

"Is a regression coefficient significantly different from zero?"

t=β^SE(β^),df=n−k−1t = \frac{\hat{\beta}}{SE(\hat{\beta})}, \quad df = n - k - 1

Confidence Intervals

Confidence intervals for means use t-distribution critical values when population SD is unknown.

T-Distribution vs. Normal

AspectT-DistributionNormal (Z)
TailsHeavierLighter
ParameterDegrees of freedomNone (standard)
UseSmall samples, σ unknownLarge samples, σ known
As df → ∞Approaches normal—

Key differences:

  • t-distribution has heavier tails → larger critical values → wider CIs
  • df = 5: t* = 2.57 vs. z* = 1.96 (for 95%)
  • df = 30: t* = 2.04 vs. z* = 1.96

Critical T-Values

For two-tailed 95% confidence:

dft*
52.571
102.228
152.131
202.086
302.042
602.000
∞1.960

The Critical Value Calculator (t*) provides values for any df and confidence level.

Historical Development

William Sealy Gosset (1876-1937) developed the t-distribution in 1908 while working at Guinness Brewery in Dublin. Tasked with analyzing small batches of barley, he needed a method for small samples.

Publishing under "Student" (Guinness prohibited employees from publishing), his paper "The Probable Error of a Mean" introduced what we now call Student's t-distribution.

Ronald Fisher later generalized Gosset's work, introducing degrees of freedom and integrating the t-distribution into his broader framework.

Before Gosset's work, valid inference required large samples or known population variance—both rare in practice. His contribution enabled rigorous analysis of small samples.

Degrees of Freedom Explained

Degrees of freedom represent "free" pieces of information after constraints.

For a sample of n:

  • You estimate the mean (1 constraint)
  • n - 1 values are free to vary
  • df = n - 1

For comparing two samples:

  • Two means estimated
  • df = n₁ + n₂ - 2 (pooled)

Higher df → more information → t-distribution closer to normal.

Calculating T-Statistics

One-Sample

t=xˉ−μ0s/nt = \frac{\bar{x} - \mu_0}{s/\sqrt{n}}

Where:

  • xˉ\bar{x} = sample mean
  • μ0\mu_0 = hypothesized population mean
  • ss = sample standard deviation
  • nn = sample size

Two-Sample (Pooled)

t=xˉ1−xˉ2Sp×1n1+1n2t = \frac{\bar{x}_1 - \bar{x}_2}{S_p \times \sqrt{\frac{1}{n_1} + \frac{1}{n_2}}}

Where SpS_p is the pooled standard deviation.

Two-Sample (Welch)

t=xˉ1−xˉ2s12n1+s22n2t = \frac{\bar{x}_1 - \bar{x}_2}{\sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}}

With complex df formula.

Relationship to Other Distributions

Normal: T approaches normal as df → ∞

F-distribution: T² with df follows F(1, df)

Chi-square: T = Z/√(χ²/df), connecting normal and chi-square

Non-Central T-Distribution

When the true mean ≠ hypothesized mean, the t-statistic follows a non-central t-distribution. This is used in:

  • Power analysis
  • Confidence intervals for effect sizes
  • Sample size calculations

Related Calculations

Summary

The t-distribution is essential for inference with small samples and unknown population standard deviation. Its heavier tails produce wider confidence intervals and more conservative p-values than the normal distribution, appropriately reflecting additional uncertainty. The distribution is parameterized by degrees of freedom—higher df means less uncertainty and convergence toward the normal. Whether testing hypotheses, constructing confidence intervals, or assessing regression coefficients, the t-distribution provides the foundation for most real-world statistical inference.