The ANOVA Table: SS, df, MS, F in Two-Way ANOVA

A clear explanation of every row and column in a two-way ANOVA results table generated by GraphPad Prism, including what each value means and how it is computed.

Overview of the ANOVA Table

SourceSSdfMSFP value
Treatment ASS_Aa − 1SS_A / df_AMS_A / MS_ResidualFrom F distribution
Treatment BSS_Bb − 1SS_B / df_BMS_B / MS_ResidualFrom F distribution
Interaction A×BSS_A×B(a−1)(b−1)SS_A×B / df_A×BMS_A×B / MS_ResidualFrom F distribution
Residual (error)SS_Errorab(n−1)SS_Error / df_Error
TotalSS_Totalabn − 1

a = number of levels of Factor A, b = number of levels of Factor B, n = number of replicates per cell.

Column-by-Column Explanation

SS (Sum of Squares)

SS quantifies the total variability attributable to each source. SS_Total is the sum of squared deviations of all observations from the grand mean. The ANOVA partitions this total into pieces: SS_A (attributable to Factor A), SS_B (attributable to Factor B), SS_A×B (the interaction), and SS_Residual (random error). All these pieces sum to SS_Total.

df (Degrees of Freedom)

Each SS is associated with a number of degrees of freedom. For Factor A with 'a' levels, df = a − 1. For the interaction, df = (a−1)(b−1). For the residual with n replicates per cell, df = ab(n−1). The df values also sum to the total df (abn − 1).

MS (Mean Square)

MS = SS / df. Dividing by df converts the sum of squares into a variance estimate. The MS Residual is the pooled within-cell variance and estimates the random error variance. MS for each factor estimates random error plus any systematic effect of that factor.

F ratio

F = MS_Factor / MS_Residual. If a factor has no effect, MS_Factor ≈ MS_Residual and F ≈ 1. A large F ratio indicates that the factor explains more variance than expected from random error alone. Separate F ratios are computed for Factor A, Factor B, and the interaction.

P value

The P value is the probability of observing an F ratio this large (or larger) if the null hypothesis is true — that the factor has no effect. Prism calculates P values from the F distribution using the numerator df (for the factor) and the denominator df (for the residual).

Repeated Measures Variations

In repeated measures two-way ANOVA, the ANOVA table gains a Subject (or matching) row. The within-subject variability is further partitioned into subject-by-treatment interactions. This reduces the error term and can increase statistical power when subjects are matched over time or within experiment.

Prism note: Prism clearly labels whether the analysis is ordinary two-way ANOVA, repeated measures on one factor, or repeated measures on both factors. The structure of the ANOVA table changes with each — check the source column labels carefully.

Related Resources