Solution (source code)

= Solution

Since $Y-HY=(I-H)μ+(I-H)ε$, the cross term has mean zero and $H$ is symmetric. Thus the expectation is $\|(I-H)μ\|^2+σ^2\operatorname{tr}(I-H)^2$, which expands to the stated expression.