Repeated-Measures ANOVA

Info sheet · Statistics for Psychology & Neuroscience

Author

Andrew Bell

Published

August 13, 2026

Info sheet 0.2 (draft) · Prerequisites: one-way ANOVA & the F-ratio; the paired t-test · Give feedback ↗

Working notes for the author — not shown to students once collapsed; remove before publishing.

  • [ ]

What you’ll get from this sheet

This is our first step into a new form of ANOVA: the repeated-measures ANOVA. Here we build the theory; the next sheet covers running one in practice. By the end you should be able to:

  1. Say what a repeated-measures ANOVA is, and how it differs from the independent-samples ANOVAs we’ve used so far.
  2. Recognise the role of the subject sum of squares (no need to calculate it by hand).
  3. Understand how the error term is partitioned differently in a repeated-measures design.

A repeated-measures ANOVA is the ANOVA equivalent of a paired t-test. It carves the participants’ own individual differences out into a subject sum of squares, so those differences no longer sit in the error term — leaving a smaller residual and a more sensitive test.

The paired t-test, scaled up

Everything so far has been independent-samples ANOVA — one-way, then factorial, with their assumptions (independence, normal residuals, homogeneity of variance) and their post-hoc tests and contrasts. In all of those, factors had independent levels: a song belongs to only one decade; a participant reports only one gender. There was no shared variance between levels.

Compare that to t-tests. An independent-samples t-test contrasts two unrelated groups (heights of men vs women) — no shared variance. A paired-samples t-test contrasts two scores from the same people (pre vs post treatment) — and those scores share variance, because they come from the same individuals. So the natural question: is there an ANOVA equivalent of the paired t-test? Yes — the repeated-measures ANOVA.

It’s used when the same participants are measured under multiple conditions, so their scores aren’t independent — most often a within-subjects design where each participant provides several data points. It’s a little old-fashioned now next to linear mixed models, but still widely used in psychology and clinical research, and essential for reading the pre-2015 literature.

The Oreo taste test

A simple example: 20 participants each rate 8 Oreo flavours from 0 (“terrible”) to 10 (“amazing”). The IV is cookie type (8 levels); the DV is rating. Because each participant rated every cookie, we have repeated measures — the same individuals contribute multiple scores, which share variance. Note the data are balanced: everyone rated all 8. That matters, because repeated-measures ANOVA handles missing data badly — if some people rated only 7 cookies, the model breaks down. (That fragility is one reason it’s given ground to mixed models.)

Where does the subject variance go?

In an independent ANOVA, total variability splits into just two pieces: the bit explained by the factor, and everything left over (the residual). In a repeated-measures ANOVA we pull out a third piece — the subject sum of squares, the variance due to some participants simply being more generous raters than others. Drag the individual differences below and watch where that variance lands in each design.

In the independent design the subject variance has nowhere to go — it’s swallowed into the grey error bar, and as individual differences grow that bar swells and the F sinks. In the repeated-measures design the same variance is split off into its own green Subject SS, leaving a slim residual — so the cookie effect is tested against noise alone, and its F holds up. That green block is the subject sum of squares, and setting it aside is the whole point.

Running it in R

The mechanics resemble aov(), with one twist: you specify an error term for subjects.

% wide format: rows = subjects, columns = the 4 cookie conditions
t   = array2table(ratings, 'VariableNames', {'Original','DoubleStuf','RedVelvet','Mint'});
rm  = fitrm(t, 'Original-Mint ~ 1');
ranova(rm)      % repeated-measures ANOVA table

The aov() and Python tabs run live; note R’s Error(subject/cookie) — that term is the subject SS.

The main effect of cookie type here has 7 degrees of freedom in the full 8-cookie study (8 levels − 1); a large F with a small p would say ratings genuinely differ across flavours.

What is the subject sum of squares, and why does isolating it make the test more powerful?

It’s the variance due to participants as individuals — some people rate everything high, some everything low. In an independent ANOVA that variance is stuck in the error term, inflating it. A repeated-measures ANOVA splits it off into its own term, so the factor is tested against a smaller residual (just the leftover noise). Smaller error → larger F → more power. That’s the same edge a paired t-test has over an independent one.

Repeated-measures ANOVA needs complete, balanced data: every participant must have a score in every condition, or most functions drop that participant entirely. It also assumes sphericity once a factor has more than two levels (see Sphericity & Mauchly’s Test). Both problems are handled more gracefully by linear mixed models — worth knowing when your design gets messy.

Where this shows up next

See Chapter (Repeated Measures) for the full partitioning and worked Oreo analysis, and the next sheet for actually running these in R.