Why a Complete Repeated-Measures Analysis Needs Several Steps
When the same subjects are measured under each of several conditions, their responses are related: a subject who tends to have high scores in one condition may tend to have high scores in the others. A one-factor repeated-measures ANOVA compares the condition means while accounting for these subject-to-subject baselines. A complete analysis therefore identifies the design, states a model and its assumptions, partitions variation, and interprets the resulting test in the study’s context.
The example calculations below use hypothetical data. The method applies when every subject has one response in every condition, so the design is balanced and complete. The condition effect is the scientific comparison of interest; variation among subjects is separated from the residual variation used to test that effect.
Design, Model, and Assumptions
A standard one-factor repeated-measures model is
Here \(\mu\) is the overall mean, \(\tau_j\) is the effect of condition \(j\), \(s_i\) represents subject \(i\)'s baseline relative to the overall mean, and \(\varepsilon_{ij}\) is the remaining response variation. The condition effects are commonly constrained to sum to zero, and the subject effects are centered around zero. For this analysis, conditions are treated as fixed levels: the question is whether their population means are all equal.
The usual repeated-measures F test also requires that subjects be independent of one another, that the response distributions (or model errors) are sufficiently well behaved for the normal-theory test, and that the within-subject covariance satisfies sphericity when there are more than two conditions. Sphericity means that the variances of all pairwise differences between condition responses are equal. The standard F test is exact under the model’s normality and sphericity assumptions; severe outliers or marked departures can make its reference distribution unreliable. The data should also be complete, with the same subjects observed in all conditions. With only two conditions, sphericity is automatically satisfied.
Independence applies across subjects, not across the \(k\) observations from the same subject. The repeated measurements are deliberately related. How to characterize and diagnose the within-subject covariance structure is a separate topic; here, it is enough to recognize sphericity as a required condition for the usual test with three or more conditions.
The omnibus hypotheses are
A rejection indicates evidence that at least one condition mean differs. It does not, by itself, identify which conditions differ.
Worked Example: Recognizing the Design and Comparing Condition Means
Suppose four hypothetical volunteers each complete a task under three settings, and a researcher records a response time in seconds. The data are:
| Subject | Setting A | Setting B | Setting C |
|---|---|---|---|
| 1 | 8 | 6 | 5 |
| 2 | 7 | 6 | 4 |
| 3 | 9 | 8 | 6 |
| 4 | 6 | 5 | 4 |
Design. There are \(n=4\) subjects, \(k=3\) conditions, and one response per subject-condition combination. The subject is the experimental unit; the three measurements from one subject are not three independent subjects.
Condition means. The sums are \(30\), \(25\), and \(19\) seconds, so the respective means are \(30/4=7.50\), \(25/4=6.25\), and \(19/4=4.75\) seconds. These descriptive means show the pattern in the sample, but do not alone determine whether the differences are statistically significant.
Model and assumptions. The responses can be represented by \(Y_{ij}=\mu+\tau_j+s_i+\varepsilon_{ij}\). A valid analysis would require independent volunteers, complete measurements, reasonable normal-theory behavior without severe outliers, and sphericity for the three conditions. The table confirms completeness and balance; independence and the distributional and covariance assumptions must be justified from the study design and data, not inferred from the means.
Partitioning Variation and Building the F Test
Let \(T_j=\sum_iY_{ij}\) be the total for condition \(j\), \(R_i=\sum_jY_{ij}\) the total for subject \(i\), and \(G=\sum_i\sum_jY_{ij}\) the grand total. The total sum of squares measures all response variation around the grand mean. It is partitioned into condition variation, subject variation, and residual variation:
For a balanced design, the calculation formulas are
The degrees of freedom are \(nk-1\) for total variation, \(k-1\) for conditions, \(n-1\) for subjects, and \((n-1)(k-1)\) for error. The condition mean square is \(MS_{\text{condition}}=SS_{\text{condition}}/(k-1)\); the error mean square is \(MS_{\text{error}}=SS_{\text{error}}/((n-1)(k-1))\). The repeated-measures test statistic is \(F=MS_{\text{condition}}/MS_{\text{error}}\). Under \(H_0\) and the assumptions, it is compared with an F distribution with \(k-1\) and \((n-1)(k-1)\) degrees of freedom.
Why the Decomposition Works
For each observation, subtract and add its subject mean and condition mean, then subtract the grand mean:
The three terms on the right represent, respectively, the condition deviation, the subject deviation, and the residual after accounting for both. Squaring and summing over all observations gives the sum of their squared contributions plus cross-products. Each cross-product sums to zero: for example, the residuals sum to zero within every condition and within every subject, so their products with condition-only or subject-only deviations cancel. The condition and subject deviations also have zero cross-product because the balanced design repeats each condition equally for every subject. Thus the total sum of squares is exactly the sum of the three components. This partition is why subject baseline variation can be removed from the error term used to test conditions.
Worked Example: Complete Repeated-Measures ANOVA
Five hypothetical subjects each complete a task in three conditions. Their measured scores are shown below. Assume higher scores indicate more of the measured response.
| Subject | Condition 1 | Condition 2 | Condition 3 | Subject total | |
|---|---|---|---|---|---|
| 1 | 8 | 10 | 12 | 30 | |
| 2 | 7 | 9 | 10 | 26 | |
| 3 | 9 | 10 | 13 | 32 | |
| 4 | 6 | 8 | 9 | 23 | |
| 5 | 10 | 11 | 14 | 35 | |
| Condition total | 40 | 48 | 58 | Grand total: 146 |
Check the setup. There are \(n=5\) independent subjects and \(k=3\) complete conditions, so \(N=nk=15\). The condition means are \(40/5=8.00\), \(48/5=9.60\), and \(58/5=11.60\), and the grand mean is \(146/15=9.733\) score units. For the inferential calculation, assume the subjects were independently sampled or assigned, the model’s normality condition is reasonable without severe outliers, and sphericity is plausible. The balanced table verifies complete repeated observations, but by itself cannot establish the covariance or normality assumptions.
Calculate total variation. The sum of all squared observations is \(1486\). Therefore,
Calculate condition variation. The condition totals are \(40,48,58\), so
Calculate subject and error variation. The subject totals are \(30,26,32,23,35\), whose squared values sum to \(4354\). Thus
and
The decomposition checks: \(32.5333+30.2667+2.1333=64.9333\), up to rounding.
Degrees of freedom and test. The condition degrees of freedom are \(3-1=2\), the subject degrees of freedom are \(5-1=4\), the error degrees of freedom are \((3-1)(5-1)=8\), and total degrees of freedom are \(15-1=14\). These add correctly: \(2+4+8=14\). The mean squares and F statistic are
For \(F(2,8)\), the upper-tail probability at 61.00 is approximately \(0.0000143\). At, for example, \(\alpha=0.05\), this is strong evidence against equal population condition means, provided the assumptions are reasonable. The result establishes evidence of a condition effect, not which pair of conditions differs or why.
Worked Example: Quantifying and Reporting the Result
Continue with the hypothetical five-subject study above. The F statistic is \(61.00\) with \(2\) and \(8\) degrees of freedom, and its upper-tail p-value is approximately \(0.0000143\). For these degrees of freedom, the upper-tail probability can also be calculated as \(P(F_{2,8}\geq f)=(1+f/4)^{-4}\). Substituting \(f=61\) gives
This is the probability, assuming equal condition means and the model assumptions, of obtaining an F statistic at least as large as 61.00. It is not the probability that \(H_0\) is true.
A descriptive measure of the condition effect relative to condition plus error variation is partial eta squared:
In this sample, about 93.85% of the combined condition and residual sum of squares is attributable to condition differences after accounting for subjects. This is a sample effect-size description, not proof that condition caused the difference; causal interpretation depends on how conditions were assigned and conducted.
A suitable report is: “For these five hypothetical subjects, mean scores were 8.00, 9.60, and 11.60 units across the three conditions. A one-factor repeated-measures ANOVA found evidence that not all population condition means were equal, \(F(2,8)=61.00\), \(p\approx0.0000143\), assuming the required conditions hold.” The omnibus result does not specify the differing pairs, so a pairwise follow-up would be needed to make that claim.
Common Mistakes and Why the Method Matters
- Using an independent-groups ANOVA. The three responses from one subject are not independent observations. The repeated-measures analysis separates subject baselines and uses the subject-by-condition residual variation for the condition test.
- Interpreting the omnibus test as a set of pairwise conclusions. Rejecting \(H_0\) means at least one population mean differs; it does not establish that every pair differs.
- Ignoring assumptions because the table is balanced. Balance makes the formulas straightforward, but does not establish independent subjects, reasonable normality, or sphericity.
- Claiming the condition caused a change without design support. Statistical evidence of differing means does not by itself rule out order, period, or other confounding effects. The study design must support a causal interpretation.
Repeated-measures ANOVA matters because stable differences among subjects can otherwise obscure the condition comparison. Treating the subject as a block removes this baseline variation from the error term, often making the condition test more informative. The analysis is only as credible as its design and assumptions, so report the measured subjects and conditions, verify the sums-of-squares partition, and state the conclusion at the level the omnibus test supports.
Check Your Understanding
Try these questions before reviewing the calculations.
- A study records each of 12 participants under four conditions. What are \(n\), \(k\), and the experimental unit?
- In a complete balanced design with \(n=6\) subjects and \(k=3\) conditions, calculate the error degrees of freedom.
- What does a significant omnibus repeated-measures F test establish, and what does it leave unresolved?
- Why is it incorrect to describe the \(k\) observations from one subject as independent groups?
- Name the key covariance condition required by the usual repeated-measures F test when there are more than two conditions.