WordGPT

F distribution

F distribution: the ratio of two variances. With the default parameters (numerator df d₁ = 5, denominator df d₂ = 10) its mean is 1.25 and its standard deviation 1.1637. Use the simulator below to draw samples and see it take shape.

Simulate it

Change the parameters, then draw random samples. The bars are the samples; the line is the exact density. With more samples the bars settle onto it.

Samples to draw

00.20.40.600.511.522.533.544.55x
Mean
sample - · exact 1.25
Standard deviation
sample - · exact 1.164

What is the F distribution?

The F distribution is the distribution of the ratio of two independent chi-square variables, each divided by its degrees of freedom. It has two parameters, the numerator and denominator degrees of freedom, and it describes how a ratio of two sample variances behaves when the true variances are equal.

It is the reference distribution for ANOVA (comparing several group means), for the test that two variances are equal, and for the overall significance test of a regression model.

Where it is used

  • One-way and two-way ANOVA: do the group means differ?
  • Test that two population variances are equal.
  • Overall F-test in linear regression.
  • Comparing nested models.

Shape and parameters

Positive and right-skewed. The mean is close to 1 for large denominator degrees of freedom (exactly d₂/(d₂ − 2) for d₂ > 2), and the variance exists only for d₂ > 4. A large F means the variation between groups is large compared with the variation within them.

What it assumes

  • Independent observations.
  • Approximately normal data within groups.
  • For ANOVA, equal variances across groups.

How it relates to other distributions

  • Chi-square distribution: An F is a ratio of two scaled chi-squares.
  • Student's t distribution: T² with ν df is F(1, ν).

Common mistakes

  • Swapping the numerator and denominator degrees of freedom, which changes the critical value.
  • Using the F-test for equal variances on data that are not close to normal, where it is very sensitive.

How to work it out

  1. 1

    The probability density function (the formula that gives the shape):

    f(x)=1x B ⁣(d12,d22)(d1x)d1d2d2(d1x+d2)d1+d2f(x)=\frac{1}{x\,B\!\left(\frac{d_1}{2},\frac{d_2}{2}\right)}\sqrt{\frac{(d_1x)^{d_1}d_2^{d_2}}{(d_1x+d_2)^{d_1+d_2}}}
  2. 2

    Its mean (the long-run average) and variance (the spread):

    μ=d2d2−2 (d2>2),σ2=2d22(d1+d2−2)d1(d2−2)2(d2−4) (d2>4)\mu = \frac{d_2}{d_2-2}\ (d_2>2),\qquad \sigma^2 = \frac{2d_2^2(d_1+d_2-2)}{d_1(d_2-2)^2(d_2-4)}\ (d_2>4)
  3. 3

    Worked example with the default parameters (numerator df d₁ = 5, denominator df d₂ = 10): With 5 and 10 degrees of freedom, what is the probability of a value above 3.33?

    answer=0.0498\text{answer} = 0.0498
LaTeX source of the formulas on this page
\[ f(x)=\frac{1}{x\,B\!\left(\frac{d_1}{2},\frac{d_2}{2}\right)}\sqrt{\frac{(d_1x)^{d_1}d_2^{d_2}}{(d_1x+d_2)^{d_1+d_2}}} \]
\[ \mu = \frac{d_2}{d_2-2}\ (d_2>2),\qquad \sigma^2 = \frac{2d_2^2(d_1+d_2-2)}{d_1(d_2-2)^2(d_2-4)}\ (d_2>4) \]
\[ \text{answer} = 0.0498 \]

At a glance

PropertyValue
TypeContinuous (measurements)
Parametersnumerator df d₁; denominator df d₂
Possible values0 to ∞
Mean1.25
Variance1.3542
Standard deviation1.1637
Example (numerator df d₁ = 5, denominator df d₂ = 10)With 5 and 10 degrees of freedom, what is the probability of a value above 3.33? Answer: 0.0498.

How to compute it in Excel, Python and R

ToolFunction
Excel / Google Sheets=F.DIST(x, d1, d2, TRUE) (F.DIST.RT for the p-value)
Python (SciPy)scipy.stats.f.cdf(x, d1, d2) (sf for the p-value)
Rpf(x, d1, d2) (lower.tail = FALSE for the p-value)

Questions

What is the F distribution used for?

The ratio of two variances. Typical uses: One-way and two-way ANOVA: do the group means differ? Test that two population variances are equal. Overall F-test in linear regression.

What are the mean and variance of the F distribution?

Mean: μ = (d_2)/(d_2-2)\ (d_2>2). Variance: σ² = (2d_2²(d_1+d_2-2))/(d_1(d_2-2)²(d_2-4))\ (d_2>4).

What does the F distribution assume?

Independent observations. Approximately normal data within groups. For ANOVA, equal variances across groups.

How do I calculate it in Excel?

=F.DIST(x, d1, d2, TRUE) (F.DIST.RT for the p-value)

How is the F distribution related to other distributions?

Chi-square distribution: An F is a ratio of two scaled chi-squares. Student's t distribution: T² with ν df is F(1, ν).

Related distributions

Choosing a distribution

    F distribution: what it is, when to use it, formulas and simulator | WordGPT