t, chi-square & F distribution calculator

t, chi-square and F distribution calculator: tail areas, p-values, densities and critical values, plus exponential and uniform distributions.

Drafted with AI writing toolsUpdated Checked examples: 9

Try
Result
Result: 0.968961
Maximum decimal places: 6; Nearest, ties away from zero
Complement 1 − P
0.031039
Mean
0
Variance
1.25

96.8961% of the Student t (ν = 10) distribution lies at or below 2.1.

P(X ≤ 2.1)

00.10.20.3-4-2024xDensityx = 2.1
How it's calculated S
  1. Distribution

    Student t (ν = 10)

  2. CDF

    F(t)=1−12Iν/(ν+t2) ⁣(ν2,12) (t≥0)F(t) = 1 - \tfrac12 I_{\nu/(\nu+t^2)}\!\left(\tfrac{\nu}{2}, \tfrac12\right)\ (t \ge 0)
  3. Area to the left

    P(X≤2.1)=0.968961377899P(X \le 2.1) = 0.968961377899

About the t, chi-square & F distribution calculator

Each result is read from a continuous distribution's density curve: the cumulative probability F(x) = P(X ≤ x), the upper tail, the area between two values, the density itself, or, in inverse mode, the value x with a given area to its left. For Student t, χ² and F the areas come from the regularized incomplete beta and gamma functions evaluated using 50-digit decimal arithmetic; exponential and uniform areas have closed forms.

These are the reference distributions of the common tests: t for means, χ² for counts and variances, F for ANOVA and regression. The default, t with 10 degrees of freedom, puts 96.90% of the area below 2.1, so a t statistic of 2.1 has a one-sided p-value of 0.031.

Printed tables round to three or four figures and list only selected degrees of freedom. Here any positive value works, including the fractional degrees of freedom of Welch's t-test.

How to find a t, chi-square or F critical value

A critical value is the point with a chosen area to its left. For a two-sided t test at level α, take the 1 − α/2 quantile; for a one-sided test, 1 − α. With 10 degrees of freedom and α = 0.05, the 0.975 quantile is 2.228, so |t| > 2.228 is significant.

Chi-square and F tests reject only in the right tail, so their critical value is the 1 − α quantile. At α = 0.05 that is 18.307 for chi-square with 10 degrees of freedom and 2.711 for F with 5 and 20.

How to get a p-value from a test statistic

The p-value is the tail area beyond the observed statistic, on the side the alternative hypothesis points to:

  • Right-tailed test: P(X ≥ x)
  • Left-tailed test: P(X ≤ x)
  • Two-sided t test: 2 × P(T ≥ |t|)

A t of 2.1 with 10 degrees of freedom has 0.968961 of the area below it. The right tail is 0.031039, so the one-sided p-value is 0.0310 and the two-sided p-value is 0.0621.

At α = 0.05 the one-sided test rejects and the two-sided test does not. That is why the tail is fixed before the data are seen.

For chi-square and F the p-value is the right tail alone. A chi-square of 3.84 with 1 degree of freedom has p = 0.0500.

Critical values at α = 0.05

  • t, two-sided: 2.228 at 10 df and 2.042 at 30 df, approaching the normal 1.960 as df grows.
  • t, one-sided: 1.812 at 10 df.
  • Chi-square, 1 df: 3.841, or 6.635 at α = 0.01 and 2.706 at α = 0.10.
  • Chi-square, 10 df: 18.307.
  • F: 2.711 for (5, 20) and 4.558 for (20, 5).

Degrees of freedom for common tests

  • One-sample or paired t: n − 1.
  • Two-sample t, pooled variance: n₁ + n₂ − 2. Welch's test gives a fractional df, which is used as it is.
  • Chi-square goodness of fit: number of categories − 1, minus one more for each parameter estimated from the data. Test of independence: (rows − 1) × (columns − 1).
  • One-way ANOVA F: d₁ = k − 1 for k groups and d₂ = N − k for N observations.

The order of F's degrees of freedom matters. d₁ belongs to the numerator variance, and swapping them changes the 0.95 quantile from 2.711 to 4.558.

How the t distribution differs from the normal

Student's t has heavier tails because it allows for a standard deviation estimated from the sample. With 5 degrees of freedom, 10.2% of the area lies beyond ±2, against 4.55% for the standard normal.

The tails thin as degrees of freedom grow. At 1 df, t is the Cauchy distribution and has no mean; at 2 df or fewer it has no finite variance. Above 2 df the variance is df ÷ (df − 2), which is 1.25 at 10 df (NIST).

Chi-square and F shapes

Chi-square values are never negative, and the curve is skewed right. Its mean equals the degrees of freedom and its variance is twice that, so 10 and 20 at 10 df (NIST).

F is the ratio of two variance estimates. Its mean is d₂ ÷ (d₂ − 2) when d₂ > 2, which is 1.111 for (5, 20), and its variance is finite only when d₂ > 4 (NIST).

Exponential and uniform distributions

The exponential distribution models waiting times at a constant rate λ: P(X ≤ x) = 1 − e^(−λx). At 0.5 arrivals per minute, the chance of waiting at most 2 minutes is 1 − e^(−1) = 0.632121.

The mean wait is 1/λ = 2 minutes and the median is ln 2 ÷ λ = 1.386 minutes. The rate and x must use the same time unit: a rate per hour gives waiting times in hours.

The uniform distribution spreads probability evenly between a and b, so an interval's probability is its share of the width. Between 0 and 10, P(2 ≤ X ≤ 5) = 3/10 = 0.3. The mean is the midpoint, 5, and the variance is (b − a)² ÷ 12 = 8.33.

Reference results

