Section05_相关系数

基本概念

定义

ρXY=Cov(XEXEX,YEYEY)=Cov(X,Y)EXEYCov(X,Y)=ρXYDXDY \begin{split} & \rho_{XY} = \mathrm{Cov}\bigg(\frac{X-EX}{\sqrt{EX}}, \frac{Y-EY}{\sqrt{EY}}\bigg) \\ = & \frac{\mathrm{Cov}(X,Y)}{\sqrt{EX}\cdot \sqrt{EY}} \\ \Rightarrow & \mathrm{Cov}(X,Y) = \rho_{XY}\cdot \sqrt{DX} \sqrt{DY} \end{split}

  • 反映 X,YX,Y 线性关系的紧密程度

性质

  1. ρXY1\vert \rho_{XY} \vert\le 1
  2. ρXY=0\rho_{XY} = 0XXYY 不相关(无线性关系)
    • Cov(X,Y)=0\Leftrightarrow \mathrm{Cov}(X,Y) = 0
    • D(X±Y)=DX+DY\Leftrightarrow D(X\pm Y) = DX + DY
    • EXY=EXEY\Leftrightarrow EXY = EX \cdot EY
  3. ρXY=1P{Y=aX+b}=1,a0\vert \rho_{XY} \vert = 1 \Leftrightarrow \mathbb{P}\{Y = aX + b\} = 1, a\ne 0
    • a<0ρXY=1a < 0 \Rightarrow \rho_{XY} = -1
    • a>0ρXY=1a > 0 \Rightarrow \rho_{XY} = 1
  4. X,YX,Y 独立(无任何关系) \substack{\rightarrow\\\nleftarrow} X,YX,Y 不相关(无线性关系)
  5. (X,Y)N(μ1,μ2;σ12,σ22;ρ)(X,Y) \sim \mathcal{N}(\mu_{1},\mu_{2};\sigma^{2}_{1},\sigma^{2}_{2};\rho)
    • ρ=0X,Y不相关X,Y独立\rho = 0 \Leftrightarrow X,Y\text{不相关}\Leftrightarrow X,Y \text{独立} (仅对二维正态分布成立)

