Home Â» How to Create a Confidence Interval Using the F Distribution

# How to Create a Confidence Interval Using the F Distribution

To determine ifÂ the variances of two populations are equal, we can calculate the variance ratioÂ Ïƒ21 / Ïƒ22, whereÂ Ïƒ21Â is the variance of population 1 andÂ Ïƒ22Â is the variance of population 2.

To estimate the true population variance ratio, we typically take a simple random sample from each population and calculate the sample variance ratio,Â s12Â / s22, whereÂ s12Â  and s22Â are the sample variances for sample 1 and sample 2, respectively.

This test assumes that bothÂ s12Â  and s22Â are computed from independent samples of size n1 and n2, both drawn from normally distributed populations.

The further this ratio is from one, the stronger the evidence for unequal population variances.Â

The (1-Î±)100% confidence interval for Ïƒ21 / Ïƒ22Â is defined as:

(s12Â  / s22) * Fn1-1, n2-1, Î±/2Â  Â â‰¤Â Â Ïƒ21 / Ïƒ22Â  â‰¤Â  (s12Â  / s22) * Fn2-1, n1-1,Â Î±/2

where Fn2-1, n1-1, Î±/2Â and Fn1-1, n2-1,Â Î±/2Â are the critical values from the F distribution for the chosen significance level Î±.

The following examples illustrate how to create a confidence interval forÂ Ïƒ21 / Ïƒ22Â using three different methods:

• By hand
• Using Microsoft Excel
• Using the statistical software R

For each of the following examples, we will use the following information:

• Î± = 0.05
• n1 = 16
• n2 = 11
• s12Â =28.2
• s22Â = 19.3

## Creating a Confidence Interval By Hand

To calculate a confidence interval forÂ Ïƒ21 / Ïƒ22Â by hand, weâ€™ll simply plug in the numbers we have into the confidence interval formula:

(s12Â  / s22) * Fn1-1, n2-1,Î±/2Â  Â â‰¤Â Â Ïƒ21 / Ïƒ22Â  â‰¤Â  (s12Â  / s22) * Fn2-1, n1-1,Â Î±/2

The only numbers weâ€™re missing are the critical values.Â Luckily, we can locate these critical values in the F distribution table:

Fn2-1, n1-1, Î±/2Â  Â =Â F10, 15, 0.025Â  Â =Â 3.0602

Fn1-1, n2-1,Â Î±/2Â Â =Â  1/ F15, 10, 0.025 = 1 /Â 3.5217 =Â 0.2839

(Click to zoom in on the table)

Now we can plug all of the numbers into the confidence interval formula:

(s12Â  / s22) * Fn1-1, n2-1,Î±/2Â  Â â‰¤Â Â Ïƒ21 / Ïƒ22Â  â‰¤Â  (s12Â  / s22) * Fn2-1, n1-1,Â Î±/2

(28.2 / 19.3) * (0.2839)Â â‰¤Â Â Ïƒ21 / Ïƒ22Â  â‰¤Â  (28.2 / 19.3) * (3.0602)

0.4148 â‰¤Â Â Ïƒ21 / Ïƒ22Â  â‰¤Â  4.4714

Thus, the 95% confidence interval for the ratio of the population variances isÂ (0.4148, 4.4714).

## Creating a Confidence Interval Using Excel

The following image shows how to calculate a 95% confidence interval for the ratio of population variances in Excel. The lower and upper bounds of the confidence interval are displayed in column E and the formula used to find the lower and upper bounds are displayed in column F:

Thus, the 95% confidence interval for the ratio of the population variances isÂ (0.4148, 4.4714). This matches what we got when we calculated the confidence interval by hand.

## Creating a Confidence Interval Using R

The following code illustrates how to calculate a 95% confidence interval for the ratio of population variances in R:

```#define significance level, sample sizes, and sample variances
alpha #define F critical values
upper_crit #find confidence interval
lower_bound #output confidence interval
paste0("(", lower_bound, ", ", upper_bound, " )")

#[1] "(0.414899337980266, 4.47137571035219 )"
```

Thus, the 95% confidence interval for the ratio of the population variances isÂ (0.4148, 4.4714). This matches what we got when we calculated the confidence interval by hand.