Distribution and parametersQueryResult
t, 10 dfP(X ≤ 2.1)0.968961
t, 10 dfLeft-tail area 0.9752.228139
Chi-square, 10 dfLeft-tail area 0.9518.307038
F, d₁ = 5, d₂ = 20Left-tail area 0.952.710890
Exponential, rate 0.5P(X ≤ 2)0.632121
Uniform, 0 to 10P(2 ≤ X ≤ 5)0.300000

The "Left-tail area" rows are inverse lookups, so their results are values of X, not probabilities.

Areas, densities and inverse lookups

  • P(X ≤ x) and P(X < x) are equal for a continuous distribution, because a single point has zero probability.
  • Density f(x) is the height of the curve, not a probability, and can exceed 1. The exponential with λ = 2 has density 2 at x = 0.
  • An inverse lookup takes a left-tail area strictly between 0 and 1, from 0.0000000001 to 0.9999999999, and returns x.
  • Degrees of freedom can be fractional, as Welch's t-test produces.

Mistakes that change the answer

  • Entering α instead of 1 − α. A left-tail area of 0.05 with 10 df returns −1.812, the lower critical value, instead of the upper one at 1.812.
  • Doubling a chi-square or F tail. Goodness-of-fit, independence and ANOVA tests are right-tailed, so the upper area alone is the p-value.
  • Switching to a one-sided test after seeing the data. For t, that halves the p-value with no new evidence.

To compute t from data or summary statistics, use the t-test calculator. Count tables go in the chi-square test calculator, and several group means in the one-way ANOVA calculator.

Worked examples

t with 10 df, P(T ≤ 2.1)

Distribution
Student t
Degrees of freedom
10
Find
P(X ≤ x)
Value x
2.1
Result
0.968961
Complement 1 − P
0.031039

Checked against: Independent calculation

t critical value, 10 df, 0.975

Distribution
Student t
Degrees of freedom
10
Find
x for a left-tail area (critical value)
Left-tail area p
0.975
Result
2.228139

Checked against: t table (NIST e-Handbook §1.3.6.7.2): 2.228; bisection on the A&S closed form gives 2.2281388520

χ² critical value, 10 df, 0.95

Distribution
Chi-square χ²
Degrees of freedom
10
Find
x for a left-tail area (critical value)
Left-tail area p
0.95
Result
18.307038

Checked against: χ² table (NIST e-Handbook §1.3.6.7.4): 18.307; bisection on the A&S 26.4.5 closed form gives 18.3070380533

F critical value (5, 20), 0.95

Distribution
F
Numerator degrees of freedom d₁
5
Denominator degrees of freedom d₂
20
Find
x for a left-tail area (critical value)
Left-tail area p
0.95
Result
2.71089

Checked against: F table (NIST e-Handbook §1.3.6.7.3): 2.71; bisection on the A&S 26.6.5 closed form gives 2.7108898372

Questions

How do you find a t critical value?

Choose Student t, enter the degrees of freedom, pick 'x for a left-tail area' and enter 1 − α/2 for a two-sided test or 1 − α for a one-sided one. With 10 df and a two-sided α of 0.05, p = 0.975 gives 2.228, the value in the NIST/SEMATECH e-Handbook t table (§1.3.6.7.2). As df grows the value falls towards the normal 1.960; at 30 df it is 2.042.

How do you get a p-value from a t statistic?

Take the tail area beyond the statistic: P(T ≥ t) for a right-tailed test, P(T ≤ t) for a left-tailed one, and twice the tail beyond |t| for a two-sided test. A t of 2.1 with 10 df gives P(T ≥ 2.1) = 0.0310, so the two-sided p-value is 0.0621, above 0.05. It is the chance of a statistic at least that extreme if the null hypothesis were true, not the chance that the null hypothesis is true.

What is the chi-square critical value for 1 degree of freedom?

3.841 at α = 0.05, 6.635 at α = 0.01 and 2.706 at α = 0.10, all upper-tail values. With 10 degrees of freedom the 5% value is 18.307, matching the NIST/SEMATECH χ² table (§1.3.6.7.4). To reproduce any of them, choose Chi-square, pick 'x for a left-tail area' and enter 1 − α, such as 0.95.

Why does the F distribution have two degrees of freedom?

An F statistic is the ratio of two variance estimates, and each has its own degrees of freedom: d₁ for the numerator and d₂ for the denominator. In a one-way ANOVA with k groups and N observations, d₁ = k − 1 and d₂ = N − k. Order matters: the 5% critical value for (5, 20) is 2.711, but for (20, 5) it is 4.558.

How is the t distribution different from the normal distribution?

It has heavier tails, because it allows for the standard deviation being estimated from the sample. With 5 degrees of freedom, 10.2% of the area lies beyond ±2, against 4.6% for the standard normal. The gap closes as the degrees of freedom grow: the two-sided 5% critical value is 2.228 at 10 df, 2.042 at 30 df and 1.960 for the normal.

About this calculator

P(X≤x)=∫−∞xf(u) du,xp=F−1(p)P(X \le x) = \int_{-\infty}^{x} f(u)\,du,\qquad x_p = F^{-1}(p)

Sources

  1. NIST/SEMATECH e-Handbook of Statistical Methods, §1.3.6.6 Gallery of distributions and §1.3.6.7 critical value tables
  2. Abramowitz & Stegun, Handbook of Mathematical Functions, chapter 26 (t, χ², F probability integrals)

Checked against references

This calculator includes 9 worked examples with independently sourced answers. They run in the test suite, and you can run them here too.

Put this calculator on your site

Paste this where you want the calculator to appear. It is free to use, it stays in step with corrections made here, and the credit line below it links back so your readers can find the full version.

Height
Preview the embed

Keep the credit line. It is the only condition, and it is what keeps these calculators free.