# “Pairwise not statistically different” leads to “overall statistically different”?

I have a linear mixed-effect model $$y=\beta_0+\beta_1x_1+\beta_2x_2+\beta_3x_3+Zb+e,$$ where $[x_1\ x_2\ x_3]$ represents the fixed effects, and $Z$ represents the random effects. Now, I test the null hypothesis that $\beta_1=\beta_2=\beta_3=0$. The $p$-value turns out to be $2\times10^{-6}$. So I conclude, $\beta_{1,2,3}$ are statistically different.

Now, I wish to further compare the three $\beta$'s with three pairwise comparisons.

1. The $p$-value for "$\beta_1=\beta_2$" is $0.03$. OK, they are not very different.
2. The $p$-value for "$\beta_1=\beta_3$" is $0.09$. OK, they are not different.
3. The $p$-value for "$\beta_2=\beta_3$" is $0.57$. OK, they are VERY not different.

How can this happen?

I mean, the first overall hypothesis testing tells me with $p=2\times10^{-6}$ that the three $\beta$'s are different, then the pairwise comparisons tell me there are no pairwise differences?!

• You were testing that they all equal zero versus testing equalities between pairs but not necessarily that each pair is equal to 0. – jld May 8 '15 at 15:09
• @Chaconne Oh yes, you are right! But I wonder how I can test $\beta_1=\beta_2=\beta_3$? Testing $\beta_1=\beta_2=\beta_3=0$ is easy: just use contrast matrix $$\begin{pmatrix}0&1&0&0&\ldots\\0&0&1&0&\ldots\\0&0&0&1&\ldots\end{pmatrix}$$ – Sibbs Gambling May 8 '15 at 15:22

If you want to test that the three are all equal, i.e. test $H_0: \beta_1 = \beta_2 = \beta_3$ vs $H_A: \mathrm{not} \ H_0$, then observe that this is equivalent to testing $H_0: \beta_1 - \beta_2 = 0 \ \mathrm{and} \ \beta_2 - \beta_3 = 0$ so we can use the contrast $$\begin{pmatrix} 0&1&-1&0&\ldots \\ 0&0&1&-1&\ldots \\ \end{pmatrix}$$
And just a general comment, always be careful to keep your model parameterization in mind when testing coefficients. What you end up doing may be different if $\beta_2$ represents the mean of group 2 vs. the deviation of the mean of group 2 from the mean of a baseline group, for example.