F Statistic Calculator - Two-Sample F-Test Output
This F statistic calculator turns two sample variances and sizes into the F statistic, degrees of freedom, p-value, and critical F at α = 0.05.
F Statistic Calculator
Results
What Is the Two-Sample F-Test for Variances?
The f statistic is the ratio of two sample variances used to decide whether two independent groups come from populations with the same spread. This calculator takes your two sample variances and sizes and returns the F ratio, degrees of freedom, a right-tailed p-value, and the F critical value at your chosen alpha, so you can decide whether the two variances are plausibly equal.
- • Pre-test for a two-sample t-test: Confirm that two groups have similar variances before running a t-test that assumes equal variances.
- • Quality-control comparison of two machines: Check whether one production line is more variable than another by comparing the F ratio to the critical value.
- • Variance comparison in an experiment: Compare the spread of treatment and control groups in an A/B test before assuming homoscedasticity for downstream models.
- • Classroom homework and exam questions: Compute the F ratio, degrees of freedom, p-value, and critical F needed for an introductory statistics assignment.
This ratio is most useful when you already have sample variances, or can square sample standard deviations to get them. Any ratio of two mean squares from independent normal samples is read against the F distribution, which is why the F-test also appears in ANOVA and in regression overall F-tests.
When the ratio comes from group means and within-group variation rather than two variances, switch to a dedicated ANOVA calculator that handles the between- and within-group sums of squares for you.
How the Two-Sample F-Test Works
The ratio is built from two independent sample variances with degrees of freedom tied to each sample size, and the calculator finds the right-tailed p-value and F critical value from the F distribution.
- s1² and s2²: Sample variances of the two independent groups; put the larger variance on top so the ratio is at least 1.
- n1 and n2: Sample sizes of the two groups; converted into df1 = n1 − 1 and df2 = n2 − 1 degrees of freedom.
- α (significance level): Probability of a Type I error used to look up the F critical value at F(1 − α, df1, df2).
The calculator computes the p-value from the F distribution using the regularised incomplete beta function. Because the F distribution is right-skewed, the F-test for variances is one-sided, so place the larger variance in the numerator.
The F distribution has two shape parameters df1 and df2 and is bounded below by zero, which is why the two-sample F-test for variances is conventionally read as a right-tailed test against F(1 − α, df1, df2).
Worked example: 11 versus 11 with variances 20 and 5
Sample 1: n1 = 11, s1² = 20. Sample 2: n2 = 11, s2² = 5.
F = 20 / 5 = 4.0000. Degrees of freedom: df1 = 10, df2 = 10.
Right-tailed p-value ≈ 0.0196. Critical F at α = 0.05 is 2.977.
F = 4.0 exceeds the critical F of 2.977, so the two variances are statistically different at α = 0.05.
According to NIST/SEMATECH e-Handbook of Statistical Methods, section 1.3.5.9, the F-test for equality of two variances uses the ratio F = s1^2 / s2^2 with df1 = n1 - 1 and df2 = n2 - 1 degrees of freedom and rejects H0 when the statistic exceeds the critical F at the chosen alpha.
As published by NIST/SEMATECH e-Handbook of Statistical Methods, F distribution, the F distribution has two shape parameters df1 and df2, is bounded below by zero, and is right-skewed, which is why the two-sample F-test for variances is conventionally read as a right-tailed test against F(1 − α, df1, df2).
Once the F-test confirms that the two variances can be treated as equal, the natural follow-up is to compare the means with a t-test calculator that uses the pooled standard deviation under the equal-variance assumption.
Key Concepts Explained
Four ideas show up every time you run a two-sample F-test for equal variances, and they decide whether the result is meaningful.
Ratio of variances, not of standard deviations
The F-test uses sample variances (squared units), not sample standard deviations. If you only have SDs, square each one before dividing; the result is the same number.
Two degrees of freedom, one for each sample
The F distribution has two shape parameters: df1 = n1 − 1 from the numerator sample and df2 = n2 − 1 from the denominator sample. Swapping the variances also swaps df1 and df2, and the p-value can change because the F distribution is not symmetric.
Right-tailed one-sided test
The F distribution is right-skewed and bounded below by zero, so the conventional F-test for equal variances is one-sided and rejects H0 only when the ratio is unusually large.
Sensitivity to non-normal data
The exact F-test assumes both samples come from independent normal populations. Heavy tails or strong skewness can make the ratio reject too often, which is why textbooks recommend Levene or Brown–Forsythe when normality is doubtful.
These four ideas are what separate a defensible F ratio from a number that just looks plausible. Get them right and the ratio, p-value, and critical F tell a consistent story.
When you only have a single sample and want to test its variance against a known value, the underlying distribution is chi-square on n − 1 degrees of freedom instead of F, so use a chi-square calculator for that one-sample case.
How to Use This Calculator
The two-sample F-test for variances needs just two variances and two sample sizes; everything else is read off the result.
- 1 Enter sample 1 variance and size: Type the variance of your first sample and the number of observations n1; df1 = n1 − 1 is derived for the numerator.
- 2 Enter sample 2 variance and size: Type the variance of your second sample and n2; df2 = n2 − 1 is the denominator.
- 3 Pick a significance level: Choose α = 0.10, 0.05, or 0.01 to look up the F critical value; the default α = 0.05 matches most textbooks.
- 4 Read the F ratio, p-value, and critical F: The primary result is the F ratio; the secondary panel shows the right-tailed p-value, the critical F, and the degrees of freedom.
- 5 Apply the decision rule: Reject equal variances when the F ratio exceeds the critical F (equivalently, when the p-value drops below α); otherwise fail to reject.
Two production lines report fill variances of 20 mL² (n = 11) and 5 mL² (n = 11). The calculator returns F = 4.0000, df1 = 10, df2 = 10, p = 0.0196, and critical F = 2.977. Because 4.0 > 2.977 and p < 0.05, you reject equal variances.
If you only have sample means and standard deviations instead of variances, compute the SDs first with a standard deviation calculator and square each one before entering them here.
Benefits of Using This Calculator
The two-sample F-test removes the table-lookup and lets you run sensitivity checks at different alphas in seconds.
- • Replaces printed F tables: Computes the right-tailed p-value and F critical value from the F distribution so you do not need a printed F table for your df1, df2, and alpha.
- • Pre-test for equal-variance t-tests: Tells you when the equal-variance assumption behind a pooled t-test is defensible and when you should switch to Welch's t-test.
- • Quality-control decisions: Quantifies whether one machine or supplier is meaningfully more variable than another at a chosen alpha, instead of guessing from boxplots.
- • Transparent worked example: Shows the formula, the inputs, and the p-value side by side, so the same numbers can be written into a lab report.
- • Alpha sensitivity in one screen: Lets you toggle between α = 0.10, 0.05, and 0.01 and see how the critical F and decision change without retyping the inputs.
The biggest payoff is in teaching and reporting: you can show the formula, the inputs, and the decision rule on one page, so a reader can audit every step without a separate calculator.
After the F-test confirms that the two variances can be pooled, the natural next step is to combine them with a pooled standard deviation calculator that produces the single pooled standard deviation used in the equal-variance t-test.
Factors That Affect Your Results
The F ratio, the critical F, and the decision all move when the underlying samples change; here are the factors that move them the most.
Sample size of each group
Larger n1 and n2 raise both df1 and df2, which lowers the F critical value at a given alpha and makes rejection easier. With n = 2 in either group, df = 1 and the critical F at α = 0.05 jumps above 160, so even a 4-to-1 variance ratio is not significant.
Ratio between the two variances
The F ratio is just s1² / s2², so doubling the numerator variance doubles F. A larger F pushes the p-value down toward 0.
Choice of significance level
Switching from α = 0.05 to α = 0.01 raises the F critical value and makes rejection harder; switching to α = 0.10 lowers it and makes rejection easier. The F ratio itself does not change, only the cutoff you compare it to.
Normality of the underlying data
The exact F distribution only applies when both samples are drawn from independent normal populations. Heavy tails, skew, or outliers inflate the sample variance in unpredictable ways, so the F ratio can be either too large or too small relative to the reference.
- • The F-test and its p-value are exact only under independent normal samples; data with outliers or skew should be checked with Levene or Brown–Forsythe before trusting the result.
- • The calculator assumes a one-sided test in which the larger variance is placed in the numerator; if you enter the smaller variance first the F ratio will be less than 1 and you should swap the two samples.
- • Sample variances of zero give a degenerate F ratio of 0 and a right-tailed p-value of 1, which is mathematically correct but not informative because a constant sample carries no information about the underlying population spread.
These factors explain why the same data can lead two analysts to different conclusions: the F statistic does not move, but the critical F shifts with the degrees of freedom and the chosen alpha. Reporting both the F statistic and the p-value lets the reader redo the test at any alpha.
According to Wikipedia, F-test entry, the F-test for equality of two variances forms the ratio F = s1² / s2² from independent samples drawn from normal populations, places the larger variance in the numerator so the test is one-sided, and rejects H0 when the ratio exceeds the F distribution critical value at the chosen alpha.
When you move from comparing two variances to testing whether a regression model explains variance in a response, the same F ratio shows up in the overall F-test of an exponential regression calculator.
Frequently Asked Questions
Q: What does the F ratio measure in a two sample variance test?
A: The ratio measures how far apart two sample variances are. A ratio near 1 means the variances look similar; a ratio much larger than 1 means one sample is much more variable.
Q: How do you compute the F ratio from two sample variances?
A: Divide one sample variance by the other: F = s1² / s2². The larger variance goes in the numerator so the ratio is at least 1.
Q: What degrees of freedom does the F-test use?
A: The F distribution uses two degrees of freedom: df1 = n1 − 1 from the numerator sample and df2 = n2 − 1 from the denominator sample.
Q: Is a larger F ratio more significant?
A: Yes, in the conventional one-sided F-test. Larger F means the numerator variance is further from the denominator variance, which lowers the right-tailed p-value.
Q: How do you interpret a non significant F-test?
A: A non-significant result means there is not enough evidence to claim the variances differ at your alpha, so you fail to reject H0 and can treat the two variances as equal for downstream tests.
Q: When should you use an F-test instead of a t-test?
A: Use an F-test when you want to compare the spread (variance) of two groups; use a t-test when you want to compare their average (mean).