Summary of "Two-Way ANOVA - Full Course"

Two-way ANOVA — Summary

Main ideas and concepts

Hypotheses

There are three sets of hypotheses to test:

Assumptions to check

Step-by-step procedure to perform a two-way ANOVA

  1. Define factors and levels

    • Identify factor A and factor B and their levels (e.g., drug type: A/B; gender: male/female).
    • Determine sample size per cell (n), number of levels P (factor A) and Q (factor B). Total N = n × P × Q.
  2. Check assumptions

    • Plot residuals on a Q–Q plot (normality).
    • Run Levene’s test for homogeneity of variances.
    • Ensure study design supports independence.
    • Confirm dependent variable is metric.
  3. Compute means

    • Group means: mean for each cell (combination of A and B).
    • Marginal means: mean for each level of A (averaged across B) and for each level of B (averaged across A).
    • Grand mean: mean across all observations.
  4. Compute sums of squares (SS)

    • SS_total = sum over all observations (X_ijk − grand mean)^2.
    • SS_between_groups = sum over groups n × (group mean − grand mean)^2. (This equals SS_A + SS_B + SS_AB.)
    • SS_A = Q × n × sum over i (mean_i. − grand mean)^2 (variation due to factor A).
    • SS_B = P × n × sum over j (mean_.j − grand mean)^2 (variation due to factor B).
    • SS_AB = SS_between_groups − SS_A − SS_B (interaction).
    • SS_error (residual) = sum over groups sum over observations in group (X_ijk − group mean)^2.
  5. Compute degrees of freedom (df)

    • df_total = N − 1.
    • df_A = P − 1.
    • df_B = Q − 1.
    • df_AB = (P − 1)(Q − 1).
    • df_error = P × Q × (n − 1) = N − P×Q.
  6. Compute mean squares (MS)

    • MS_factor = SS_factor / df_factor for A, B, and AB.
    • MS_error = SS_error / df_error.
  7. Compute F-statistics

    • F_A = MS_A / MS_error
    • F_B = MS_B / MS_error
    • F_AB = MS_AB / MS_error
  8. Obtain p-values

    • Use the F-distribution with the appropriate df to get p-values (from tables or software).
  9. Decision rule

    • For each test (A, B, AB), if p < α (commonly .05), reject H0 for that effect; otherwise do not reject H0.
  10. Post-hoc or follow-up

    • If a main effect is significant with more than two levels, perform post-hoc multiple comparisons to find where differences lie.
    • If interaction is significant, interpret the interaction first (it can change the meaning of main effects) and examine simple effects as needed.

Worked example

Design: two factors — drug type (A, B) and gender (male, female). n = 5 per cell → N = 20.

Reported results:

Interpretation: all p-values > .05 ⇒ none of the three null hypotheses are rejected. There are no significant main effects of drug type or gender, and no significant interaction.

How to run it in software

Why “variance” matters

Speakers / sources

Category ?

Educational


Share this summary


Is the summary off?

If you think the summary is inaccurate, you can reprocess it with the latest model.

Video