Skip to content
Probability, Statistics and Financial Data / Linear Regression and Analysis of Variance

Two-Way ANOVA and Interactions

One-way ANOVA answers "does group membership matter?" for a single categorical factor. Real trading data rarely comes with only one factor worth grouping by: execution slippage varies by venue and order type; a fund's alpha varies by strategy and market regime. This note extends the one-way layout to two factors observed jointly, and introduces the question a one-factor design cannot even ask: do the two factors act additively — venue shifts slippage by a fixed amount regardless of order type — or do they interact, so that which venue is cheaper depends on which order type is being routed? Getting this wrong is not a subtle statistical nicety: a naive analysis that only checks each factor's main effect can report "order type doesn't matter" while missing an interaction that is, in economic terms, the entire story.
Learning objectives. By the end of this note you should be able to:
  • state the balanced two-way ANOVA model with an interaction term, and its parameter constraints;
  • derive the four-way sum-of-squares decomposition SSTOT=SSA+SSB+SSAB+SSE\text{SSTOT}=\text{SS}_A+\text{SS}_B+\text{SS}_{AB}+\text{SS}_E and the corresponding FF-tests for each main effect and the interaction;
  • read an interaction plot and distinguish a genuine interaction from two independent main effects;
  • explain why a design with K=1K=1 observation per cell cannot separately estimate the interaction and the error variance.

In this lesson

  1. The two-way model
  2. The sum-of-squares decomposition
  3. The worked example: venue × order-type interaction in execution slippage
  4. Balanced vs. unbalanced designs, and the K=1K=1 trap

Before you start

The full lesson, with worked examples and exercise solutions, is for members.

Read the full lesson

New to SelfMadeQuant.com? See membership options or browse the Probability, Statistics and Financial Data syllabus.