共分散・相関係数
共分散
確率変数 \(X,Y\) に対して \[ \mathrm{Cov}[X,Y]=E[(X-E[X])(Y-E[Y])] \] を \(X,Y\) の共分散という。
\(\mathrm{Cov}[X,Y]\) は \(\sigma_{XY}\) とも書かれる。
- \(\mathrm{Cov}[aX,bY]=ab\mathrm{Cov}[X,Y]\)
- \(\mathrm{Cov}[X+Z,Y]=\mathrm{Cov}[X,Y]+\mathrm{Cov}[Z,Y]\)
- \(\mathrm{Cov}[X,Y]=E[XY]-E[X]E[Y]\)
- \(X\) と \(Y\) が互いに独立ならば、\(\mathrm{Cov}[X,Y]=0\)
相関係数
確率変数 \(X,Y\) に対して \[ \rho[X,Y]=\frac{\mathrm{Cov}[X,Y]}{\sqrt{V[X]V[Y]}} \] を \(X,Y\) の相関係数という。
相関係数 \(\rho[X,Y]\) に対して \[ -1\le \rho[X,Y]\le1 \] が成り立つ。