Z Test Calculator

One-way ANOVA calculator

=—
—
—
ANOVA calculator visualizationStrip plot of each group against the grand mean, a between/within variation bar and the F distribution

    The working, step by step

      In plain words

      Assumption check

        What Is a One-Way ANOVA?

        A one-way analysis of variance (ANOVA) is a hypothesis test that checks whether 3 or more group means differ, using one grouping factor.

        ANOVA compares the variation between group means with the variation inside the groups. When the between-group variation is large relative to the within-group variation, the F statistic is large and the p-value is small. Ronald A. Fisher developed ANOVA in the 1920s at the Rothamsted Experimental Station to analyse crop trials. For 2 groups, the Z Test Calculator and t-tests cover the comparison.

        One-Way ANOVA Formulas

        One-way ANOVA splits the total variation into 2 parts and compares them with an F ratio.

        Sum of Squares (Between, Within, Total)

        SS_total = SS_between + SS_within
        • Between groups: SSB = Σ nᵢ(x̄ᵢ − x̄)², the spread of group means around the grand mean.
        • Within groups: SSW = Σ Σ (x − x̄ᵢ)², the spread of values around their own group mean.
        • Total: SST = Σ (x − x̄)², the spread of all values around the grand mean.

        Mean Squares and the F Statistic

        F = MSB / MSW = (SSB / (k − 1)) / (SSW / (N − k))

        k is the number of groups and N is the total number of observations. Under H₀, F follows the F distribution with (k − 1, N − k) degrees of freedom.

        Assumptions of One-Way ANOVA

        One-way ANOVA needs 4 assumptions:

        1. Independent observations within and between groups.
        2. Approximate normality of the values in each group.
        3. Equal variances (homogeneity) across groups; the largest SD should be less than about twice the smallest.
        4. A continuous outcome measured on an interval or ratio scale.

        How to Use the ANOVA Calculator

        To use the ANOVA calculator, follow 3 steps:

        1. Type one group per line, with an optional name and a colon first, such as Lecture: 23, 25, 21, 27.
        2. Set α.
        3. Read the F statistic, the p-value and η².

        The strip plot shows every value by group, with each group mean and an arrow from the grand mean. The bar splits the total variation into between-group and within-group shares, and the F curve marks the critical value.

        How to Read the ANOVA Table

        An ANOVA table has 6 columns:

        SourceSSdfMSFp
        Between groups126.78263.3916.300.0002
        Within groups58.33153.89
        Total185.1117

        Read across the "Between groups" row: MS = SS / df, F = MSbetween / MSwithin, and p is the right-tail area of F. The table matches the teaching-methods example below.

        Post-Hoc Tests: Finding Which Groups Differ (Tukey HSD)

        A significant ANOVA shows that at least one mean differs, and a post-hoc test shows which pairs differ. Tukey's honestly significant difference (HSD), proposed by John Tukey in 1949, compares every pair of means while holding the family-wise error rate at α. Other options include the Bonferroni correction and the Games–Howell test for unequal variances. Run Tukey HSD in R with TukeyHSD(aov(...)), in SPSS or in Python's statsmodels.

        Effect Size for ANOVA (η²)

        Eta squared (η²) is the share of total variation explained by the groups, η² = SSB / SST. Cohen's benchmarks are 0.01 for small, 0.06 for medium and 0.14 for large. η² = 0.685 in the example below means the teaching method explains 68.5% of the variation in scores. Convert and compare effect sizes with the effect size calculator.

        One-Way ANOVA Example: Three Teaching Methods

        18 students learn by lecture, discussion or online study (6 per group). Lecture scores: 23, 25, 21, 27, 24, 26. Discussion: 30, 28, 32, 29, 31, 27. Online: 22, 24, 23, 26, 21, 25.

        1. Group means
          Lecture 24.33, Discussion 29.50, Online 23.50; grand mean 25.78
        2. Between groups
          SSB = 126.78, df = 2, MSB = 63.39
        3. Within groups
          SSW = 58.33, df = 15, MSW = 3.89
        4. F statistic
          F = 63.39 / 3.89 = 16.30, critical F(2, 15) = 3.682
        5. P-value
          p = 0.0002
        6. Effect size
          η² = 126.78 / 185.11 = 0.685
        7. Decision
          Reject H₀: at least one method gives a different mean score. Discussion appears highest; a Tukey test confirms which pairs differ.

        One-Way vs. Two-Way ANOVA

        Use a one-way ANOVA for 1 grouping factor, and a two-way ANOVA for 2 factors and their interaction. A study of teaching method and class size together needs a two-way design. Run it with the two-way ANOVA calculator.

        FAQs

        Why not just run several t-tests?

        Several t-tests inflate the false-positive rate, while ANOVA tests all groups at once at α. With 3 groups, 3 pairwise t-tests at α = 0.05 give a 14.3% chance of at least one false positive; with 6 groups, 15 tests give 54%.

        Can I use ANOVA with only two groups?

        Yes, ANOVA works with 2 groups and gives the same p-value as a pooled two-sample t-test, with F = t². For 2 groups, the t-test is simpler to report. Compare 2 means with the t-test calculator.

        What if the group variances are unequal?

        Use Welch's ANOVA when the group variances are unequal. Welch's ANOVA adjusts the denominator degrees of freedom, much like Welch's t-test. Follow up with the Games–Howell post-hoc test.

        What if my groups have different sizes?

        One-way ANOVA handles different group sizes, and this calculator accepts unequal groups. Unequal sizes make the test more sensitive to unequal variances, so check the SD ratio in the assumption panel.

        How do I report a one-way ANOVA in APA format?

        Report a one-way ANOVA as F(df₁, df₂) = value, p = value, η² = value. Example: "Teaching method affected scores, F(2, 15) = 16.30, p < .001, η² = .69." Look up the critical F for any df with the critical value calculator.