大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。
Jetbrains全系列IDE使用 1年只要46元 售后保障 童叟无欺
文章目录
1. 方差定义
-
引言
我们知道,数学期望表示随机变量的平均值,例如,有一批灯泡,其平均寿命是 E ( X ) = 1000 E(X)=1000 E(X)=1000(小时),但是仅有这一项指标并不能知道这批灯泡质量的好坏,如有可能大部分的寿命在 950 ∼ 1050 950\sim1050 950∼1050之间,也有可能其中约一半是高质量的,寿命可能在 1300 1300 1300小时左右,其余的则质量较差,寿命约只有 700 700 700小时,因此,研究随机变量与其平均值的偏离程度是十分必要的,为了度量这个偏离程度,我们很容易想到 E { ∣ X − E ( X ) ∣ } E\{|X-E(X)|\} E{
∣X−E(X)∣} .由于该式中带有绝对值,运算不便,且有些时候绝对值不可导,不方便进行研究,因此,我们用 E { [ X − E ( X ) ] 2 } E\{[X-E(X)]^2\} E{
[X−E(X)]2} 来度量随机变量 X X X与其均值 E ( X ) E(X) E(X)的偏离程度。 -
定义
设 X X X是一个随机变量,若 E { [ X − E ( X ) ] 2 } E\{[X-E(X)]^2\} E{
[X−E(X)]2}存在,则称 E { [ X − E ( X ) ] 2 } E\{[X-E(X)]^2\} E{
[X−E(X)]2} 为 X X X的方差. 记为 D ( X ) D(X) D(X)或 V a r ( X ) V_{ar}(X) Var(X),即 D ( X ) = V a r ( X ) = E { [ X − E ( X ) ] 2 } D(X)=V_{ar}(X)=E\{[X-E(X)]^2\} D(X)=Var(X)=E{
[X−E(X)]2}在应用上还引入量 D ( X ) \sqrt{D(X)} D(X),记为 σ ( X ) \sigma(X) σ(X),称为标准差或均方差
实际上,根据方差的定义,方差和均值是有一个单位的问题的,如引言中灯泡的寿命,期望的单位为‘小时’,方差的单位为‘小时的平方’,引入标准差之后,标准差的单位则和期望的单位就保持一致了.
-
由定义可知,方差其实是随机变量 X X X的函数 g ( X ) = [ X − E ( X ) ] 2 g(X)=[X-E(X)]^2 g(X)=[X−E(X)]2的数学期望,因此
- 对于离散型随机变量,有 D ( X ) = ∑ k = 1 ∞ [ x k − E ( X ) ] 2 p k , D(X)=\sum\limits_{k=1}^{\infty}[x_k-E(X)]^2p_k, D(X)=k=1∑∞[xk−E(X)]2pk, 其中 P { X = x k } = p k , k = 1 , 2 , ⋯ P\{X=x_k\}=p_k,\quad k=1,2,\cdots P{
X=xk}=pk,k=1,2,⋯ 是 X X X的分布律 - 对于连续型随机变量,有 D ( X ) = ∫ − ∞ + ∞ [ x k − E ( X ) ] 2 f ( x ) d x , \begin{aligned} D(X)=\int_{-\infty}^{+\infty}[x_k-E(X)]^2f(x)dx \end{aligned}, D(X)=∫−∞+∞[xk−E(X)]2f(x)dx, 其中 f ( x ) f(x) f(x) 是 X X X的概率密度。
- 对于离散型随机变量,有 D ( X ) = ∑ k = 1 ∞ [ x k − E ( X ) ] 2 p k , D(X)=\sum\limits_{k=1}^{\infty}[x_k-E(X)]^2p_k, D(X)=k=1∑∞[xk−E(X)]2pk, 其中 P { X = x k } = p k , k = 1 , 2 , ⋯ P\{X=x_k\}=p_k,\quad k=1,2,\cdots P{
-
在实际计算方差中,我们往往使用 D ( X ) = E ( X 2 ) − [ E ( X ) ] 2 . D(X)=E(X^2)-[E(X)]^2. D(X)=E(X2)−[E(X)]2.
证明:
D ( X ) = E { [ X − E ( X ) ] 2 } = E { X 2 − 2 X E ( X ) + [ E ( X ) ] 2 } = E ( X 2 ) − 2 E ( X ) E ( X ) + [ E ( X ) ] 2 = E ( X 2 ) − [ E ( X ) ] 2 \quad\begin{aligned} D(X)&=E\{[X-E(X)]^2\} = E\{X^2-2XE(X)+[E(X)]^2\} \\&= E(X^2)-2E(X)E(X)+[E(X)]^2\\&=E(X^2)-[E(X)]^2 \end{aligned} D(X)=E{
[X−E(X)]2}=E{
X2−2XE(X)+[E(X)]2}=E(X2)−2E(X)E(X)+[E(X)]2=E(X2)−[E(X)]2 -
标准化
设随机变量 X X X具有数学期望 E ( X ) = μ E(X)=\mu E(X)=μ,方差 D ( X ) = σ 2 ≠ 0 D(X)=\sigma^2\neq0 D(X)=σ2=0 ,记 X ∗ = X − μ σ X^*=\frac{X-\mu}{\sigma} X∗=σX−μ , 则其期望为 E ( X ∗ ) = E ( X − μ σ ) = E ( X ) − E ( μ ) E ( σ ) = μ − μ σ = 0. \begin{aligned} E(X^*) = E(\frac{X-\mu}{\sigma}) = \frac{E(X)-E(\mu)}{E(\sigma)} = \frac{\mu-\mu}{\sigma} = 0 .\end{aligned} E(X∗)=E(σX−μ)=E(σ)E(X)−E(μ)=σμ−μ=0. 方差为 D ( X ∗ ) = E ( X − μ σ ) 2 = E ( X − μ ) 2 σ 2 = E ( X 2 ) + E ( μ 2 ) − 2 E ( X ) E ( μ ) σ = E ( X 2 ) − μ 2 σ 2 = E ( X 2 ) − [ E ( X ) ] 2 σ 2 = D ( X ) σ 2 = σ 2 σ 2 = 1. \begin{aligned} D(X^*) &= E(\frac{X-\mu}{\sigma})^2 = \frac{E(X-\mu)^2}{\sigma^2} = \frac{E(X^2)+E(\mu^2)-2E(X)E(\mu)}{\sigma} \\&= \frac{E(X^2)-\mu^2}{\sigma^2} = \frac{E(X^2)-[E(X)]^2} {\sigma^2} \\&=\frac{D(X)}{\sigma^2} = \frac{\sigma^2}{\sigma^2} = 1.\end{aligned} D(X∗)=E(σX−μ)2=σ2E(X−μ)2=σE(X2)+E(μ2)−2E(X)E(μ)=σ2E(X2)−μ2=σ2E(X2)−[E(X)]2=σ2D(X)=σ2σ2=1.
即 X ∗ = X − μ σ X^*=\frac{X-\mu}{\sigma} X∗=σX−μ 的数学期望为 0 0 0,方差为 1 1 1. X ∗ X^* X∗称为 X X X的标准化变量 .
2. 方差性质
-
设 C C C是常数,则 D ( C ) = 0 D(C)=0 D(C)=0
证明:
D ( C ) = E [ C − E ( C ) ] 2 = E ( C 2 ) − [ E ( C ) ] 2 = C 2 − C 2 = 0 D(C)=E[C-E(C)]^2 = E(C^2)-[E(C)]^2 = C^2-C^2 = 0 D(C)=E[C−E(C)]2=E(C2)−[E(C)]2=C2−C2=0
根据方差的定义,方差表示随机变量和期望的偏离程度,随机变量恒为一个常数,很明显,不存在偏离,因此 D ( C ) = 0. D(C)=0. D(C)=0.
-
设 X X X是随机变量, C C C是常数,则有
1 o D ( C X ) = C 2 D ( X ) 1^o \quad D(CX)=C^2D(X) 1oD(CX)=C2D(X)证明:
D ( C X ) = E ( C 2 X 2 ) − [ E ( C X ) ] 2 = C 2 E ( X 2 ) − C 2 [ E ( X ) ] 2 = C 2 { E ( X 2 ) − [ E ( X ) ] 2 } = C 2 D ( X ) D(CX)=E(C^2X^2)-[E(CX)]^2 = C^2E(X^2)-C^2[E(X)]^2 = C^2\{E(X^2)-[E(X)]^2\}=C^2D(X) D(CX)=E(C2X2)−[E(CX)]2=C2E(X2)−C2[E(X)]2=C2{
E(X2)−[E(X)]2}=C2D(X)2 o D ( X + C ) = D ( X ) 2^o \quad D(X+C) = D(X) 2oD(X+C)=D(X)
证明:
D ( X + C ) = E [ ( C + X ) 2 ] − [ E ( C + X ) ] 2 = E [ C 2 + 2 C X + X 2 ] − [ E ( C ) + E ( X ) ] 2 = E ( C 2 ) + 2 E ( C ) E ( X ) + E ( X 2 ) − [ E ( C ) ] 2 − 2 E ( C ) E ( X ) − [ E ( X ) ] 2 = E ( X 2 ) − [ E ( X ) ] 2 = D ( X ) \begin{aligned} D(X+C)&=E[(C+X)^2]-[E(C+X)]^2 = E[C^2+2CX+X^2]-[E(C)+E(X)]^2 = E(C^2)+2E(C)E(X)+E(X^2)-[E(C)]^2-2E(C)E(X)-[E(X)]^2\\&=E(X^2)-[E(X)]^2\\&= D(X) \end{aligned} D(X+C)=E[(C+X)2]−[E(C+X)]2=E[C2+2CX+X2]−[E(C)+E(X)]2=E(C2)+2E(C)E(X)+E(X2)−[E(C)]2−2E(C)E(X)−[E(X)]2=E(X2)−[E(X)]2=D(X)
-
设 X , Y X,Y X,Y 是两个随机变量,则有 D ( X + Y ) = D ( X ) + D ( Y ) + 2 E { [ X − E ( X ) ] [ Y − E ( Y ) ] } . D(X+Y)=D(X)+D(Y)+2E\{[X-E(X)][Y-E(Y)]\}. D(X+Y)=D(X)+D(Y)+2E{
[X−E(X)][Y−E(Y)]}.证明:
D ( X + Y ) = E [ ( X + Y ) − E ( X + Y ) ] 2 = E { [ X − E ( X ) ] + [ Y − E ( Y ) ] } 2 = E [ X − E ( X ) ] 2 + E [ Y − E ( Y ) ] 2 + 2 E { [ X − E ( X ) ] [ Y − E ( Y ) ] } = D ( X ) + D ( Y ) + 2 E { [ X − E ( X ) ] [ Y − E ( Y ) ] } \quad\begin{aligned} D(X+Y) &= E[(X+Y)-E(X+Y)]^2 = E\{[X-E(X)]+[Y-E(Y)]\}^2 \\&=E[X-E(X)]^2+E[Y-E(Y)]^2+2E\{[X-E(X)][Y-E(Y)]\} \\&=D(X)+D(Y)+2E\{[X-E(X)][Y-E(Y)]\} \end{aligned} D(X+Y)=E[(X+Y)−E(X+Y)]2=E{
[X−E(X)]+[Y−E(Y)]}2=E[X−E(X)]2+E[Y−E(Y)]2+2E{
[X−E(X)][Y−E(Y)]}=D(X)+D(Y)+2E{
[X−E(X)][Y−E(Y)]}特别,若 X , Y X,Y X,Y相互独立,则有 D ( X + Y ) = D ( X ) + D ( Y ) D(X+Y)=D(X)+D(Y) D(X+Y)=D(X)+D(Y)
证明 :
D ( X + Y ) = E ( X + Y ) 2 − [ E ( X + Y ) ] 2 = E ( X 2 + Y 2 + 2 X Y ) − [ E ( X ) + E ( Y ) ] 2 = E ( X 2 ) + E ( Y 2 ) + 2 E ( X Y ) − [ E ( X ) ] 2 − [ E ( Y ) ] 2 − 2 E ( X ) E ( Y ) ( 1 ) = D ( X ) + D ( Y ) + 2 [ E ( X Y ) − E ( X ) E ( Y ) ) ] ∵ X , Y 相 互 独 立 , ∴ E ( X Y ) = E ( X ) E ( Y ) = D ( X ) + D ( Y ) \quad\begin{aligned} D(X+Y) &= E(X+Y)^2-[E(X+Y)]^2 = E(X^2+Y^2+2XY) – [E(X)+E(Y)]^2 \\&=E(X^2)+E(Y^2)+2E(XY)-[E(X)]^2-[E(Y)]^2-2E(X)E(Y) \quad (1) \\&=D(X)+D(Y) + 2[E(XY)-E(X)E(Y))] \\&\because X,Y 相互独立,\quad \therefore E(XY) = E(X)E(Y)\\ &=D(X)+D(Y) \end{aligned} D(X+Y)=E(X+Y)2−[E(X+Y)]2=E(X2+Y2+2XY)−[E(X)+E(Y)]2=E(X2)+E(Y2)+2E(XY)−[E(X)]2−[E(Y)]2−2E(X)E(Y)(1)=D(X)+D(Y)+2[E(XY)−E(X)E(Y))]∵X,Y相互独立,∴E(XY)=E(X)E(Y)=D(X)+D(Y)
这一性质可以推广到任意有限多个相互独立的随机变量之和的情况。
-
D ( X ) = 0 D(X)=0 D(X)=0的充要条件是 X X X以概率 1 1 1取常数 E ( X ) E(X) E(X),即 P { X = E ( X ) } = 1. P\{X=E(X)\}=1. P{
X=E(X)}=1.证明:
充分性,已知 P { X = E ( X ) } = 1 P\{X=E(X)\}=1 P{
X=E(X)}=1 ,则 P { X 2 = [ E ( X ) ] 2 } = 1 ∴ E ( X 2 ) = E [ E ( X ) ] 2 = [ E ( X ) ] 2 ∴ D ( X ) = E ( X 2 ) − [ E ( X ) ] 2 = 0 P\{X^2=[E(X)]^2\}=1 \quad \therefore E(X^2) = E[E(X)]^2 = [E(X)]^2 \quad \therefore D(X) = E(X^2)-[E(X)]^2 = 0 P{
X2=[E(X)]2}=1∴E(X2)=E[E(X)]2=[E(X)]2∴D(X)=E(X2)−[E(X)]2=0注意,这里不能根据 P { X = E ( X ) } = 1 P\{X=E(X)\}=1 P{
X=E(X)}=1 判定随机变量X为一个常数 C C C, 原因是离散型可以得出这个结论,但是对于连续型,其选中有限个点之后,剩余的点的概率仍为1,但是这部分被选中的点的取值,不一定为该常数 C C C。
必要性,已知 D ( X ) = 0 D(X)=0 D(X)=0 ,要证明 P { X = E ( X ) } = 1 P\{X=E(X)\}=1 P{
X=E(X)}=1 ,利用反证法,证明如下:假设 P { X = E ( X ) } < 1 P\{X=E(X)\}<1 P{
X=E(X)}<1,则对于某一个数 ϵ > 0 \epsilon>0 ϵ>0,有 P { ∣ X − E ( X ) ∣ ≥ ϵ } > 0 P\{|X-E(X)|\geq\epsilon\}>0 P{
∣X−E(X)∣≥ϵ}>0 ,由切比雪夫不等式,对于任意的 ϵ > 0 \epsilon>0 ϵ>0,有 P { ∣ X − E ( X ) ∣ ≥ ϵ } ≤ D ( X ) ϵ = 0 P\{|X-E(X)|\geq\epsilon\}\leq \frac{D(X)}{\epsilon}=0 P{
∣X−E(X)∣≥ϵ}≤ϵD(X)=0 与假设矛盾, ∴ P { X = E ( X ) } = 1 \therefore P\{X=E(X)\}=1 ∴P{
X=E(X)}=1
3. 常见随机变量分布的方差
- 关于不同分布的数学期望计算与推导,在文章数学期望及常见分布的期望计算与推导中已经给出,这里不再重复证明,直接拿来使用。
3.1 ( 0 − 1 ) (0-1) (0−1)分布
-
随机变量 X X X服从 ( 0 − 1 ) (0-1) (0−1)分布,则其分布律为 P { X = k } = p k ( 1 − p ) 1 − k , k = 0 , 1 P\{X=k\} = p^k(1-p)^{1-k}, \quad k=0,1 P{
X=k}=pk(1−p)1−k,k=0,1此时有 D ( X ) = p ( 1 − p ) D(X)=p(1-p) D(X)=p(1−p) .
证明:
E ( X ) = p \quad E(X)=p E(X)=p
E ( X 2 ) = ∑ k = 0 1 x k 2 p k = 0 2 ⋅ p 0 ( 1 − p ) 1 − 0 + 1 2 ⋅ p 1 ( 1 − p ) 1 − 1 = p \quad E(X^2)=\sum\limits_{k=0}^{1}x_k^2p_k = 0^2\cdot p^0(1-p)^{1-0}+1^2\cdot p^1(1-p)^{1-1} = p E(X2)=k=0∑1xk2pk=02⋅p0(1−p)1−0+12⋅p1(1−p)1−1=p
∴ D ( X ) = E ( X 2 ) − [ E ( X ) ] 2 = p − p 2 = p ( 1 − p ) \quad \therefore D(X) = E(X^2)-[E(X)]^2 = p-p^2=p(1-p) ∴D(X)=E(X2)−[E(X)]2=p−p2=p(1−p)
3.2 二项分布
-
X ∼ b ( n , p ) X\sim b(n,p) X∼b(n,p) ,则其分布律为 P { X = k } = ( k n ) p k q n − k k = 0 , 1 , 2 ⋯ , n P\{X=k\} = \left(_k^n\right)p^kq^{n-k} \quad k=0,1,2\cdots, n P{
X=k}=(kn)pkqn−kk=0,1,2⋯,n ,此时有 D ( X ) = n p ( 1 − p ) . D(X)=np(1-p). D(X)=np(1−p).证明:
E ( X ) = n p \quad E(X) =np E(X)=np
E ( X 2 ) = ∑ k = 0 n k 2 ( k n ) p k q n − k = ∑ k = 0 n k 2 n ! k ! ( n − k ) ! p k q n − k = ∑ k = 1 n k n ! ( k − 1 ) ! ( n − k ) ! p k q n − k = ∑ k = 1 n ( k − 1 ) n ! ( k − 1 ) ! ( n − k ) ! p k q n − k + ∑ k = 1 n n ! ( k − 1 ) ! ( n − k ) ! p k q n − k = ∑ k = 2 n n ! ( k − 2 ) ! ( n − k ) ! p k q n − k + n p ∑ k − 1 = 0 n − 1 ( n − 1 ) ! ( k − 1 ) ! ( n − k ) ! p k − 1 q n − k = n ( n − 1 ) p 2 ∑ k − 2 = 0 n − 2 ( n − 2 ) ! ( k − 2 ) ! ( n − k ) ! p k − 2 q n − k + n p ( p + q ) n − 1 = ( n 2 p 2 − n p 2 ) ( p + q ) n − 2 + n p = n 2 p 2 − n p 2 + n p \quad\begin{aligned}E(X^2) &= \sum\limits_{k=0}^{n}k^2(_k^n)p^kq^{n-k} =\sum\limits_{k=0}^{n}k^2\frac{n!}{k!(n-k)!}p^kq^{n-k}\\& = \sum\limits_{k=1}^{n}k\frac{n!}{(k-1)!(n-k)!}p^kq^{n-k}\\&= \sum\limits_{k=1}^{n}(k-1)\frac{n!}{(k-1)!(n-k)!}p^kq^{n-k}+\sum\limits_{k=1}^{n}\frac{n!}{(k-1)!(n-k)!}p^kq^{n-k} \\& = \sum\limits_{k=2}^{n}\frac{n!}{(k-2)!(n-k)!}p^kq^{n-k}+np\sum\limits_{k-1=0}^{n-1}\frac{(n-1)!}{(k-1)!(n-k)!}p^{k-1}q^{n-k} \\&= n(n-1)p^2\sum\limits_{k-2=0}^{n-2}\frac{(n-2)!}{(k-2)!(n-k)!}p^{k-2}q^{n-k}+np(p+q)^{n-1} \\&=(n^2p^2-np^2)(p+q)^{n-2}+np \\&=n^2p^2-np^2+np\end{aligned} E(X2)=k=0∑nk2(kn)pkqn−k=k=0∑nk2k!(n−k)!n!pkqn−k=k=1∑nk(k−1)!(n−k)!n!pkqn−k=k=1∑n(k−1)(k−1)!(n−k)!n!pkqn−k+k=1∑n(k−1)!(n−k)!n!pkqn−k=k=2∑n(k−2)!(n−k)!n!pkqn−k+npk−1=0∑n−1(k−1)!(n−k)!(n−1)!pk−1qn−k=n(n−1)p2k−2=0∑n−2(k−2)!(n−k)!(n−2)!pk−2qn−k+np(p+q)n−1=(n2p2−np2)(p+q)n−2+np=n2p2−np2+np
∴ D ( X ) = E ( X 2 ) − [ E ( X ) ] 2 = ( n 2 p 2 − n p 2 + n p ) − ( n p ) 2 = n p − n p 2 = n p ( 1 − p ) \quad \therefore D(X) = E(X^2)-[E(X)]^2 = (n^2p^2-np^2+np)-(np)^2 = np-np^2 = np(1-p) ∴D(X)=E(X2)−[E(X)]2=(n2p2−np2+np)−(np)2=np−np2=np(1−p)
3.3 泊松分布
-
X ∼ π ( λ ) X\sim \pi(\lambda) X∼π(λ) ,则其分布律为 P { X = k } = λ k k ! e − λ k = 0 , 1 , 2 , ⋯ P\{X=k\} = \frac{\lambda^k}{k!}e^{-\lambda} \quad k=0,1,2,\cdots P{
X=k}=k!λke−λk=0,1,2,⋯ ,此时有 D ( X ) = λ . D(X)=\lambda. D(X)=λ.证明:
E ( X ) = λ \quad E(X) = \lambda E(X)=λ
E ( X 2 ) = ∑ k = 0 ∞ k 2 λ k k ! e − λ = ∑ k = 1 ∞ k λ k ( k − 1 ) ! e − λ = ∑ k = 1 ∞ ( k − 1 ) λ k ( k − 1 ) ! e − λ + ∑ k = 1 ∞ λ k ( k − 1 ) ! e − λ = λ 2 ∑ k = 2 ∞ λ k − 2 ( k − 2 ) ! e − λ + λ ∑ k = 1 ∞ λ k − 1 ( k − 1 ) ! e − λ = λ 2 + λ \quad\begin{aligned}E(X^2) &= \sum\limits_{k=0}^{\infty}k^2\frac{\lambda^k}{k!}e^{-\lambda} = \sum\limits_{k=1}^{\infty}k\frac{\lambda^k}{(k-1)!}e^{-\lambda}\\&=\sum\limits_{k=1}^{\infty}(k-1)\frac{\lambda^k}{(k-1)!}e^{-\lambda}+\sum\limits_{k=1}^{\infty}\frac{\lambda^k}{(k-1)!}e^{-\lambda}\\&= \lambda^2\sum\limits_{k=2}^{\infty}\frac{\lambda^{k-2}}{(k-2)!}e^{-\lambda} + \lambda\sum\limits_{k=1}^{\infty}\frac{\lambda^{k-1}}{(k-1)!}e^{-\lambda} \\&= \lambda^2+\lambda \quad \end{aligned}\quad E(X2)=k=0∑∞k2k!λke−λ=k=1∑∞k(k−1)!λke−λ=k=1∑∞(k−1)(k−1)!λke−λ+k=1∑∞(k−1)!λke−λ=λ2k=2∑∞(k−2)!λk−2e−λ+λk=1∑∞(k−1)!λk−1e−λ=λ2+λ
∴ D ( X ) = E ( X 2 ) − [ E ( X ) ] 2 = ( λ 2 + λ ) − ( λ ) 2 = λ \quad \therefore D(X) = E(X^2)-[E(X)]^2 = (\lambda^2+\lambda)-(\lambda)^2 = \lambda ∴D(X)=E(X2)−[E(X)]2=(λ2+λ)−(λ)2=λ
3.4 几何分布
-
X ∼ G ( p ) X\sim G(p) X∼G(p) ,则其分布律为 P { X = k } = ( 1 − p ) k − 1 p k = 1 , 2 , 3 , ⋯ P\{X=k\} = (1-p)^{k-1}p \quad k = 1,2,3,\cdots P{
X=k}=(1−p)k−1pk=1,2,3,⋯ ,此时有 D ( X ) = 1 − p p 2 . D(X)=\frac{1-p}{p^2}. D(X)=p21−p.证明:
E ( X ) = 1 p \quad E(X) = \frac{1}{p} E(X)=p1
E ( X 2 ) = ∑ k = 1 ∞ k 2 ( 1 − p ) k − 1 p = p ∑ k = 1 ∞ k 2 ( 1 − p ) k − 1 \quad\begin{aligned} &E(X^2) = \sum\limits_{k=1}^{\infty}k^2(1-p)^{k-1}p = p\sum\limits_{k=1}^{\infty}k^2(1-p)^{k-1} \end{aligned} E(X2)=k=1∑∞k2(1−p)k−1p=pk=1∑∞k2(1−p)k−1
\quad 我们在计算几何分布的数学期望时,引入了一个求导技巧,即当 0 < x < 1 时 且 k → ∞ , ∑ k = 1 ∞ k x k − 1 = ( ∑ k = 1 ∞ x k ) ′ = ( x 1 − x ) ′ = 1 ( 1 − x ) 2 结 合 我 们 的 证 明 需 求 , 该 式 中 , x = 1 − p 为 常 数 , 因 此 有 x ∑ k = 1 ∞ k x k − 1 = x 1 ( 1 − x ) 2 即 ∑ k = 1 ∞ k x k = x 1 ( 1 − x ) 2 , 此 时 有 ∑ k = 1 ∞ k 2 x k − 1 = ( ∑ k = 1 ∞ k x k ) ′ = [ x ( 1 − x ) 2 ] ′ = 1 + x ( 1 − x ) 3 \quad当0<x<1时 且 k\to\infty, \sum\limits_{k=1}^{\infty}kx^{k-1} =(\sum\limits_{k=1}^{\infty}x^k)’ =(\frac{x}{1-x})’ = \frac{1}{(1-x)^2}\\\quad结合我们的证明需求,该式中,x=1-p 为常数,因此有x\sum\limits_{k=1}^{\infty}kx^{k-1} = x \frac{1}{(1-x)^2} \\\quad即 \sum\limits_{k=1}^{\infty}kx^{k} = x \frac{1}{(1-x)^2} ,此时有 \sum\limits_{k=1}^{\infty}k^2x^{k-1} = (\sum\limits_{k=1}^{\infty}kx^{k})’ = [\frac{x}{(1-x)^2}]’ = \frac{1+x}{(1-x)^3} 当0<x<1时且k→∞,k=1∑∞kxk−1=(k=1∑∞xk)′=(1−xx)′=(1−x)21结合我们的证明需求,该式中,x=1−p为常数,因此有xk=1∑∞kxk−1=x(1−x)21即k=1∑∞kxk=x(1−x)21,此时有k=1∑∞k2xk−1=(k=1∑∞kxk)′=[(1−x)2x]′=(1−x)31+x
∴ E ( X 2 ) = p ∑ k = 1 ∞ k 2 ( 1 − p ) k − 1 = p 1 + 1 − p [ 1 − ( 1 − p ) ] 3 = 2 − p p 2 \quad\therefore E(X^2) = p\sum\limits_{k=1}^{\infty}k^2(1-p)^{k-1} = p\frac{1+1-p}{[1-(1-p)]^3} = \frac{2-p}{p^2} ∴E(X2)=pk=1∑∞k2(1−p)k−1=p[1−(1−p)]31+1−p=p22−p
∴ D ( X ) = E ( X 2 ) − [ E ( X ) ] 2 = 2 − p p 2 − ( 1 p ) 2 = 1 − p p 2 . \quad\therefore D(X) = E(X^2)-[E(X)]^2 = \frac{2-p}{p^2}-(\frac{1}{p})^2 = \frac{1-p}{p^2}. ∴D(X)=E(X2)−[E(X)]2=p22−p−(p1)2=p21−p.
3.5 超几何分布
-
X ∼ H ( n , M , N ) X\sim H(n,M,N) X∼H(n,M,N) ,则其分布律为 P { X = k } = ( k M ) ( n − k N − M ) ( n N ) k = 0 , 1 , ⋯ , m i n { n , M } . P\{X=k\} = \frac{(_k^M)(_{n-k}^{N-M})}{(_n^N)} \quad k= 0,1,\cdots,min\{n,M\}. P{
X=k}=(nN)(kM)(n−kN−M)k=0,1,⋯,min{
n,M}. ,此时有 D ( X ) = n M N ( 1 − M N ) ( N − n N − 1 ) . D(X)=n\frac{M}{N}(1-\frac{M}{N})(\frac{N-n}{N-1}). D(X)=nNM(1−NM)(N−1N−n).证明:
E ( X ) = n M N \quad E(X) = n\frac{M}{N} E(X)=nNM
E ( X 2 ) = ∑ k = 0 m i n { n , M } k 2 ( k M ) ( n − k N − M ) ( n N ) = ∑ k = 0 m i n { n , M } k 2 M ! k ! ( M − k ) ! ( n − k N − M ) n ! ( N − n ) ! N ! = ∑ k = 1 m i n { n , M } k M ! ( k − 1 ) ! ( M − k ) ! ( n − k N − M ) n ! ( N − n ) ! N ! = ∑ k = 1 m i n { n , M } ( k − 1 ) M ! ( k − 1 ) ! ( M − k ) ! ( n − k N − M ) n ! ( N − n ) ! N ! + ∑ k = 1 m i n { n , M } M ! ( k − 1 ) ! ( M − k ) ! ( n − k N − M ) n ! ( N − n ) ! N ! = ∑ k = 2 m i n { n , M } M ( M − 1 ) ( M − 2 ) ! ( k − 2 ) ! ( M − k ) ! ( n − k N − M ) n ! ( N − n ) ! N ! + ∑ k = 0 m i n { n , M } k M ! k ! ( M − k ) ! ( n − k N − M ) n ! ( N − n ) ! N ! = M ( M − 1 ) n ! ( N − n ) ! N ! ∑ k = 2 m i n { n , M } ( k − 2 M − 2 ) ( n − k N − M ) + E ( X ) = M ( M − 1 ) n ! ( N − n ) ! N ! ( n − 2 N − 2 ) + n M N ( 范 德 蒙 恒 等 式 C m + n k = ∑ i = 0 k C m i C n k − i ) = M ( M − 1 ) n ( n − 1 ) N ( N − 1 ) + n M N = n M N [ ( M − 1 ) ( n − 1 ) N − 1 + 1 ] \quad\begin{aligned} E(X^2) &= \sum\limits_{k=0}^{min\{n,M\}}k^2\frac{(_k^M)(_{n-k}^{N-M})}{(_n^N)} \\&=\sum\limits_{k=0}^{min\{n,M\}}k^2\frac{M!}{k!(M-k)!}(_{n-k}^{N-M})\frac{n!(N-n)!}{N!} \\&=\sum\limits_{k=1}^{min\{n,M\}}k\frac{M!}{(k-1)!(M-k)!}(_{n-k}^{N-M})\frac{n!(N-n)!}{N!}\\ &=\sum\limits_{k=1}^{min\{n,M\}}(k-1)\frac{M!}{(k-1)!(M-k)!}(_{n-k}^{N-M})\frac{n!(N-n)!}{N!}+\sum\limits_{k=1}^{min\{n,M\}}\frac{M!}{(k-1)!(M-k)!}(_{n-k}^{N-M})\frac{n!(N-n)!}{N!}\\&=\sum\limits_{k=2}^{min\{n,M\}}\frac{M(M-1)(M-2)!}{(k-2)!(M-k)!}(_{n-k}^{N-M})\frac{n!(N-n)!}{N!}+\sum\limits_{k=0}^{min\{n,M\}}k\frac{M!}{k!(M-k)!}(_{n-k}^{N-M})\frac{n!(N-n)!}{N!} \\&=M(M-1)\frac{n!(N-n)!}{N!}\sum\limits_{k=2}^{min\{n,M\}}(_{k-2}^{M-2})(_{n-k}^{N-M})+E(X)\\&=M(M-1)\frac{n!(N-n)!}{N!}(_{n-2}^{N-2})+n\frac{M}{N} \quad (范德蒙恒等式C_{m+n}^k = \sum\limits_{i=0}^{k}C_{m}^iC_{n}^{k-i})\\&=M(M-1)\frac{n(n-1)}{N(N-1)}+n\frac{M}{N} \\&=n\frac{M}{N}[\frac{(M-1)(n-1)}{N-1}+1] \end{aligned} E(X2)=k=0∑min{
n,M}k2(nN)(kM)(n−kN−M)=k=0∑min{
n,M}k2k!(M−k)!M!(n−kN−M)N!n!(N−n)!=k=1∑min{
n,M}k(k−1)!(M−k)!M!(n−kN−M)N!n!(N−n)!=k=1∑min{
n,M}(k−1)(k−1)!(M−k)!M!(n−kN−M)N!n!(N−n)!+k=1∑min{
n,M}(k−1)!(M−k)!M!(n−kN−M)N!n!(N−n)!=k=2∑min{
n,M}(k−2)!(M−k)!M(M−1)(M−2)!(n−kN−M)N!n!(N−n)!+k=0∑min{
n,M}kk!(M−k)!M!(n−kN−M)N!n!(N−n)!=M(M−1)N!n!(N−n)!k=2∑min{
n,M}(k−2M−2)(n−kN−M)+E(X)=M(M−1)N!n!(N−n)!(n−2N−2)+nNM(范德蒙恒等式Cm+nk=i=0∑kCmiCnk−i)=M(M−1)N(N−1)n(n−1)+nNM=nNM[N−1(M−1)(n−1)+1]∴ D ( X ) = E ( X 2 ) − [ E ( X ) ] 2 = n M N [ ( M − 1 ) ( n − 1 ) N − 1 + 1 ] − ( n M N ) 2 = n M N ( M n − M − n + 1 + N − 1 N − 1 − n M N ) = n M N [ M N n − M N − N n + N 2 − M N n + M n N ( N − 1 ) ] = n M N [ N ( N − M ) − n ( N − M ) N ( N − 1 ) ] = n M N [ ( N − M ) ( N − n ) N ( N − 1 ) ] = n M N ( 1 − M N ) ( N − n N − 1 ) . \quad\begin{aligned} \therefore D(X) &= E(X^2)-[E(X)]^2 = n\frac{M}{N}[\frac{(M-1)(n-1)}{N-1}+1]-(n\frac{M}{N})^2 = n\frac{M}{N}(\frac{Mn-M-n+1+N-1}{N-1}-n\frac{M}{N})\\ &= n\frac{M}{N}\bigg[\frac{MNn-MN-Nn+N^2-MNn+Mn}{N(N-1)}\bigg] \\&= n\frac{M}{N}\bigg[\frac{N(N-M)-n(N-M)}{N(N-1)}\bigg] = n\frac{M}{N}\bigg[\frac{(N-M)(N-n)}{N(N-1)}\bigg]\\&= n\frac{M}{N}(1-\frac{M}{N})(\frac{N-n}{N-1}). \end{aligned} ∴D(X)=E(X2)−[E(X)]2=nNM[N−1(M−1)(n−1)+1]−(nNM)2=nNM(N−1Mn−M−n+1+N−1−nNM)=nNM[N(N−1)MNn−MN−Nn+N2−MNn+Mn]=nNM[N(N−1)N(N−M)−n(N−M)]=nNM[N(N−1)(N−M)(N−n)]=nNM(1−NM)(N−1N−n).
3.6 均匀分布
-
X ∼ U ( a , b ) X\sim U(a,b) X∼U(a,b) ,则其概率密度为 f ( x ) = { 1 b − a , a < x < b , 0 , e l s e . f(x)=\begin{cases} \frac{1}{b-a},\quad a<x<b, \\ 0,\quad else \end{cases}. f(x)={
b−a1,a<x<b,0,else. ,此时有 D ( X ) = ( b − a ) 2 12 . D(X)=\frac{(b-a)^2}{12}. D(X)=12(b−a)2.证明:
E ( X ) = a + b 2 \quad E(X) = \frac{a+b}{2} E(X)=2a+b
E ( X 2 ) = ∫ − ∞ + ∞ x 2 f ( x ) d x = ∫ − ∞ a x 2 ⋅ 0 d x + ∫ a b x 2 1 b − a d x + ∫ b + ∞ x 2 ⋅ 0 d x = 0 + ( 1 3 1 b − a x 3 ) ∣ a b + 0 = b 3 − a 3 3 ( b − a ) = a 2 + b 2 + a b 3 \quad\begin{aligned} E(X^2) &= \int_{-\infty}^{+\infty}x^2f(x)dx = \int_{-\infty}^{a}x^2\cdot0dx+\int_{a}^{b}x^2\frac{1}{b-a}dx+\int_{b}^{+\infty}x^2\cdot0dx\\&=0+(\frac{1}{3}\frac{1}{b-a}x^3)\bigg|_a^b+0 \\&=\frac{b^3-a^3}{3(b-a)} = \frac{a^2+b^2+ab}{3}\end{aligned} E(X2)=∫−∞+∞x2f(x)dx=∫−∞ax2⋅0dx+∫abx2b−a1dx+∫b+∞x2⋅0dx=0+(31b−a1x3)∣∣∣∣ab+0=3(b−a)b3−a3=3a2+b2+ab
∴ D ( X ) = E ( X 2 ) − [ E ( X ) ] 2 = a 2 + b 2 + a b 3 − ( a + b 2 ) 2 = ( b − a ) 2 12 . \therefore D(X) = E(X^2)-[E(X)]^2 = \frac{a^2+b^2+ab}{3}-(\frac{a+b}{2})^2 = \frac{(b-a)^2}{12}. ∴D(X)=E(X2)−[E(X)]2=3a2+b2+ab−(2a+b)2=12(b−a)2.
3.7 指数分布
-
X ∼ E ( θ ) X\sim E(\theta) X∼E(θ) ,则其概率密度为 f ( x ) = { 1 θ e − x / θ , 0 < x , 0 , e l s e ( θ > 0 ) . f(x)=\begin{cases} \frac{1}{\theta}e^{-x/\theta},\quad 0<x, \\ 0,\quad else \end{cases} \quad (\theta>0). f(x)={
θ1e−x/θ,0<x,0,else(θ>0). ,此时有 D ( X ) = θ 2 . D(X)=\theta^2. D(X)=θ2.证明:
E ( X ) = θ \quad E(X) = \theta E(X)=θ
E ( X 2 ) = ∫ − ∞ + ∞ x 2 f ( x ) d x = ∫ − ∞ 0 x 2 ⋅ 0 d x + ∫ 0 + ∞ x 2 1 θ e − x / θ d x = 0 + ( − x 2 e − x / θ ) ∣ 0 + ∞ − ∫ 0 + ∞ − 2 x e − x / θ d x = 2 ∫ 0 + ∞ x e − x / θ d x ( 分 部 积 分 法 ) = 2 [ ( − x θ e − x / θ ) ∣ 0 + ∞ ) ] − 2 ∫ 0 + ∞ − θ e − x / θ d x = 2 θ 2 ∫ 0 + ∞ 1 θ e − x / θ d x = 2 θ 2 ( 积 分 项 ∫ 0 + ∞ 1 θ e − x / θ d x = F ( ∞ ) − F ( 0 ) = 1 ) \quad \begin{aligned} E(X^2) &= \int_{-\infty}^{+\infty}x^2f(x)dx = \int_{-\infty}^{0}x^2\cdot0dx+\int_{0}^{+\infty}x^2\frac{1}{\theta}e^{-x/\theta}dx\\&=0+(-x^2e^{-x/\theta})\bigg|_0^{+\infty} -\int_{0}^{+\infty}-2xe^{-x/\theta}dx =2\int_{0}^{+\infty}xe^{-x/\theta}dx\quad (分部积分法)\\&=2\bigg[(-x\theta e^{-x/\theta})\bigg|_0^{+\infty})\bigg]-2\int_{0}^{+\infty}-\theta e^{-x/\theta}dx = 2\theta^2\int_{0}^{+\infty}\frac{1}{\theta} e^{-x/\theta}dx \\&= 2\theta^2 \quad (积分项 \int_{0}^{+\infty}\frac{1}{\theta} e^{-x/\theta}dx = F(\infty)-F(0) = 1)\end{aligned} E(X2)=∫−∞+∞x2f(x)dx=∫−∞0x2⋅0dx+∫0+∞x2θ1e−x/θdx=0+(−x2e−x/θ)∣∣∣∣0+∞−∫0+∞−2xe−x/θdx=2∫0+∞xe−x/θdx(分部积分法)=2[(−xθe−x/θ)∣∣∣∣0+∞)]−2∫0+∞−θe−x/θdx=2θ2∫0+∞θ1e−x/θdx=2θ2(积分项∫0+∞θ1e−x/θdx=F(∞)−F(0)=1)∴ D ( X ) = E ( X 2 ) − [ E ( X ) ] 2 = 2 θ 2 − ( θ ) 2 = θ 2 . \quad \therefore D(X) = E(X^2)-[E(X)]^2 = 2\theta^2 -(\theta)^2 = \theta^2. ∴D(X)=E(X2)−[E(X)]2=2θ2−(θ)2=θ2.
3.8 正态分布
- X ∼ N ( μ , σ 2 ) X\sim N(\mu,\sigma^2) X∼N(μ,σ2) ,则其概率密度为 f ( x ) = 1 2 π σ e − ( x − μ ) 2 2 σ 2 , − ∞ < x < + ∞ . f(x)=\frac{1}{\sqrt{2\pi}\sigma}e^{-\frac{(x-\mu)^2}{2\sigma^2}} , \quad -\infty<x<+\infty. f(x)=2πσ1e−2σ2(x−μ)2,−∞<x<+∞. ,此时有 D ( X ) = σ 2 . D(X)=\sigma^2. D(X)=σ2.
证明:
E ( X ) = μ \quad E(X) = \mu E(X)=μ
E ( X 2 ) = ∫ − ∞ + ∞ x 2 f ( x ) d x = ∫ − ∞ + ∞ x 2 1 2 π σ e − ( x − μ ) 2 2 σ 2 d x \quad \begin{aligned} E(X^2) &= \int_{-\infty}^{+\infty}x^2f(x)dx = \int_{-\infty}^{+\infty}x^2\frac{1}{\sqrt{2\pi}\sigma}e^{-\frac{(x-\mu)^2}{2\sigma^2}}dx \end{aligned} E(X2)=∫−∞+∞x2f(x)dx=∫−∞+∞x22πσ1e−2σ2(x−μ)2dx
\quad 令 t = x − μ σ , 则 x = t σ + μ t = \frac{x-\mu}{\sigma},则 x = t\sigma+\mu t=σx−μ,则x=tσ+μ,另外我们还知道 ∫ − ∞ + ∞ e − t 2 2 d t = 2 π \int_{-\infty}^{+\infty}e^{-\frac{t^2}{2}} dt=\sqrt{2\pi} ∫−∞+∞e−2t2dt=2π(连续型随机变量及其常见分布函数和概率密度 中有相关证明,不在赘述) ,则此时有
E ( X 2 ) = ∫ − ∞ + ∞ ( t σ + μ ) 2 1 2 π σ e − t 2 2 σ d t = 1 2 π ∫ − ∞ + ∞ t 2 σ 2 e − t 2 2 d t + 1 2 π ∫ − ∞ + ∞ 2 t σ μ e − t 2 2 d t + 1 2 π ∫ − ∞ + ∞ μ 2 e − t 2 2 d t = σ 2 2 π ∫ − ∞ + ∞ t 2 e − t 2 2 d t + 2 σ μ 2 π ∫ − ∞ + ∞ t e − t 2 2 d t + μ 2 2 π ∫ − ∞ + ∞ e − t 2 2 d t = σ 2 2 π [ ( − t e − t 2 2 ) ∣ − ∞ + ∞ − ∫ − ∞ + ∞ − e − t 2 2 d t ] + 2 σ μ 2 π [ − e − t 2 2 ] ∣ − ∞ + ∞ + μ 2 2 π 2 π = σ 2 2 π ∫ − ∞ + ∞ e − t 2 2 d t + 0 + μ 2 = σ 2 2 π 2 π + μ 2 = σ 2 + μ 2 \quad\begin{aligned} E(X^2) & =\int_{-\infty}^{+\infty}(t\sigma+\mu)^2\frac{1}{\sqrt{2\pi}\sigma}e^{-\frac{t^2}{2}}\sigma dt \\&=\frac{1}{\sqrt{2\pi}}\int_{-\infty}^{+\infty}t^2\sigma^2e^{-\frac{t^2}{2}}dt+\frac{1}{\sqrt{2\pi}}\int_{-\infty}^{+\infty}2t\sigma\mu e^{-\frac{t^2}{2}}dt+\frac{1}{\sqrt{2\pi}}\int_{-\infty}^{+\infty}\mu^2e^{-\frac{t^2}{2}}dt \\&=\frac{\sigma^2}{\sqrt{2\pi}}\int_{-\infty}^{+\infty}t^2e^{-\frac{t^2}{2}}dt+\frac{2\sigma\mu}{\sqrt{2\pi}}\int_{-\infty}^{+\infty}te^{-\frac{t^2}{2}}dt+\frac{\mu^2}{\sqrt{2\pi}}\int_{-\infty}^{+\infty}e^{-\frac{t^2}{2}}dt \\&= \frac{\sigma^2}{\sqrt{2\pi}}\bigg[(-te^{-\frac{t^2}{2}})\bigg|_{-\infty}^{+\infty}-\int_{-\infty}^{+\infty}-e^{-\frac{t^2}{2}}dt\bigg] + \frac{2\sigma\mu}{\sqrt{2\pi}}\bigg[-e^{-\frac{t^2}{2}}\bigg]\bigg|_{-\infty}^{+\infty}+ \frac{\mu^2}{\sqrt{2\pi}}\sqrt{2\pi}\\&=\frac{\sigma^2}{\sqrt{2\pi}}\int_{-\infty}^{+\infty}e^{-\frac{t^2}{2}}dt + 0 +\mu^2\\&=\frac{\sigma^2}{\sqrt{2\pi}}\sqrt{2\pi}+\mu^2\\&=\sigma^2+\mu^2\end{aligned} E(X2)=∫−∞+∞(tσ+μ)22πσ1e−2t2σdt=2π1∫−∞+∞t2σ2e−2t2dt+2π1∫−∞+∞2tσμe−2t2dt+2π1∫−∞+∞μ2e−2t2dt=2πσ2∫−∞+∞t2e−2t2dt+2π2σμ∫−∞+∞te−2t2dt+2πμ2∫−∞+∞e−2t2dt=2πσ2[(−te−2t2)∣∣∣∣−∞+∞−∫−∞+∞−e−2t2dt]+2π2σμ[−e−2t2]∣∣∣∣−∞+∞+2πμ22π=2πσ2∫−∞+∞e−2t2dt+0+μ2=2πσ22π+μ2=σ2+μ2
∴ D ( X ) = E ( X 2 ) − [ E ( X ) ] 2 = σ 2 + μ 2 − ( μ ) 2 = σ 2 . \quad\therefore D(X) = E(X^2)-[E(X)]^2 = \sigma^2+\mu^2 -(\mu)^2 = \sigma^2. ∴D(X)=E(X2)−[E(X)]2=σ2+μ2−(μ)2=σ2.
证明方法二:
\quad 随机变量 X X X进行 标准化,令 Z = X − μ σ Z = \frac{X-\mu}{\sigma} Z=σX−μ , 此时有 f ( z ) = 1 2 π e − x 2 2 f(z)=\frac{1}{\sqrt{2\pi}}e^{-\frac{x^2}{2}} f(z)=2π1e−2x2 ,此时有
E ( Z ) = 0 \quad E(Z)=0 E(Z)=0
E ( Z 2 ) = ∫ − ∞ + ∞ z 2 f ( z ) d z = ∫ − ∞ + ∞ z 2 1 2 π e − x 2 2 = 1 2 π [ ( − z e − z 2 2 ) ∣ − ∞ + ∞ − ∫ − ∞ + ∞ − e − z 2 2 d z ] = 1 2 π 2 π = 1 \quad\begin{aligned} E(Z^2) &= \int_{-\infty}^{+\infty}z^2f(z)dz = \int_{-\infty}^{+\infty}z^2\frac{1}{\sqrt{2\pi}}e^{-\frac{x^2}{2}} \\&= \frac{1}{\sqrt{2\pi}}\bigg[(-ze^{-\frac{z^2}{2}})\bigg|_{-\infty}^{+\infty}-\int_{-\infty}^{+\infty}-e^{-\frac{z^2}{2}}dz\bigg]\\&=\frac{1}{\sqrt{2\pi}}\sqrt{2\pi} \\&= 1 \end{aligned} E(Z2)=∫−∞+∞z2f(z)dz=∫−∞+∞z22π1e−2x2=2π1[(−ze−2z2)∣∣∣∣−∞+∞−∫−∞+∞−e−2z2dz]=2π12π=1
∴ D ( Z ) = E ( Z 2 ) − [ E ( Z ) ] 2 = 1 2 − ( 0 ) 2 = 1. 即 D ( X − μ σ ) = 1 σ 2 D ( X ) = 1 ∴ D ( X ) = σ 2 \quad\begin{aligned}&\therefore D(Z) = E(Z^2)-[E(Z)]^2 = 1^2 -(0)^2 = 1. 即\\&D(\frac{X-\mu}{\sigma}) = \frac{1}{\sigma^2}D(X)=1\\&\therefore D(X)= \sigma^2\end{aligned} ∴D(Z)=E(Z2)−[E(Z)]2=12−(0)2=1.即D(σX−μ)=σ21D(X)=1∴D(X)=σ2
3.9 常见分布的方差和期望汇总表
分布 | 参数 | 分布律或概率密度 | 数学期望 | 方差 |
---|---|---|---|---|
( 0 − 1 ) (0-1) (0−1)分布 | 0 < p < 1 0<p<1 0<p<1 | P { X = k } = p k ( 1 − p ) 1 − k , k = 0 , 1 P\{X=k\} = p^k(1-p)^{1-k}, \quad k=0,1 P{ X=k}=pk(1−p)1−k,k=0,1 |
p p p | p ( 1 − p ) p(1-p) p(1−p) |
二项分布 X ∼ b ( n , p ) X\sim b(n,p) X∼b(n,p) | n ≥ 1 0 < p < 1 n\geq1\\0<p<1 n≥10<p<1 | P { X = k } = ( k n ) p k q n − k k = 0 , 1 , 2 ⋯ , n P\{X=k\} = \left(_k^n\right)p^kq^{n-k} \quad k=0,1,2\cdots, n P{ X=k}=(kn)pkqn−kk=0,1,2⋯,n |
n p np np | n p ( 1 − p ) np(1-p) np(1−p) |
泊松分布 X ∼ π ( λ ) X\sim \pi(\lambda) X∼π(λ) | λ > 0 \lambda>0 λ>0 | P { X = k } = λ k k ! e − λ k = 0 , 1 , 2 , ⋯ P\{X=k\} = \frac{\lambda^k}{k!}e^{-\lambda} \quad k=0,1,2,\cdots P{ X=k}=k!λke−λk=0,1,2,⋯ |
λ \lambda λ | λ \lambda λ |
几何分布 X ∼ G ( p ) X\sim G(p) X∼G(p) | 0 < p < 1 0<p<1 0<p<1 | P { X = k } = ( 1 − p ) k − 1 p k = 1 , 2 , 3 , ⋯ P\{X=k\} = (1-p)^{k-1}p \quad k = 1,2,3,\cdots P{ X=k}=(1−p)k−1pk=1,2,3,⋯ |
1 p \frac{1}{p} p1 | 1 − p p 2 \frac{1-p}{p^2} p21−p |
超几何分布 X ∼ H ( n , M , N ) X\sim H(n,M,N) X∼H(n,M,N) | N , M , n N ≥ M N ≥ n N,M,n\\N\geq M\\ N\geq n N,M,nN≥MN≥n | P { X = k } = ( k M ) ( n − k N − M ) ( n N ) k = 0 , 1 , ⋯ , m i n { n , M } . P\{X=k\} = \frac{(_k^M)(_{n-k}^{N-M})}{(_n^N)} \quad k= 0,1,\cdots,min\{n,M\}. P{ X=k}=(nN)(kM)(n−kN−M)k=0,1,⋯,min{ n,M}. |
n M N n\frac{M}{N} nNM | n M N ( 1 − M N ) ( N − n N − 1 ) n\frac{M}{N}(1-\frac{M}{N})(\frac{N-n}{N-1}) nNM(1−NM)(N−1N−n) |
均匀分布 X ∼ U ( a , b ) X\sim U(a,b) X∼U(a,b) | a < b a<b a<b | f ( x ) = { 1 b − a , a < x < b , 0 , e l s e . f(x)=\begin{cases} \frac{1}{b-a},\quad a<x<b, \\ 0,\quad else \end{cases}. f(x)={ b−a1,a<x<b,0,else. |
a + b 2 \frac{a+b}{2} 2a+b | ( b − a ) 2 12 \frac{(b-a)^2}{12} 12(b−a)2 |
指数分布 X ∼ E ( θ ) X\sim E(\theta) X∼E(θ) | θ > 0 \theta>0 θ>0 | f ( x ) = { 1 θ e − x / θ , 0 < x , 0 , e l s e . f(x)=\begin{cases} \frac{1}{\theta}e^{-x/\theta},\quad 0<x, \\ 0,\quad else \end{cases} \quad . f(x)={ θ1e−x/θ,0<x,0,else. |
θ \theta θ | θ 2 \theta^2 θ2 |
正态分布 X ∼ N ( μ , σ 2 ) X\sim N(\mu,\sigma^2) X∼N(μ,σ2) | μ σ > 0 \mu\\\sigma>0 μσ>0 | f ( x ) = 1 2 π σ e − ( x − μ ) 2 2 σ 2 , − ∞ < x < + ∞ . f(x)=\frac{1}{\sqrt{2\pi}\sigma}e^{-\frac{(x-\mu)^2}{2\sigma^2}} , \quad -\infty<x<+\infty. f(x)=2πσ1e−2σ2(x−μ)2,−∞<x<+∞. | μ \mu μ | σ 2 \sigma^2 σ2 |
发布者:全栈程序员-用户IM,转载请注明出处:https://javaforall.cn/192356.html原文链接:https://javaforall.cn
【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛
【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...