Z Test Calculator

F test calculator

=—
—
—
F-test calculator visualizationSample variances drawn as squares and the F distribution with rejection regions

    The working, step by step

      In plain words

      Assumption check

        What Is an F-Test for Variances?

        An F-test for variances is a hypothesis test that checks whether 2 populations have equal variances by comparing the ratio of the sample variances with the F-distribution.

        The F-test answers questions such as "Does machine A fill bottles less consistently than machine B?". The test is named after Ronald A. Fisher, and George W. Snedecor published the first F tables in 1934. The F-test for variances is not the same as the F statistic in ANOVA, which compares means. Test means instead with the Z Test Calculator.

        F-Test Formula (F = s₁² / s₂²)

        The F-test statistic is the ratio of the two sample variances, F = s₁² / s₂².

        F = s₁² / s₂²

        Under H₀ (σ₁² = σ₂²), F follows the F-distribution with n₁ − 1 and n₂ − 1 degrees of freedom. An F near 1 fits equal variances; an F far above or below 1 counts as evidence against equal variances.

        Degrees of Freedom and the F-Distribution

        The F-distribution has 2 degrees of freedom: df₁ = n₁ − 1 for the numerator and df₂ = n₂ − 1 for the denominator. The distribution is right-skewed and starts at 0. For df = (20, 24), the two-tailed critical values at α = 0.05 are 0.415 and 2.327; the lower cut-off equals 1 divided by the upper cut-off with the degrees of freedom swapped.

        Hypotheses (Two-Tailed and One-Tailed)

        An F-test has 3 forms:

        TestH₀H₁Use
        Two-tailedσ₁² = σ₂²σ₁² ≠ σ₂²any difference in spread
        Right-tailedσ₁² = σ₂²σ₁² > σ₂²group 1 varies more
        Left-tailedσ₁² = σ₂²σ₁² < σ₂²group 1 varies less

        Assumptions of the F-Test

        The F-test needs 3 assumptions:

        1. Normality: both populations are normal. The F-test is very sensitive to non-normal data.
        2. Independent samples: the two groups contain different subjects.
        3. Random samples from each population.

        How to Use the F Test Calculator

        To use the F test calculator, follow 4 steps:

        1. Enter the standard deviation and sample size of sample 1.
        2. Enter the standard deviation and sample size of sample 2.
        3. Choose the tail.
        4. Set α.

        The left panel draws each variance as a square whose area equals s², so F is the ratio of the two areas. The right panel shades the rejection regions on the F-distribution. The cards show the p-value, the critical values and a confidence interval for σ₁²/σ₂².

        Interpreting F-Test Results

        A significant F-test means the population variances differ, and an F-test that is not significant means the data do not show a difference in spread. The confidence interval for σ₁²/σ₂² shows how large the ratio plausibly is: an interval that contains 1 matches a non-significant two-tailed test. A non-significant result does not prove equal variances, especially with small samples.

        F-Test Example: Comparing the Precision of Two Machines

        Machine A cuts parts with s₁ = 0.42 mm (n₁ = 21); machine B with s₂ = 0.28 mm (n₂ = 25).

        1. Variances
          s₁² = 0.1764 mm², s₂² = 0.0784 mm²
        2. F statistic
          F = 0.1764 / 0.0784 = 2.25, df = (20, 24)
        3. Critical values
          0.415 and 2.327 at α = 0.05, two-tailed
        4. Two-tailed p-value
          0.0597
        5. Right-tailed p-value
          0.0298
        6. Decision
          Two-tailed: fail to reject H₀ at α = 0.05. Right-tailed (H₁: machine A varies more): reject H₀.

        F-Test vs. ANOVA F Statistic

        The F-test for variances compares 2 variances, while the ANOVA F statistic compares the variation between group means with the variation within groups. Both use the F-distribution, but they answer different questions. Compare 3 or more means with the ANOVA calculator.

        FAQs

        Why should the larger variance go in the numerator?

        Putting the larger variance in the numerator keeps F ≥ 1, so only the upper critical value from a printed table is needed. With software, the order does not matter: the two-tailed p-value is the same either way. Keep track of which group is on top for a one-tailed test.

        Should I run an F-test before a t-test?

        No, running an F-test before choosing a t-test is no longer recommended. The two-step approach distorts the overall error rate, and the F-test is unreliable with non-normal data. Use Welch's t-test by default with the t test calculator.

        What if my data aren't normal? (Levene's test)

        Use Levene's test or the Brown–Forsythe test when the data are not normal. Howard Levene proposed his test in 1960; it runs an ANOVA on the absolute deviations from each group's mean (or median, for Brown–Forsythe) and holds up well with skewed data. Both are available in R (car::leveneTest), SPSS and Python's SciPy.

        Can I enter standard deviations instead of variances?

        Yes, the calculator takes standard deviations and squares them for you. An SD of 0.42 becomes a variance of 0.1764. Calculate SDs from raw data with the standard deviation calculator.

        How do I report an F-test in APA format?

        Report an F-test as F(df₁, df₂) = value, p = value, with both standard deviations. Example: "Machine A (SD = 0.42 mm) varied more than machine B (SD = 0.28 mm), F(20, 24) = 2.25, p = .030, one-tailed." Find the critical F for your degrees of freedom with the critical value calculator.