# Does sphericity (an RM-ANOVA assumption) require the covariances between difference scores to be the same?

Field's Discovering Statistics Using SPSS (2013, Sage) defines sphericity as follows:

Sphericity: a less restrictive form of compound symmetry which assumes that the variances of the differences between data taken from the same participant (or other entity being tested) are equal. This assumption is most commonly found in repeated-measures ANOVA but applies only where there are more than two points of data from the same participant.

This definition doesn't mention anything about the covariances between difference scores needing to be equal. Is that because the definition is incomplete, or because the covariances don't need to be equal? Why is it necessary/not necessary for covariances to be equal?

I found here a comment stating that sphericity implies the difference variables should have the same covariances as each other:

Sphericity implies that "difference variables" (i.e. with 3 RM levels these are: RM1-RM2, RM1-RM3, RM2-RM3) have the identity covariance matrix

I'm thinking here about a repeated-subjects ANOVA.

Here is a table from Field (2013) that illustrates what I mean by difference scores.

As noticed in the comments, there is an error in the book. I've assumed that the first value in Group C is really 8, and that therefore B-C should be 4, and Variance B-C should be 10.7.

I have calculated the covariances between the difference scores (not the actual scores) and they are as follows:

A-B, A-C 7.65
A-B, B-C -8.05
A-C, B-C 2.65


It turns out that the variances of the difference scores are a bit dissimilar (15.7, 10.3, 10.7). However, let's imagine those variances were exactly the same as each other (15.7, 15.7, 15.7), but the three covariances remained very different from one another. Would sphericity thereby be violated? Or are the covariances between difference scores not relevant to sphericity? Why are they relevant or not relevant to sphericity?

• Please notice that $B-C$ in the first row is wrong: $12-8=4$, not $5$. So the variance of $B-C$ is $10.7$, not $10.3$. May 14, 2014 at 11:07
• Sphericity assumption does not require anything about the covariances of the differences. It requires only that their variances are equal (but not necessarily equal to one!). See e.g. An Introduction to Sphericity. In his comment, @ttnphns wrote that sphericity "implies" that the covariances are zero, i.e. his statement seems to be that if the variances (of the differences) are the same, then their covariances have to be zero. Perhaps he can comment himself on why this should be the case? May 10, 2016 at 9:35
• Actually, one can demonstrate by example that this is not the case. Take the 4x4 covariance matrix presented here in An example section. It satisfies sphericity. Now compute covariance between x1-x2 and x3-x4. Covariance is linear, so it's just s13+s24-s23-s24. It is not equal to zero. So here we have a counter-example. @ttnphns, can you explain? May 10, 2016 at 9:42
• @amoeba (This is a genuine question not a rhetorical one -- you probably know more than I do about this topic) ... why would an assumption of constant variance but non-zero covariance be called sphericity? In what sense would the distribution be spherical rather than elliptical? May 11, 2016 at 22:34
• @Glen_b: Actually this is precisely the question I was thinking of asking on the main site. I am not a specialist in this topic; I've been reading up on it yesterday and today in various sources and I have some partial understanding of it by now (spoiler: there is something that is indeed spherical) but I am still lacking a thorough understanding. The name "sphericity assumption" together with the commonly used definition "constant difference variances" is definitely confusing. So far I failed to find any good expositions, btw. I decided against discussing it in the answer I just wrote. May 11, 2016 at 23:10

## 2 Answers

No, it does not.

The assumption of sphericity in RM-ANOVA is usually formulated as in your quote from Field:

the variances of the differences between [RM factor levels] are equal

You can also check e.g. An Introduction to Sphericity, or any reference therein.

Perhaps one can think that this requirement somehow implies that all the covariances between the differences are going to be equal too. This is not the case, as I will demonstrate via an example.

Here is a $4\times4$ covariance matrix between the factor levels, satisfying the sphericity assumption, as presented in the above link:

$$\begin{pmatrix}10& 5& 10& 15\\ 5& 20& 15& 20\\ 10& 15& 30& 25\\ 15& 20& 25& 40\end{pmatrix}$$ It clearly does not satisfy compound symmetry, but it does satisfy sphericity. Indeed, we can easily compute the $6\times 6$ covariance matrix between all pairwise differences using $$\newcommand{\Cov}{\operatorname{Cov}}\Cov(A-B,C-D)=\Cov(A,C)-\Cov(B,C)-\Cov(A,D)+\Cov(B,D).$$

Here is my Matlab code to do it:

S = [10 5 10 15; 5 20 15 20; 10 15 30 25; 15 20 25 40];
diffs = [1 2; 1 3; 1 4; 2 3; 2 4; 3 4];

for i=1:size(diffs,1)
for j=1:size(diffs,1)
SD(i,j) = S(diffs(i,1),diffs(j,1)) + S(diffs(i,2),diffs(j,2)) - ...
S(diffs(i,1),diffs(j,2)) - S(diffs(i,2),diffs(j,1));
end
end


Here is the result:

