T-Distribution Calculator
Calculate p-value from t-statistic.
Please enter a valid t-value
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?"
Two-Sample T-Test
"Do two groups have different means?"
Pooled: Welch: df calculated by formula (often non-integer)
Paired T-Test
"Is there a difference between paired measurements?"
(n = number of pairs)
Regression Coefficients
"Is a regression coefficient significantly different from zero?"
Confidence Intervals
Confidence intervals for means use t-distribution critical values when population SD is unknown.
T-Distribution vs. Normal
| Aspect | T-Distribution | Normal (Z) |
|---|---|---|
| Tails | Heavier | Lighter |
| Parameter | Degrees of freedom | None (standard) |
| Use | Small samples, σ unknown | Large 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:
| df | t* |
|---|---|
| 5 | 2.571 |
| 10 | 2.228 |
| 15 | 2.131 |
| 20 | 2.086 |
| 30 | 2.042 |
| 60 | 2.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
Where:
- = sample mean
- = hypothesized population mean
- = sample standard deviation
- = sample size
Two-Sample (Pooled)
Where is the pooled standard deviation.
Two-Sample (Welch)
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
- Critical Value Calculator (t*) — Find t* for any df
- Confidence Interval for Mean — Uses t-distribution
- CI for Difference in Means — Two-sample t
- P-Value from Z-Score Calculator — Large-sample alternative
- Degrees of Freedom Calculator — Calculate df
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.