例题

  1. 设二维离散型随机变量的概率分布为 (X,Y)(0,0)(1,1)(0,2)(2,0)(2,2)P141314112112 \begin{array}{c|ccccc} (X,Y) & (0,0) & (1,1) & (0,2) & (2,0) & (2,2) \\ \hline P & \frac{1}{4} & \frac{1}{3} & \frac{1}{4} & \frac{1}{12} & \frac{1}{12} \end{array}
    1. 判断 XXYY 是否不相关
    2. 判断 XXYY 是否独立
    3. Cov(XY,Y)\mathrm{Cov}(X-Y,Y) Cov(X,Y)=EXYEXEYCov(X,Y)=13+4×112(13+2×112+2×112)(13+2×14+2×112)=2323=0X,Y不相关Y=0Y=1Y=2X=01/401/41/2X=101/301/3X=21/1201/121/61/31/31/3pijpipjX,Y不独立Cov(XY,Y)=Cov(X,Y)Cov(Y,Y)=0DY=[EY]2EY2=153=23 \begin{array}{ll} \because & \mathrm{Cov}(X,Y) = EXY - EX\cdot EY\\ \therefore & \mathrm{Cov}(X,Y) = \frac{1}{3}+4\times \frac{1}{12} - (\frac{1}{3} + 2\times \frac{1}{12} + 2\times \frac{1}{12})(\frac{1}{3} + 2\times \frac{1}{4}+ 2\times \frac{1}{12}) \\ & = \frac{2}{3} - \frac{2}{3} = 0 \\ \therefore & X,Y \text{不相关} \\\\ \because & \begin{array}{c |ccc|c} & Y=0 & Y=1 & Y=2 \\ \hline X = 0 & 1/4 & 0 & 1/4 & 1/2 \\ X = 1 & 0 & 1/3 & 0 & 1/3 \\ X = 2 & 1/12 & 0 & 1/12 & 1/6 \\ \hline & 1/3 & 1/3 & 1/3 \end{array} \\ \therefore & p_{ij} \ne p_{i\cdot}p_{\cdot j} \\ \therefore & X,Y \text{不独立} \\ \\ & \mathrm{Cov}(X-Y,Y) = \mathrm{Cov}(X,Y) - \mathrm{Cov}(Y,Y) \\ & = 0 -DY = [EY]^{2} - EY^{2} = 1 - \frac{5}{3} = - \frac{2}{3} \end{array}
  2. 将一枚硬币独立重复抛 nn 次,以 XXYY 分别表示正面向上和反面向上的次数,则 XXYY 的相关系数是 (A) A. 1-1 B. 00 C. 12\frac{1}{2} D. 11
  3. XU(0,3)X\sim U(0,3)YY 服从参数为 22 的泊松分布,且 XXYY 的协方差为 1-1,则 D(2XY+1)=D(2X-Y+1)=         D(2XY+1)=4DX+DY2Cov(2X,Y)=4×3212+24×(1)=9 \begin{array}{ll} & D(2X-Y +1) = 4 DX + DY - 2\mathrm{Cov}(2X,Y) \\ & = 4\times \frac{3^{2}}{12} + 2 - 4\times (-1) \\ & = 9 \end{array}
  4. XN(0,4),YB(3,13)X\sim \mathcal{N}(0,4), Y\sim B(3, \frac{1}{3}),且 XXYY 不相关,则 D(X3Y+1)=D(X-3Y+1) =         X,Y不相关Cov(X,Y)=0D(X3Y+1)=DX+9DY2Cov(X,3Y)=DX+9DY+6Cov(X,Y)=4+9×3×13×23=10 \begin{array}{ll} \because & X,Y \text{不相关} \\ \therefore & \mathrm{Cov}(X,Y) = 0 \\ & D(X-3Y+1) = DX + 9DY - 2\mathrm{Cov}(X,-3Y) \\ & = DX + 9DY +6\mathrm{Cov}(X,Y) \\ & = 4 + 9\times 3\times \frac{1}{3}\times \frac{2}{3} = 10 \end{array}
  5. XN(0,1)X\sim \mathcal{N}(0,1)X=xX = x 的条件下 YN(x,1)Y\sim \mathcal{N}(x,1),则 XXYY 的相关系数为         X=x条件下YN(x,1)fYX(yx)=12πe(yx)22f(x,y)=fX(x)fYX(yx)=12π2πe2x22xy+y22(X,Y)N(μ1,μ2;σ12,σ22;ρ)f(x,y)=12πσ12πσ21ρ2×exp{11ρ2[(xμ1)22σ12ρ(xμ1)(yμ2)σ1σ2+(yμ2)22σ22]}X0,1μ1=0,σ1=1(xμ1)22σ12(1ρ2)=x2x22(1ρ2)=x21ρ2=12ρ=22 \begin{array}{ll} \because & \text{在}X = x \text{条件下} Y \sim \mathcal{N}(x,1) \\ \therefore & \displaystyle f_{Y\vert X}(y\vert x) = \frac{1}{\sqrt{2\pi}}e^{-\frac{(y-x)^{2}}{2}} \\ \therefore & \displaystyle f(x,y) = f_{X}(x)f_{Y\vert X}(y\vert x) = \frac{1}{\sqrt{2\pi}\sqrt{2\pi}} e^{-\frac{2x^{2} - 2xy + y^{2}}{2}} \\ \because & \text{当}(X,Y)\sim \mathcal{N}(\mu_{1},\mu_{2};\sigma^{2}_{1},\sigma^{2}_{2}; \rho) \text{时} \\ & \displaystyle f(x,y) = \frac{1}{\sqrt{2\pi}\sigma_{1}\sqrt{2\pi}\sigma_{2}\sqrt{1-\rho^{2}}} \times \\ & \displaystyle \exp\bigg\{-\frac{1}{1-\rho^{2}}\bigg[\frac{(x-\mu_{1})^{2}}{2\sigma_{1}^{2}} - \rho\frac{(x-\mu_{1})(y-\mu_{2})}{\sigma_{1}\sigma_{2}} + \frac{(y-\mu_{2})^{2}}{2\sigma_{2}^{2}}\bigg]\bigg\} \\ \because & X\sim \mathcal{0,1} \\ \therefore & \mu_{1} = 0,\sigma_{1} = 1 \\ \because & \displaystyle -\frac{(x-\mu_{1})^{2}}{2\sigma_{1}^{2}(1-\rho^{2})} = -x^{2}\\ \therefore & \displaystyle \frac{x^{2}}{2(1-\rho^{2})} = x^{2} \\ & \displaystyle 1-\rho^{2} = \frac{1}{2} \\ \therefore & \rho = \frac{\sqrt{2}}{2} \\ \end{array}

results matching ""

    No results matching ""