What Is the F-Distribution?
To build intuition before the math: imagine you draw two independent samples from a normal population and compute the variance of each. Divide the larger variance by the smaller one. The resulting ratio follows an F-distribution. If the two populations actually have the same variance, this ratio should hover around 1. The further it drifts above 1, the more evidence you have that something is different between the groups.
The distribution was named after Ronald A. Fisher, who introduced it in 1924 as the "variance ratio distribution." George W. Snedecor later popularized it and named it F in Fisher's honor. Today it is a standard tool taught in every introductory statistics course and used in software from R to Python to SPSS.
You can read more about the underlying framework in the hypothesis testing guide on Statistics Fundamentals.
The F-distribution is the probability distribution of the ratio of two chi-square variables each divided by their degrees of freedom, and it is used in the F-test and ANOVA to compare variances or test equality of group means.
The Variance Ratio: A Plain-English Analogy
Think of it this way. You want to know whether three different fertilizers produce the same average crop yield. You plant ten plots with each fertilizer and measure the yield. Now you have two sources of variation:
- Variation between groups — the differences in average yield across the three fertilizer types
- Variation within groups — the natural scatter in yield among plants that received the same fertilizer
If the fertilizers have no real effect, both sources of variation should be roughly equal, giving an F-ratio near 1. If one fertilizer genuinely outperforms the others, the between-group variation grows large relative to within-group noise, pushing the F-ratio well above 1. The F-distribution tells you exactly how large that ratio would have to be before you can confidently rule out chance.
Shape of the F-Distribution
The F-distribution is always right-skewed and bounded below by zero. Its exact shape depends entirely on two parameters: d₁ (numerator degrees of freedom) and d₂ (denominator degrees of freedom). As these numbers grow, the distribution becomes less skewed and begins to approach a normal distribution — but it never becomes symmetric in the way the t-distribution does.
Why Is the F-Distribution Always Positive?
The F-statistic is a ratio of two variances. Variance is computed by squaring deviations, so it is always non-negative. Dividing a non-negative number by a non-negative number produces a non-negative result. Therefore F ≥ 0 by construction, and the distribution has no left tail below zero.
Interactive Curve Explorer
F-Distribution Shape by Degrees of Freedom
How Degrees of Freedom Change the Shape
| d₁ / d₂ | Shape description | Skewness | Mean ≈ |
|---|---|---|---|
| 1, 5 | Sharply right-skewed; starts very high at left | Very high | 1.67 |
| 2, 10 | Exponential-like decay from left | High | 1.25 |
| 5, 20 | Mound-shaped, modal peak visible | Moderate | 1.11 |
| 10, 30 | Nearly bell-shaped but still right-skewed | Low | 1.07 |
| 30, 100 | Approaches normal distribution | Very low | 1.02 |
When d₁ = 1, the distribution is J-shaped (highest near zero, falling monotonically). When d₁ ≥ 2, a modal peak appears to the right of zero. As both degrees of freedom grow large, the mean approaches 1 and the variance approaches 0 — the distribution concentrates near 1 because, under the null hypothesis, you expect the variance ratio to equal 1.
Degrees of Freedom in the F-Distribution
Unlike the t-distribution (one parameter) or the chi-square distribution (one parameter), the F-distribution has two separate degrees of freedom. Getting them right is the first practical step in any F-test.
- d₁ (numerator df): The degrees of freedom for the between-group (numerator) chi-square variable. In one-way ANOVA with k groups: d₁ = k − 1
- d₂ (denominator df): The degrees of freedom for the within-group (denominator) chi-square variable. In one-way ANOVA with n total observations: d₂ = n − k
- Order matters: F(d₁, d₂) and F(d₂, d₁) are different distributions with different critical values
- In regression: d₁ = number of predictors (p); d₂ = n − p − 1
- In variance comparison (F-test): d₁ = n₁ − 1; d₂ = n₂ − 1
Degrees of Freedom in One-Way ANOVA
One-way ANOVA partitions the total variation in your data into two components. Each component has its own degrees of freedom, and their ratio produces the F-statistic.
| Source of Variation | Sum of Squares | Degrees of Freedom | Mean Square | F-statistic |
|---|---|---|---|---|
| Between groups (Treatment) | SS_between | k − 1 | MS_between = SS_between / (k−1) | MS_between / MS_within |
| Within groups (Error) | SS_within | n − k | MS_within = SS_within / (n−k) | — |
| Total | SS_total | n − 1 | — | — |
Here k is the number of groups and n is the total number of observations across all groups. Notice that d₁ + d₂ = (k−1) + (n−k) = n−1, which equals the total degrees of freedom. This additive property is the mathematical reason the ANOVA partition works.
The F-Statistic Formula
The F-statistic is the test statistic you compute from your data and then compare against the F-distribution to get a p-value.
MS_between = SS_between ÷ d₁MS_within = SS_within ÷ d₂d₁ = k − 1 (numerator df)d₂ = n − k (denominator df)Breaking Down the Components
SS_between (sum of squares between groups) measures how much each group mean deviates from the grand mean, weighted by group size:
nⱼ = sample size of group jx̄ⱼ = mean of group jx̄ = grand mean of all observationsSS_within (sum of squares within groups) measures natural variability inside each group — the variation you cannot attribute to group differences:
xᵢⱼ = individual observation i in group jx̄ⱼ = mean of group jThe Decision Logic
F-Test Decision Framework
How to Read an F-Distribution Table
An F-table gives you the critical value F*(d₁, d₂, α) — the cutoff above which you reject H₀. Most tables are organized for a specific α (commonly 0.05 or 0.01), with d₁ across the columns and d₂ down the rows.
Sample F-Table (α = 0.05, Right-Tail)
| d₂ \ d₁ | 1 | 2 | 3 | 4 | 5 | 10 | 20 |
|---|---|---|---|---|---|---|---|
| 1 | 161.4 | 199.5 | 215.7 | 224.6 | 230.2 | 241.9 | 248.0 |
| 2 | 18.51 | 19.00 | 19.16 | 19.25 | 19.30 | 19.40 | 19.45 |
| 5 | 6.608 | 5.786 | 5.409 | 5.192 | 5.050 | 4.735 | 4.558 |
| 10 | 4.965 | 4.103 | 3.708 | 3.478 | 3.326 | 2.978 | 2.774 |
| 20 | 4.351 | 3.493 | 3.098 | 2.866 | 2.711 | 2.348 | 2.124 |
| 30 | 4.171 | 3.316 | 2.922 | 2.690 | 2.534 | 2.165 | 1.932 |
| 60 | 4.001 | 3.150 | 2.758 | 2.525 | 2.368 | 1.993 | 1.748 |
| ∞ | 3.841 | 2.996 | 2.605 | 2.372 | 2.214 | 1.831 | 1.571 |
Always identify d₁ (columns) and d₂ (rows) before reading the table. The highlighted cell shows F*(d₁=20, d₂=20, α=0.05) = 2.124. If your computed F-statistic exceeds this value, reject H₀. The full table is available at the F-table on Statistics Fundamentals.
Three-Step Table-Reading Process
Identify Your Degrees of Freedom
In one-way ANOVA: d₁ = k − 1 (number of groups minus 1) and d₂ = n − k (total observations minus number of groups). Write both values down before opening the table.
Choose Your Alpha Level
Select the table for your chosen significance level — typically α = 0.05. The F-table page on this site has separate tables for α = 0.10, 0.05, and 0.01.
Read the Critical Value at (d₁, d₂)
Find the column for your d₁ value and the row for your d₂ value. The number in that cell is F*. If your computed F exceeds F*, reject H₀.
Worked Examples
Three examples follow, each covering a different real-world scenario where the F-distribution applies. The calculation steps are written out fully so you can follow along with your own data.
Example 1: One-Way ANOVA (Three Teaching Methods)
Problem: Do three teaching methods produce different average exam scores?
An education researcher randomly assigns 15 students to three groups (5 per group): traditional lecture, flipped classroom, and project-based learning. After 8 weeks, they record exam scores. Test at α = 0.05 whether mean scores differ across the three methods.
| Lecture | Flipped | Project-Based |
|---|---|---|
| 72 | 81 | 85 |
| 68 | 79 | 88 |
| 75 | 83 | 90 |
| 70 | 77 | 84 |
| 65 | 80 | 83 |
| Mean: 70 | Mean: 80 | Mean: 86 |
State hypotheses: H₀: μ₁ = μ₂ = μ₃ (all three group means are equal). H₁: At least one group mean differs.
Grand mean: x̄ = (350 + 400 + 430) / 15 = 1180 / 15 = 78.67
SS_between: 5(70 − 78.67)² + 5(80 − 78.67)² + 5(86 − 78.67)² = 5(75.15) + 5(1.77) + 5(53.73) = 375.75 + 8.85 + 268.65 = 653.33
SS_within: Sum of squared deviations within each group. Lecture: (72−70)²+(68−70)²+(75−70)²+(70−70)²+(65−70)² = 4+4+25+0+25 = 58. Flipped: (81−80)²+...= 1+1+9+9+0 = 20. Project: (85−86)²+...= 1+4+16+4+9 = 34. Total SS_within = 58 + 20 + 34 = 112
Degrees of freedom: d₁ = k − 1 = 3 − 1 = 2. d₂ = n − k = 15 − 3 = 12.
Mean squares: MS_between = 653.33 / 2 = 326.67. MS_within = 112 / 12 = 9.33.
F-statistic: F = 326.67 / 9.33 = 35.01
Critical value: From the F-table at α = 0.05, d₁ = 2, d₂ = 12: F* = 3.885.
✓ Decision: F = 35.01 > F* = 3.885. Reject H₀. The three teaching methods produce statistically different mean exam scores (p < 0.001). Post-hoc tests (Tukey's HSD) would identify which specific pairs differ.
Example 2: Testing Equality of Variances
Problem: Do two production lines have equal variance in fill weight?
A quality engineer measures fill weights from Line A (n₁ = 21, s₁ = 4.2 g) and Line B (n₂ = 16, s₂ = 2.8 g). Test at α = 0.05 whether the population variances are equal.
Hypotheses: H₀: σ₁² = σ₂² (equal variances). H₁: σ₁² ≠ σ₂² (two-tailed test).
F-statistic: Place the larger variance in the numerator. F = s₁² / s₂² = (4.2)² / (2.8)² = 17.64 / 7.84 = 2.250
Degrees of freedom: d₁ = n₁ − 1 = 20. d₂ = n₂ − 1 = 15.
Critical value: For a two-tailed test at α = 0.05, use α/2 = 0.025 in each tail. From the F-table at d₁ = 20, d₂ = 15, α = 0.025: F* ≈ 2.862.
✓ Decision: F = 2.250 < F* = 2.862. Fail to reject H₀. There is not enough evidence at α = 0.05 to conclude that Line A and Line B have unequal variances. This result matters: if we were planning a two-sample t-test, we could proceed with the pooled variance version.
Example 3: Global F-Test in Multiple Regression
Problem: Does a regression model with 3 predictors explain significant variance in house prices?
A data analyst fits a multiple regression model predicting house prices using square footage, number of bedrooms, and distance from the city center (p = 3 predictors, n = 50 observations). The ANOVA table from the regression output shows SS_regression = 12,000 and SS_residual = 8,000. Test at α = 0.05.
Hypotheses: H₀: β₁ = β₂ = β₃ = 0 (no predictor has a linear relationship with price). H₁: At least one βⱼ ≠ 0.
Degrees of freedom: d₁ = p = 3. d₂ = n − p − 1 = 50 − 3 − 1 = 46.
Mean squares: MS_regression = 12,000 / 3 = 4,000. MS_residual = 8,000 / 46 = 173.91.
F-statistic: F = 4,000 / 173.91 = 23.00
Critical value: At α = 0.05, d₁ = 3, d₂ = 46 (use d₂ = 40 from table): F* ≈ 2.839.
✓ Decision: F = 23.00 >> F* = 2.839. Reject H₀. The regression model as a whole explains a statistically significant amount of variance in house prices (p < 0.0001). Note that this global test does not tell you which individual predictors are significant — that requires examining individual t-tests for each coefficient, covered in the simple linear regression guide.
Assumptions of the F-Test and ANOVA
The F-test is valid only when a set of conditions holds. Violating these can make your p-value unreliable — either too small (false positives) or too large (false negatives).
Independence
Observations must be independent of each other, both within and across groups. Random sampling satisfies this. Repeated measurements on the same subjects do not — in that case, use a repeated-measures ANOVA instead.
Normality
The response variable should be approximately normally distributed within each group. The F-test is reasonably robust to moderate violations when sample sizes are roughly equal and greater than 20. Check with a histogram, Q-Q plot, or a normality test. The normality tests page covers Shapiro-Wilk and Anderson-Darling procedures.
Homogeneity of Variance (Homoscedasticity)
All groups should have approximately equal population variances. This is called homoscedasticity. Check it with Levene's test or Bartlett's test before running ANOVA. If violated with unequal sample sizes, use Welch's ANOVA. More on this in the equal vs. unequal variance guide.
Random Sampling
Data should come from a random sample of the population of interest, or from a randomized experiment. Convenience samples limit generalizability of conclusions.
Always verify assumptions before interpreting the F-test. Violating independence is the most serious problem and has no simple fix. Violations of normality and homoscedasticity can often be addressed with data transformations (log, square root) or a nonparametric alternative like the Kruskal-Wallis test.
F-Distribution vs. t and Chi-Square Distributions
The F-distribution is part of a connected family of distributions. Understanding these relationships deepens your intuition for when each test applies.
| Property | t-Distribution | Chi-Square (χ²) | F-Distribution |
|---|---|---|---|
| Parameters | ν (df) | k (df) | d₁, d₂ (two df) |
| Range | (−∞, +∞) | [0, +∞) | [0, +∞) |
| Shape | Symmetric, bell-shaped | Right-skewed | Right-skewed |
| Mean | 0 | k | d₂/(d₂−2) |
| Primary use | Comparing 1–2 means | Goodness of fit, independence | Comparing variances, ANOVA |
| Relationship | t² ~ F(1, ν) | χ²(k)/k is F numerator | Ratio of two χ²/df |
| As df → ∞ | → Standard normal | → Normal | → Normal |
The Mathematical Connection to Chi-Square
If X₁ ~ χ²(d₁) and X₂ ~ χ²(d₂) are independent, then the ratio:
This is the mathematical definition of the F-distribution. It follows directly that if you divide a chi-square random variable by its degrees of freedom, you get a scaled chi-square — and the ratio of two such scaled variables follows the F-distribution.
The Connection to the t-Distribution
If T follows a t-distribution with ν degrees of freedom, then T² follows an F-distribution with 1 and ν degrees of freedom:
This means a two-tailed t-test is a special case of the F-test. When comparing just two groups in ANOVA, the resulting F-statistic equals the square of the t-statistic you'd get from a two-sample t-test. The two approaches will always give the same p-value. To learn more about when to use each, see the hypothesis testing guide.
Real-World Applications of the F-Distribution
The F-distribution appears in any analysis that compares variation across groups or tests model fit. Here are the settings where you're most likely to encounter it.
Manufacturing Quality Control
Compare variance in product dimensions across three production lines. The F-test detects whether one line is significantly less consistent than others.
Clinical Trials
Test whether mean recovery times differ across four drug dosages using one-way ANOVA. The F-distribution provides the p-value for the overall comparison.
Agricultural Research
Determine whether soil type, irrigation method, or fertilizer brand affects crop yield. Two-way ANOVA uses two F-tests, one per factor.
Regression Analysis
The global F-test in multiple regression tests whether the model as a whole explains significant variation in the outcome. Every regression software output includes it.
Education Research
Compare student performance across classrooms, schools, or teaching methods. Hierarchical linear models extend the basic F-framework to nested data.
Finance and Economics
Compare volatility (variance in returns) across asset classes, test whether a portfolio's factor model significantly reduces residual variance.
Machine Learning Model Comparison
Test whether two regression models have statistically different predictive accuracy using an F-test on their residual sum of squares — common in nested model selection.
Psychology and Behavioral Science
Factorial ANOVA tests whether an experimental manipulation, a demographic factor, or their interaction affects behavior — each using a separate F-ratio.
Comparing 3+ group means? → One-way ANOVA. Testing two categorical factors? → Two-way ANOVA. Testing a regression model overall? → Global F-test. Comparing two variances? → F-test for equality of variances. Testing whether adding predictors improves fit? → Nested model F-test.
F-Distribution Calculator
Enter your F-statistic and degrees of freedom to find the p-value. The calculator uses a numerical approximation of the regularized incomplete beta function — the same method used by R's pf() function.
F-Test p-Value Calculator
For convenient online access to a full F-table with critical values, visit the F-distribution table. The ANOVA calculator at statisticsfundamentals.com/calculators/anova/ performs the complete sum-of-squares calculation from raw data.
F-Distribution Cheat Sheet
| Symbol / Term | Meaning | In One-Way ANOVA |
|---|---|---|
| F | F-statistic (variance ratio) | MS_between / MS_within |
| d₁ | Numerator degrees of freedom | k − 1 |
| d₂ | Denominator degrees of freedom | n − k |
| k | Number of groups | Groups being compared |
| n | Total sample size | All observations combined |
| SS_between | Between-group sum of squares | Σ nⱼ(x̄ⱼ − x̄)² |
| SS_within | Within-group sum of squares | Σⱼ Σᵢ (xᵢⱼ − x̄ⱼ)² |
| MS | Mean square = SS / df | Variance estimate |
| F* | Critical value at α | From F-table at (d₁, d₂, α) |
| p-value | P(F-stat ≥ F | H₀ true) | Right-tail probability |
| H₀ | Null hypothesis | All group means equal |
| H₁ | Alternative hypothesis | At least one mean differs |
The Variance → F Decision Chain
Framework
Data → Variance Components → F-Statistic → F-Distribution → p-Value → Statistical Decision
Every F-test follows this chain. Start with data. Partition it into variance components (between and within). Form the ratio to get F. Look up F on the F-distribution to get a p-value. Compare p to α for a decision.
Common Misconceptions
| Misconception | What People Think | What's Actually True |
|---|---|---|
| F can be negative | F can fall below zero if group 2 has a larger variance than group 1 | F is always ≥ 0. It is a ratio of two non-negative quantities (variances). |
| ANOVA tells you which groups differ | A significant ANOVA F-test shows which specific pairs are different | The F-test only tells you that at least one group differs. Post-hoc tests (Tukey, Bonferroni) identify which pairs. |
| F ~ F(d₂, d₁) and F(d₁, d₂) are the same | The order of numerator and denominator df doesn't matter | F(2, 10) and F(10, 2) are completely different distributions with different critical values. Order always matters. |
| Large F always means a meaningful difference | A large F-statistic implies a practically important group difference | With very large samples, trivially small differences can produce enormous F-values. Always report effect size (η² or ω²) alongside the F-test. |
| ANOVA requires equal group sizes | One-way ANOVA is only valid when all groups have the same n | ANOVA works with unequal group sizes (unbalanced designs). The SS formulas shown above handle this automatically. |
Frequently Asked Questions
Computing F-Tests in Statistical Software
Every major statistics package handles the F-distribution and ANOVA natively. Here's how to run a one-way ANOVA in the most common environments.
R
# One-way ANOVA in R
model <- aov(score ~ group, data = mydata)
summary(model)
# F-distribution p-value from F-statistic
pf(35.01, df1 = 2, df2 = 12, lower.tail = FALSE)
# Critical value at alpha = 0.05
qf(0.95, df1 = 2, df2 = 12)
Python (SciPy)
from scipy import stats
# One-way ANOVA
f_stat, p_value = stats.f_oneway(group1, group2, group3)
# F-distribution p-value
p = 1 - stats.f.cdf(35.01, dfn=2, dfd=12)
# Critical value at alpha = 0.05
crit = stats.f.ppf(0.95, dfn=2, dfd=12)
Excel
In Excel, use =F.DIST.RT(f_stat, d1, d2) to get the right-tail p-value, or =F.INV.RT(alpha, d1, d2) for the critical value.
Sources and Further Reading
- Fisher, R. A. (1924) — "On a distribution yielding the error functions of several well known statistics." Proceedings of the International Congress of Mathematics, Toronto, 2, 805–813. Original paper introducing what later became the F-distribution.
- Montgomery, D.C. (2017) — Design and Analysis of Experiments, 9th ed. Wiley. The standard graduate textbook for ANOVA and F-test methodology.
- NIST/SEMATECH e-Handbook of Statistical Methods — Section 7.4: Comparisons based on data from two processes. itl.nist.gov/div898/handbook/
- OpenStax Statistics — Chapter 13: F Distribution and One-Way ANOVA. Free, peer-reviewed textbook available at openstax.org
- Hogg, R.V., McKean, J.W., & Craig, A.T. (2018) — Introduction to Mathematical Statistics, 8th ed. Pearson. Provides the mathematical derivation of the F-distribution from first principles.
-
SciPy Reference Guide —
scipy.stats.f: F continuous random variable. docs.scipy.org