The F-distribution can be used to test whether two variances are approximately equal, which is an assumption for calculating [[pooled variance]] for a [[confidence interval]]. Given two random variables $X_1$ and $X_2$ from the [[chi-squared distribution]] where $X_1 \sim \chi^2(n_1)$ and $X_2 \sim \chi^2(n_2)$, the F-distribution is defined as $F = \frac{X_1/n_1}{X_2/n_2}$ with $n_1-1$ and $n_2 -1$ numerator and denominator degrees of freedom, respectively. ## Notation $F \sim (n_1 -1 , n_2 -2)$ ## Probability Density Function Lookup critical values for the F-distribution in lookup tables or using [[R]]. ## Expectation $E(F) = \frac{n_2}{n_2-2}$ if $n_2 > 2$. ## Variance $V(F) = \frac{2n_2^2(n_1 + n_2 - 2)}{n_1(n_2-2)^2(n_2-4)}$ if $n_2 > 4$. ## R ```R df(x, n1-1, n2-1) qf(alpha, n1-1, n2-1) ```