正态分布

对于xN(μ,σ2)x\sim N(\mu,\sigma^2),其概率密度函数为:

f(x)=12πσe(xμ)22σ2f(x)=\frac{1}{\sqrt{2\pi}\sigma}e^{-\frac{(x-\mu)^2}{2\sigma^2}}

二维正态分布

对于(X,Y)N(μ1,μ2,σ12,σ22,r)(X,Y)\sim N(\mu_1,\mu_2,\sigma_1^2,\sigma_2^2,r)其密度函数为:

f(x,y)=12πσ1σ21r2exp{12(1r2)[(xμ1)2σ122r(xμ1)(yμ2)σ1σ2+(yμ2)2σ22]}f(x,y)=\frac{1}{2\pi\sigma_1\sigma_2\sqrt{1-r^2}}\exp\left\{-\frac{1}{2(1-r^2)} \left[\frac{(x-\mu_1)^2}{\sigma_1^2}-2r\frac{(x-\mu_1)(y-\mu_2)}{\sigma_1\sigma_2}+\frac{(y-\mu_2)^2}{\sigma_2^2} \right]\right\}

有如下结论:

Z=aX+bYZ=aX+bY,则ZN(E(Z),D(Z))Z\sim N(E(Z),D(Z))。不要求X,YX,Y独立。

例题

Let XN(0,1)X\sim N(0,1), and under the condition X=xX = x, YN(x,4)Y\sim N(x,4). Then the variance of YY is \underline{\quad}.

Solve:First, calculate E(Y)=EX(EY(YX))=E(X)=0note: we view X in E(Y|X) as a constant, and get a expression dependent on XThen, calculate E(Y2)=EX(EY(Y2X))=EX(DY(Y2X)+EY2(YX))=EX(4+X2)=4+EX(X2)=4+DX(X)+EX2(X)=5Therefore, D(Y)=E(Y2)E2(Y)=50=5\begin{aligned} \text{Solve:}\\ &\text{First, calculate }E(Y)=E_X(E_Y(Y|X))=E(X)=0\\ &\text{note: we view $X$ in E(Y|X) as a constant, and get a expression dependent on $X$}\\ &\text{Then, calculate }E(Y^2)\\ &\qquad =E_X(E_Y(Y^2|X))\\ &\qquad =E_X(D_Y(Y^2|X)+E_Y^2(Y|X))\\ &\qquad =E_X(4+X^2)\\ &\qquad =4+E_X(X^2)\\ &\qquad =4+D_X(X)+E_X^2(X)\\ &\qquad =5\\ &\text{Therefore, }D(Y)=E(Y^2)-E^2(Y)=5-0=5 \end{aligned}

*结论:全方差公式

D(Y)=E[D(YX)]+D(E[YX])D(Y)=E[D(Y∣X)]+D(E[Y∣X])