# 协方差矩阵

## 定义

${\displaystyle (\Omega ,\,\Sigma ,\,P)}$機率空間${\displaystyle X=\{x_{i}\}_{i=1}^{m}}$${\displaystyle Y=\{y_{i}\}_{j=1}^{n}}$ 是定義在 ${\displaystyle \Omega }$ 上的兩列实数随机变量序列

${\displaystyle E(x_{i})=\int _{\Omega }x_{i}\,dP=\mu _{i}}$
${\displaystyle E(y_{j})=\int _{\Omega }y_{j}\,dP=\nu _{j}}$

${\displaystyle \operatorname {\mathbf {cov} } (X,Y):={\left[\,\operatorname {cov} (x_{i},y_{j})\,\right]}_{m\times n}={{\bigg [}\,\operatorname {E} [(x_{i}-\mu _{i})(y_{j}-\nu _{j})]\,{\bigg ]}}_{m\times n}}$

${\displaystyle \operatorname {\mathbf {cov} } (X,Y)={\begin{bmatrix}\operatorname {cov} (x_{1},y_{1})&\operatorname {cov} (x_{1},y_{2})&\cdots &\operatorname {cov} (x_{1},y_{n})\\\operatorname {cov} (x_{2},y_{1})&\operatorname {cov} (x_{2},y_{2})&\cdots &\operatorname {cov} (x_{2},y_{n})\\\vdots &\vdots &\ddots &\vdots \\\operatorname {cov} (x_{m},y_{1})&\operatorname {cov} (x_{m},y_{2})&\cdots &\operatorname {cov} (x_{m},y_{n})\end{bmatrix}}}$
${\displaystyle ={\begin{bmatrix}\mathrm {E} [(x_{1}-\mu _{1})(y_{1}-\nu _{1})]&\mathrm {E} [(x_{1}-\mu _{1})(y_{2}-\nu _{2})]&\cdots &\mathrm {E} [(x_{1}-\mu _{1})(y_{n}-\nu _{n})]\\\mathrm {E} [(x_{2}-\mu _{2})(y_{1}-\nu _{1})]&\mathrm {E} [(x_{2}-\mu _{2})(y_{2}-\nu _{2})]&\cdots &\mathrm {E} [(x_{2}-\mu _{2})(y_{n}-\nu _{n})]\\\vdots &\vdots &\ddots &\vdots \\\mathrm {E} [(x_{m}-\mu _{m})(y_{1}-\nu _{1})]&\mathrm {E} [(x_{m}-\mu _{m})(y_{2}-\nu _{2})]&\cdots &\mathrm {E} [(x_{m}-\mu _{m})(y_{n}-\nu _{n})]\end{bmatrix}}}$

${\displaystyle \operatorname {\mathbf {cov} } (X,Y)={\left[\,\operatorname {E} (x_{i}y_{j})-\mu _{i}\nu _{j}\,\right]}_{n\times n}}$

### 矩陣表示法

${\displaystyle \mathbf {X} :={\begin{bmatrix}x_{1}\\x_{2}\\\vdots \\x_{m}\end{bmatrix}}}$ ${\displaystyle \mathbf {Y} :={\begin{bmatrix}y_{1}\\y_{2}\\\vdots \\y_{n}\end{bmatrix}}}$

${\displaystyle \mathrm {E} [\mathbf {A} ]:={\left[\,\operatorname {E} (a_{ij})\,\right]}_{m\times n}}$

${\displaystyle \mathrm {E} [\mathbf {A} ]:={\begin{bmatrix}\operatorname {E} (a_{11})&\operatorname {E} (a_{12})&\cdots &\operatorname {E} (a_{1n})\\\operatorname {E} (a_{21})&\operatorname {E} (a_{22})&\cdots &\operatorname {E} (a_{2n})\\\vdots &\vdots &\ddots &\vdots \\\operatorname {E} (a_{m1})&\operatorname {E} (a_{m2})&\cdots &\operatorname {E} (a_{mn})\end{bmatrix}}}$

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

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

### 术语与符号分歧

{\displaystyle {\begin{aligned}\mathbf {\Sigma } _{X}&:={\left[\operatorname {cov} (x_{i},x_{j})\right]}_{m\times m}\\&=\operatorname {\mathbf {cov} } (X,X)\end{aligned}}}

${\displaystyle \operatorname {cov} (x_{i},x_{i})=\operatorname {E} [{(x_{i}-\mu _{i})}^{2}]=\operatorname {var} (x_{i})}$

## 性质

${\displaystyle \mathbf {\Sigma } =\operatorname {\mathbf {cov} } (X,X)}$ 有以下的基本性质：

1. ${\displaystyle \mathbf {\Sigma } =\mathrm {E} (\mathbf {X} \mathbf {X} ^{T})-\mathrm {E} (\mathbf {X} ){[\mathrm {E} (\mathbf {X} )]}^{T}}$
2. ${\displaystyle \mathbf {\Sigma } }$半正定的和对称的矩阵。
3. ${\displaystyle \operatorname {var} (\mathbf {a^{T}} \mathbf {X} )=\mathbf {a^{T}} \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^{T}} }$
6. ${\displaystyle \operatorname {cov} (\mathbf {X} ,\mathbf {Y} )=\operatorname {cov} (\mathbf {Y} ,\mathbf {X} )^{T}}$
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 {var} (\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} ^{T}}$
10. ${\displaystyle \mathbf {X} }$${\displaystyle \mathbf {Y} }$ 是独立的，則有${\displaystyle \operatorname {cov} (\mathbf {X} ,\mathbf {Y} )=0}$
11. ${\displaystyle \mathbf {\Sigma } =\mathbf {\Sigma } ^{T}}$

## 複随机向量

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

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