Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Consider $Y_{ij} = \mu + u_i + e_{ij}$ where $\mu$ is a constant and $u_i ∼ N(0,\sigma_u^2 )$ is the subject $i$ random effect which is independent of the error term $e_{ij} ∼ N(0,σ_e^2)$. I can't figure out why $${\rm cov}(Y_{ij}, Y_{ik}) = \sigma_u^2$$

Can anyone please explain?

share|improve this question
up vote 12 down vote accepted


$$ {\rm cov}(Y_{ij}, Y_{ik}) = {\rm cov}(u_{i} + e_{ij}, u_{i} + e_{ik}) $$

since the constant term, $\mu$, does not affect variances or covariances. By the bilinearity of covariance we have

$$ {\rm cov}(Y_{ij}, Y_{ik}) = {\rm cov}(u_{i}, u_{i}) + {\rm cov}(u_{i}, e_{ik}) + {\rm cov}(e_{ij}, u_{i}) + {\rm cov}(e_{ij}, e_{ik}) $$

By independence of $u_{i}$ and each $e_{ij}, e_{ik}$ and independence between $e_{ij}$ and $e_{ik}$ (which must be assumed for this model to make sense), the 2nd, 3rd and 4th terms are all zero above (since independence between two variables implies that their covariance is 0). So,

$$ {\rm cov}(Y_{ij}, Y_{ik}) = {\rm cov}(u_{i}, u_{i}) = {\rm var}(u_{i}) = \sigma^{2}_{u} $$

share|improve this answer
To cover the case when $j=k$, you may add a Kronecker delta to Macros's answer: $\mathrm{Cov}[Y_{ij},Y_{ik}]=\sigma^2_u+\sigma^2_e\,\delta_{jk}$. – Zen May 21 '12 at 2:45
or you could just note that $${\rm cov}(Y_{ij},Y_{ij}) = {\rm var}(Y_{ij}) = \sigma^{2}_{u} + \sigma^{2}_{e}$$ – Macro May 21 '12 at 2:46
You are right. I'm just pointing a way to make the formula work for every $i,j,k$. – Zen May 21 '12 at 2:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.