本文介绍随机变量中正交、不相关、独立的区别和联系。
三者均是描述随机变量之间关系的概念,看似都可以表示两个随机变量的疏远关系,但定义和约束均有不同。
定义 R ( X , Y ) = E [ X Y ] R(X, Y) = E[XY] R(X,Y)=E[XY]为相关函数:若 R ( X , Y ) = 0 R(X, Y)=0 R(X,Y)=0,称 X , Y X,Y X,Y正交
定义 E [ X Y ] = E [ X ] E [ Y ] E[XY] = E[X]E[Y] E[XY]=E[X]E[Y],则 X , Y X,Y X,Y不相关
C o v ( X , Y ) = E [ X Y ] − E [ X ] E [ Y ] Cov(X,Y)=E[XY]- E[X]E[Y] Cov(X,Y)=E[XY]−E[X]E[Y]
不相关也可以用协方差为0表示
r ( X , Y ) = Cov ( X , Y ) Var [ X ] Var [ Y ] r(X, Y)=\frac{\operatorname{Cov}(X, Y)}{\sqrt{\operatorname{Var}[X] \operatorname{Var}[Y]}} r(X,Y)=Var[X]Var[Y]Cov(X,Y)
不相关也可以用相关系数为0表示
独立一般用他们的概率密度函数来表示。联合分布等于他们各自的独立边缘分布的乘积,则称为独立:
p ( X , Y ) = p ( X ) p ( Y ) p(X,Y) = p(X)p(Y) p(X,Y)=p(X)p(Y)
独立是对变量更严苛的要求,如果两个随机变量独立,则必定不相关,也就是说独立是不相关的充分不必要条件。
{% raw %}
E ( X , Y ) = ∬ x y f ( x , y ) d x d y = ∬ x y g ( x ) h ( y ) d x d y = ∫ x g ( x ) d x ∫ y h ( y ) d y = E ( X ) E ( Y ) E (X,Y)=\iint x y f(x, y) d x d y=\iint x y g(x) h(y) d x d y=\int x g(x) d x \int y h(y) d y=E (X) E(Y) E(X,Y)=∬xyf(x,y)dxdy=∬xyg(x)h(y)dxdy=∫xg(x)dx∫yh(y)dy=E(X)E(Y)
{% endraw %}
在随机变量服从高斯分布时,不相关可以推导出独立:
X T = [ x 1 , x 2 , . . . , x n ] X^T=[x_1,x_2,...,x_n] XT=[x1,x2,...,xn]
C o v ( x i , x j ) = 0 , i ≠ j Cov(x_i,x_j)=0,i \ne j Cov(xi,xj)=0,i=j
x i ∼ N ( μ i , σ i 2 ) x_i \sim N\left(\mu_i, \sigma_i^{2}\right) xi∼N(μi,σi2)
f ( x 1 , x x … , x n ) = 1 ( 2 π ) n ∣ Σ ∣ 1 2 e − 1 2 ( X − μ ) T Σ − 1 ( X − μ ) f\left( {{x_1},{x_x} \ldots ,{x_n}} \right) = \frac{1}{{\sqrt {{{\left( {2\pi } \right)}^n}} {{\left| {\bf{\Sigma }} \right|}^{\frac{1}{2}}}}}{e^{ - \frac{1}{2}{{({\bf{X}} - {\bf{\mu }})}^T}{{\bf{\Sigma }}^{ - 1}}({\bf{X}} - {\bf{\mu }})}} f(x1,xx…,xn)=(2π)n∣Σ∣211e−21(X−μ)TΣ−1(X−μ)
Σ = ( σ 1 2 σ 2 2 ⋱ σ n 2 ) {\bf{\Sigma }} = \left( {\begin{array}{c} {\sigma _1^2}&{}&{}&{}\\ {}&{\sigma _2^2}&{}&{}\\ {}&{}& \ddots &{}\\ {}&{}&{}&{\sigma _n^2} \end{array}} \right) Σ=⎝⎜⎜⎛σ12σ22⋱σn2⎠⎟⎟⎞
f ( x 1 , x x … , x n ) = 1 ( 2 π ) n ∏ i = 1 n σ i e − 1 2 ( X − μ ) T ( 1 σ 1 2 1 σ 2 2 ⋱ 1 σ n 2 ) ( X − μ ) = 1 ( 2 π ) n ∏ i = 1 n σ i e − 1 2 [ x 1 − μ 1 σ 1 2 , x 2 − μ 2 σ 2 2 , . . . , x n − μ n σ n 2 ] ( X − μ ) = 1 ( 2 π ) n ∏ i = 1 n σ i e − 1 2 ∑ i = 1 n ( x n − μ n ) 2 σ n 2 = ∏ i = 1 n 1 2 π σ i e − 1 2 ( x i − μ i ) 2 σ i 2 = ∏ i = 1 n f ( x i ) \begin{aligned} f\left( {{x_1},{x_x} \ldots ,{x_n}} \right) &= \frac{1}{{\sqrt {{{\left( {2\pi } \right)}^n}} \prod\limits_{i = 1}^n {{\sigma _i}} }}{e^{ - \frac{1}{2}{{({\bf{X}} - {\bf{\mu }})}^T}\left( {\begin{array}{c} {\frac{1}{{\sigma _1^2}}}&{}&{}&{}\\ {}&{\frac{1}{{\sigma _2^2}}}&{}&{}\\ {}&{}& \ddots &{}\\ {}&{}&{}&{\frac{1}{{\sigma _n^2}}}\\ \end{array}} \right)({\bf{X}} - {\bf{\mu }})}}\\ &= \frac{1}{{\sqrt {{{\left( {2\pi } \right)}^n}} \prod\limits_{i = 1}^n {{\sigma _i}} }}{e^{ - \frac{1}{2}[\frac{{{x_1} - {\mu _1}}}{{\sigma _1^2}},\frac{{{x_2} - {\mu _2}}}{{\sigma _2^2}},...,\frac{{{x_n} - {\mu _n}}}{{\sigma _n^2}}]({\bf{X}} - {\bf{\mu }})}}\\ & = \frac{1}{{\sqrt {{{\left( {2\pi } \right)}^n}} \prod\limits_{i = 1}^n {{\sigma _i}} }}{e^{ - \frac{1}{2}\sum\limits_{i = 1}^n {\frac{{{{({x_n} - {\mu _n})}^2}}}{{\sigma _n^2}}} }}\\ & = \prod\limits_{i = 1}^n {\frac{1}{{\sqrt {2\pi } {\sigma _i}}}} {e^{ - \frac{1}{2}\frac{{{{({x_i} - {\mu _i})}^2}}}{{\sigma _i^2}}}} \\ & = \prod\limits_{i = 1}^n {f({x_i})} \end{aligned} f(x1,xx…,xn)=(2π)ni=1∏nσi1e−21(X−μ)T⎝⎜⎜⎜⎛σ121σ221⋱σn21⎠⎟⎟⎟⎞(X−μ)=(2π)ni=1∏nσi1e−21[σ12x1−μ1,σ22x2−μ2,...,σn2xn−μn](X−μ)=(2π)ni=1∏nσi1e−21i=1∑nσn2(xn−μn)2=i=1∏n2πσi1e−21σi2(xi−μi)2=i=1∏nf(xi)