$$\begin{pmatrix} 20 & 10 & 10 & -10 & -10 & 0\\ 10 & 20& 10& 10& 0& -10\\ 10 & 10 & 20 & 0 & 10 & 10\\ -10 & 10 & 0 & 20 & 10 & -10\\ -10 & 0 & 10 & 10 & 20 & 10\\ 0 &-10 &10 &-10 &10 &20\end{pmatrix}$$

All the values on the diagonal are equal to $20$, hence the sphericity assumption is satisfied. But off-diagonal values are $10$, $-10$, and $0$, i.e. they are not the same.

A reader might wonder why the assumption of equal variances of all differences is called "sphericity", given that none of the covariance matrices presented above is actually spherical (see my answer in What is an isotropic (spherical) covariance matrix?).

This is to be discussed in a separate follow-up thread: Why is the "sphericity assumption" in RM-ANOVA (constant variance of difference scores) called "sphericity"?

• I am trying to find any good geometric interpretations, maybe with 3D plots of the concept of sphericity in RM ANOVA. Do you know of any good posts, or do you have any handy examples? May 12, 2016 at 1:36
• @Antoni Alas, I do not. As you might have seen in my conversation with Glen_b in the comments above, I am still struggling to understand the details of the "sphericity assumption". I looked in a lot of sources by now, and I dislike all of them (and none provides visualizations that I want to see). Unfortunately, this fits to m long-established general impression that all texts on anova, rm-anova, manova, etc. are written in a way that is alien and hardly comprehensible to me (my background is rather ML); this only gets worse with more advanced topics. Visualizations are few and far between. May 12, 2016 at 9:21
• @amoeba I have to say that I'm probably just as puzzled by a lot of the manova (and related) literature. The mathematics is generally okay but there does seem to be something lacking on the explanation side in many books for example. I may just be reading the wrong ones. Nov 28, 2017 at 22:35

As to covariances, the variance of a difference is $\sigma^2_{x-y}=\sigma^2_x+\sigma^2_y-2\sigma_{xy}$, so covariances are somewhat involved, but they don't need to be equal.
Sphericity requires that $$\sigma^2_{i-j}=\sigma^2_i+\sigma^2_j-2\sigma_{ij}=k$$ (the same $k$) for all $i,j$. This doesn't require equal covariances. See this page for an example. This question and my answer could be useful too.

EDIT: In your example there are $N=5$ observation and $J=3$ groups, so checking for sphericity is simple, you just have to compute 15 differences (and 3 variances). If the number of observations were larger, say $N=100$, you should compute 300 differences. Using variances and covariances you just need $J=3$ variances and $J(J-1)/2=3$ covariances. In R:

> A <- c(10,15,25,35,30)
> B <- c(12,15,30,30,27)
> C <- c(8,12,20,28,20)
> # variances
> var(A)
[1] 107.5
> var(B)
[1] 74.7
> var(C)
[1] 60.8
> # covariances
> cov(A,B)
[1] 83.25
> cov(A,C)
[1] 79
> cov(B,C)
[1] 62.4


So the variance-covariance matrix is: $$\begin{bmatrix} 107.5 & 83.25 & 79 \\ 83.25 & 74.7 & 62.4 \\ 79 & 62.4 & 60.8 \end{bmatrix}$$ Now you can check for sphericity: $$\begin{split} Var(A-B) &= 107.5+74.7-2\cdot83.25=15.7 \\ Var(A-C) &= 107.5+60.8-2\cdot 79=10.3 \\ Var(B-C) &= 74.7+60.8-2\cdot 62.4=10.7 \end{split}$$

In the first method you don't need covariances. You need them in the second method. The above algebra shows that:

• if the variances are equal, then the covariances must be equal too (this is compound symmetry, which imply sphericity);
• if the variances are not equal, then the covariances must vary so that the above sums are equal.
• I'm not sure what you mean by "so covariances are implied". What about them is implied? May 13, 2014 at 22:19
• Perhaps "involved" is better ;-) I mean that you need a covariance to compute the variance of a difference. On the other hand, a definition based on equal variances of differences can't say anything about covariances, because they can be equal or different. May 13, 2014 at 22:35
• It depends on the variances, if they vary accordingly. However, if sphericity doesn't hold (see Mauchly's test) you can correct the degrees of freedom or, perhaps better, use a linear mixed model. May 13, 2014 at 23:23
• Variances sould decrease. E.g. in $\begin{bmatrix} 40 & 25 & 20 & 15 \\ 25 & 30 & 15 & 10 \\ 20 & 15 & 20 & 5 \\ 15 & 10 & 5 & 10 \end{bmatrix}$ you can compute $\sigma^2_{1-2}=40+30-2\cdot 25=20$, $\sigma^2_{2-4}=30+10-2\cdot 10=20$, and so on. May 14, 2014 at 8:27
• I believe you have provided an explanation of how one can have uniform variances of difference scores even in the absence of compound symmetry (compound symmetry is absent because there unequal variances and covariances in the matrix). However, I am not sure that your answer addresses the possibility of covariances between the difference scores. I edited the original post to attempt to illustrate more clearly what I mean by difference scores. May 14, 2014 at 10:28