- What is an F Test?
- General Steps for an F Test
- F Test to Compare Two Variances
See also: F Statistic in ANOVA/Regression
An “F Test” is a catch-all term for any test that uses the F-distribution. In most cases, when people talk about the F-Test, what they are actually talking about is The F-Test to Compare Two Variances. However, the f-statistic is used in a variety of tests including regression analysis, the Chow test and the Scheffe Test (a post-hoc ANOVA test).
If you’re running an F Test, you should use Excel, SPSS, Minitab or some other kind of technology to run the test. Why? Calculating the F test by hand, including variances, is tedious and time-consuming. Therefore you’ll probably make some errors along the way.
If you’re running an F Test using technology (for example, an F Test two sample for variances in Excel), the only steps you really need to do are Step 1 and 4 (dealing with the null hypothesis). Technology will calculate Steps 2 and 3 for you.
- State the null hypothesis and the alternate hypothesis.
- Calculate the F value. The F Value is calculated using the formula F = (SSE1 – SSE2 / m) / SSE2 / n-k, where SSE = residual sum of squares, m = number of restrictions and k = number of independent variables.
- Find the F Statistic (the critical value for this test). The F statistic formula is:
F Statistic = variance of the group means / mean of the within group variances.
You can find the F Statistic in the F-Table.
- Support or Reject the Null Hypothesis.
A Statistical F Test uses an F Statistic to compare two variances, s1 and s2, by dividing them. The result is always a positive number (because variances are always positive). The equation for comparing two variances with the f-test is:
F = s21 / s22
If the variances are equal, the ratio of the variances will equal 1. For example, if you had two data sets with a sample 1 (variance of 10) and a sample 2 (variance of 10), the ratio would be 10/10 = 1.
You always test that the population variances are equal when running an F Test. In other words, you always assume that the variances are equal to 1. Therefore, your null hypothesis will always be that the variances are equal.
Several assumptions are made for the test. Your population must be approximately normally distributed (i.e. fit the shape of a bell curve) in order to use the test. Plus, the samples must be independent events. In addition, you’ll want to bear in mind a few important points:
- The larger variance should always go in the numerator (the top number) to force the test into a right-tailed test. Right-tailed tests are easier to calculate.
- For two-tailed tests, divide alpha by 2 before finding the right critical value.
- If you are given standard deviations, they must be squared to get the variances.
- If your degrees of freedom aren’t listed in the F Table, use the larger critical value. This helps to avoid the possibility of Type I errors.
Warning: F tests can get really tedious to calculate by hand, especially if you have to calculate the variances. You’re much better off using technology (like Excel — see below).
These are the general steps to follow. Scroll down for a specific example (watch the video underneath the steps).
Step 2: Square both standard deviations to get the variances. For example, if σ1 = 9.6 and σ2 = 10.9, then the variances (s1 and s2) would be 9.62 = 92.16 and 10.92 = 118.81.
Step 3: Take the largest variance, and divide it by the smallest variance to get the f-value. For example, if your two variances were s1 = 2.5 and s2 = 9.4, divide 9.4 / 2.5 = 3.76.
Why? Placing the largest variance on top will force the F-test into a right tailed test, which is much easier to calculate than a left-tailed test.
Step 4: Find your degrees of freedom. Degrees of freedom is your sample size minus 1. As you have two samples (variance 1 and variance 2), you’ll have two degrees of freedom: one for the numerator and one for the denominator.
Step 5: Look at the f-value you calculated in Step 3 in the f-table. Note that there are several tables, so you’ll need to locate the right table for your alpha level. Unsure how to read an f-table? Read What is an f-table?.
Step 6: Compare your calculated value (Step 3) with the table f-value in Step 5. If the f-table value is smaller than the calculated value, you can reject the null hypothesis.
Back to Top
The difference between running a one or two tailed F test is that the alpha level needs to be halved for two tailed F tests. For example, instead of working at α = 0.05, you use α = 0.025; Instead of working at α = 0.01, you use α = 0.005.
With a two tailed F test, you just want to know if the variances are not equal to each other. In notation:
Ha = σ21 ≠ σ2 2
Sample problem: Conduct a two tailed F Test on the following samples:
Sample 1: Variance = 109.63, sample size = 41.
Sample 2: Variance = 65.99, sample size = 21.
Step 1: Write your hypothesis statements:
Ho: No difference in variances.
Ha: Difference in variances.
Step 2: Calculate your F critical value. Put the highest variance as the numerator and the lowest variance as the denominator:
F Statistic = variance 1/ variance 2 = 109.63 / 65.99 = 1.66
Step 5: Find the critical F Value using the F Table. There are several tables, so make sure you look in the alpha = .025 table. Critical F (40,20) at alpha (0.025) = 2.287.
Step 6: Compare your calculated value (Step 2) to your table value (Step 5). If your calculated value is higher than the table value, you can reject the null hypothesis:
F calculated value: 1.66
F value from table: 2.287.
1.66 < 2 .287.
So we cannot reject the null hypothesis.
Back to Top
Watch the video or read the steps below:
F-test two sample for variances Excel 2013: Steps
Step 1: Click the “Data” tab and then click “Data Analysis.”
Step 2: Click “F test two sample for variances” and then click “OK.”
Step 3: Click the Variable 1 Range box and then type the location for your first set of data. For example, if you typed your data into cells A1 to A10, type “A1:A10” into that box.
Step 4: Click the Variable 2 box and then type the location for your second set of data. For example, if you typed your data into cells B1 to B10, type “B1:B10” into that box.
Step 5: Click the “Labels” box if your data has column headers.
Step 6: Choose an alpha level. In most cases, an alpha level of 0.05 is usually fine.
Step 7: Select a location for your output. For example, click the “New Worksheet” radio button.
Step 8: Click “OK.”
Step 9: Read the results. If your f-value is higher than your F critical value, reject the null hypothesis as your two populations have unequal variances.
Warning: Excel has a small “quirk.” Make sure that variance 1 is higher than variance 2. If it isn’t switch your input data around (i.e. make input 1 “B” and input 2 “A”). Otherwise, Excel will calculate an incorrect f-value. This is because the variance is a ratio of variance 1/variance 2, and Excel can’t work out which set of data is set 1 and set 2 without you explicitly telling it.
Subscribe to our Youtube channel for more stats videos.------------------------------------------------------------------------------
Confused and have questions? Head over to Chegg and use code “CS5OFFBTS18” (exp. 11/30/2018) to get $5 off your first month of Chegg Study, so you can understand any concept by asking a subject expert and getting an in-depth explanation online 24/7.
Comments? Need to post a correction? Please post a comment on our Facebook page.