In multivariate statistics, if
\varepsilon
n
Λ
n
\varepsilonTΛ\varepsilon
\varepsilon
It can be shown that[1]
\operatorname{E}\left[\varepsilonTΛ\varepsilon\right]=\operatorname{tr}\left[Λ\Sigma\right]+\muTΛ\mu
where
\mu
\Sigma
\varepsilon
\mu
\Sigma
\varepsilon
A book treatment of the topic of quadratic forms in random variables is that of Mathai and Provost.[2]
Since the quadratic form is a scalar quantity,
\varepsilonTΛ\varepsilon=\operatorname{tr}(\varepsilonTΛ\varepsilon)
Next, by the cyclic property of the trace operator,
\operatorname{E}[\operatorname{tr}(\varepsilonTΛ\varepsilon)]=\operatorname{E}[\operatorname{tr}(Λ\varepsilon\varepsilonT)].
Since the trace operator is a linear combination of the components of the matrix, it therefore follows from the linearity of the expectation operator that
\operatorname{E}[\operatorname{tr}(Λ\varepsilon\varepsilonT)]=\operatorname{tr}(Λ\operatorname{E}(\varepsilon\varepsilonT)).
A standard property of variances then tells us that this is
\operatorname{tr}(Λ(\Sigma+\mu\muT)).
Applying the cyclic property of the trace operator again, we get
\operatorname{tr}(Λ\Sigma)+\operatorname{tr}(Λ\mu\muT)=\operatorname{tr}(Λ\Sigma)+\operatorname{tr}(\muTΛ\mu)=\operatorname{tr}(Λ\Sigma)+\muTΛ\mu.
In general, the variance of a quadratic form depends greatly on the distribution of
\varepsilon
\varepsilon
Λ
\operatorname{var}\left[\varepsilonTΛ\varepsilon\right]=2\operatorname{tr}\left[Λ\SigmaΛ\Sigma\right]+4\muTΛ\SigmaΛ\mu
In fact, this can be generalized to find the covariance between two quadratic forms on the same
\varepsilon
Λ1
Λ2
TΛ | |
\operatorname{cov}\left[\varepsilon | |
2\varepsilon\right]=2\operatorname{tr}\left[Λ |
1\SigmaΛ2\Sigma\right]+
TΛ | |
4\mu | |
1\SigmaΛ |
2\mu
In addition, a quadratic form such as this follows a generalized chi-squared distribution.
The case for general
Λ
\varepsilonTΛT\varepsilon=\varepsilonTΛ\varepsilon
so
\varepsilonT\tilde{Λ}\varepsilon=\varepsilonT\left(Λ+ΛT\right)\varepsilon/2
is a quadratic form in the symmetric matrix
\tilde{Λ}=\left(Λ+ΛT\right)/2
Λ
\tilde{Λ}
In the setting where one has a set of observations
y
H
y
rm{RSS}=yT(I-H)T(I-H)y.
For procedures where the matrix
H
\sigma2I
rm{RSS}/\sigma2
k
λ
k=\operatorname{tr}\left[(I-H)T(I-H)\right]
λ=\muT(I-H)T(I-H)\mu/2
may be found by matching the first two central moments of a noncentral chi-squared random variable to the expressions given in the first two sections. If
Hy
\mu
λ
rm{RSS}/\sigma2