# 协方差矩阵

## 定义

${\displaystyle \mathbf {X} ={\begin{bmatrix}X_{1}\\X_{2}\\\vdots \\X_{n}\end{bmatrix}}}$

${\displaystyle \Sigma _{ij}=\mathrm {cov} (X_{i},X_{j})=\mathrm {E} {\begin{bmatrix}(X_{i}-\mu _{i})(X_{j}-\mu _{j})\end{bmatrix}}}$

${\displaystyle \Sigma =\mathrm {E} \left[\left(\mathbf {X} -\mathrm {E} [\mathbf {X} ]\right)\left(\mathbf {X} -\mathrm {E} [\mathbf {X} ]\right)^{\rm {T}}\right]}$
${\displaystyle ={\begin{bmatrix}\mathrm {E} [(X_{1}-\mu _{1})(X_{1}-\mu _{1})]&\mathrm {E} [(X_{1}-\mu _{1})(X_{2}-\mu _{2})]&\cdots &\mathrm {E} [(X_{1}-\mu _{1})(X_{n}-\mu _{n})]\\\\\mathrm {E} [(X_{2}-\mu _{2})(X_{1}-\mu _{1})]&\mathrm {E} [(X_{2}-\mu _{2})(X_{2}-\mu _{2})]&\cdots &\mathrm {E} [(X_{2}-\mu _{2})(X_{n}-\mu _{n})]\\\\\vdots &\vdots &\ddots &\vdots \\\\\mathrm {E} [(X_{n}-\mu _{n})(X_{1}-\mu _{1})]&\mathrm {E} [(X_{n}-\mu _{n})(X_{2}-\mu _{2})]&\cdots &\mathrm {E} [(X_{n}-\mu _{n})(X_{n}-\mu _{n})]\end{bmatrix}}}$

## 术语与符号分歧

${\displaystyle \operatorname {var} (\mathbf {X} )=\operatorname {cov} (\mathbf {X} )=\mathrm {E} \left[(\mathbf {X} -\mathrm {E} [\mathbf {X} ])(\mathbf {X} -\mathrm {E} [\mathbf {X} ])^{\rm {T}}\right].}$

${\displaystyle \operatorname {cov} ({\textbf {X}},{\textbf {Y}})=\mathrm {E} \left[({\textbf {X}}-\mathrm {E} [{\textbf {X}}])({\textbf {Y}}-\mathrm {E} [{\textbf {Y}}])^{\top }\right]}$

## 性质

${\displaystyle \Sigma =\mathrm {E} \left[\left({\textbf {X}}-\mathrm {E} [{\textbf {X}}]\right)\left({\textbf {X}}-\mathrm {E} [{\textbf {X}}]\right)^{\top }\right]}$${\displaystyle \mu =\mathrm {E} ({\textbf {X}})}$ 满足下边的基本性质：

1. ${\displaystyle \Sigma =\mathrm {E} (\mathbf {XX^{\top }} )-\mathbf {\mu } \mathbf {\mu ^{\top }} }$
2. ${\displaystyle \Sigma }$半正定的和对称的矩阵。
3. ${\displaystyle \operatorname {var} (\mathbf {a^{\top }} \mathbf {X} )=\mathbf {a^{\top }} \operatorname {var} (\mathbf {X} )\mathbf {a} }$
4. ${\displaystyle \mathbf {\Sigma } \geq 0}$
5. ${\displaystyle \operatorname {var} (\mathbf {AX} +\mathbf {a} )=\mathbf {A} \operatorname {var} (\mathbf {X} )\mathbf {A^{\top }} }$
6. ${\displaystyle \operatorname {cov} (\mathbf {X} ,\mathbf {Y} )=\operatorname {cov} (\mathbf {Y} ,\mathbf {X} )^{\top }}$
7. ${\displaystyle \operatorname {cov} (\mathbf {X_{1}} +\mathbf {X_{2}} ,\mathbf {Y} )=\operatorname {cov} (\mathbf {X_{1}} ,\mathbf {Y} )+\operatorname {cov} (\mathbf {X_{2}} ,\mathbf {Y} )}$
8. ${\displaystyle p=q}$，则有${\displaystyle \operatorname {cov} (\mathbf {X} +\mathbf {Y} )=\operatorname {var} (\mathbf {X} )+\operatorname {cov} (\mathbf {X} ,\mathbf {Y} )+\operatorname {cov} (\mathbf {Y} ,\mathbf {X} )+\operatorname {var} (\mathbf {Y} )}$
9. ${\displaystyle \operatorname {cov} (\mathbf {AX} ,\mathbf {BX} )=\mathbf {A} \operatorname {cov} (\mathbf {X} ,\mathbf {X} )\mathbf {B} ^{\top }}$
10. ${\displaystyle \mathbf {X} }$${\displaystyle \mathbf {Y} }$ 是独立的，则有${\displaystyle \operatorname {cov} (\mathbf {X} ,\mathbf {Y} )=0}$
11. ${\displaystyle \Sigma =\Sigma ^{\top }}$

## 复随机向量

${\displaystyle \operatorname {var} (z)=\operatorname {E} \left[(z-\mu )(z-\mu )^{*}\right]}$

${\displaystyle \operatorname {E} \left[(Z-\mu )(Z-\mu )^{*}\right]}$