# 二次型 (统计)

## 期望

${\displaystyle \operatorname {E} \left[\varepsilon ^{T}\Lambda \varepsilon \right]=\operatorname {tr} \left[\Lambda \Sigma \right]+\mu ^{T}\Lambda \mu }$

### 证明

${\displaystyle \operatorname {tr} (\operatorname {E} \left[\varepsilon ^{T}\Lambda \varepsilon \right])=\operatorname {E} [\operatorname {tr} (\varepsilon ^{T}\Lambda \varepsilon )].}$

${\displaystyle \operatorname {E} [\operatorname {tr} (\varepsilon ^{T}\Lambda \varepsilon )]=\operatorname {E} [\operatorname {tr} (\Lambda \varepsilon \varepsilon ^{T})].}$

${\displaystyle \operatorname {E} [\operatorname {tr} (\Lambda \varepsilon \varepsilon ^{T})]=\operatorname {tr} (\Lambda \operatorname {E} (\varepsilon \varepsilon ^{T})).}$

${\displaystyle \operatorname {tr} (\Lambda (\Sigma +\mu \mu ^{T})).}$

${\displaystyle \operatorname {tr} (\Lambda \Sigma )+\operatorname {tr} (\Lambda \mu \mu ^{T})=\operatorname {tr} (\Lambda \Sigma )+\operatorname {tr} (\mu ^{T}\Lambda \mu )=\operatorname {tr} (\Lambda \Sigma )+\mu ^{T}\Lambda \mu .}$

## 方差

${\displaystyle \operatorname {var} \left[\varepsilon ^{T}\Lambda \varepsilon \right]=2\operatorname {tr} \left[\Lambda \Sigma \Lambda \Sigma \right]+4\mu ^{T}\Lambda \Sigma \Lambda \mu }$  [3].

${\displaystyle \operatorname {cov} \left[\varepsilon ^{T}\Lambda _{1}\varepsilon ,\varepsilon ^{T}\Lambda _{2}\varepsilon \right]=2\operatorname {tr} \left[\Lambda _{1}\Sigma \Lambda _{2}\Sigma \right]+4\mu ^{T}\Lambda _{1}\Sigma \Lambda _{2}\mu }$

### 不对称矩阵的方差计算

${\displaystyle \varepsilon ^{T}\Lambda ^{T}\varepsilon =\varepsilon ^{T}\Lambda \varepsilon }$

${\displaystyle \varepsilon ^{T}{\tilde {\Lambda }}\varepsilon =\varepsilon ^{T}\left(\Lambda +\Lambda ^{T}\right)\varepsilon /2}$

## 二次型举例

${\displaystyle {\textrm {RSS}}=y^{T}(I-H)^{T}(I-H)y.}$

${\displaystyle k=\operatorname {tr} \left[(I-H)^{T}(I-H)\right]}$
${\displaystyle \lambda =\mu ^{T}(I-H)^{T}(I-H)\mu /2}$

## 参考文献

1. ^ Douglas, Bates. Quadratic Forms of Random Variables (PDF). STAT 849 lectures. [August 21, 2011]. （原始内容存档 (PDF)于2016-03-04）.
2. ^ Mathai, A. M. & Provost, Serge B. Quadratic Forms in Random Variables. CRC Press. 1992: 424. ISBN 978-0824786915.
3. ^ 1934-, Rencher, Alvin C.,. Linear models in statistics. Schaalje, G. Bruce., Wiley InterScience (Online service) 2nd ed. Hoboken, N.J.: Wiley-Interscience. 2008. ISBN 9780471754985. OCLC 212120778.