方差及常见分布的方差计算与推导公式_超几何分布的期望和方差

方差及常见分布的方差计算与推导公式_超几何分布的期望和方差1.介绍方差定义和性质2.离散型随机变量(01分布,二项分布,泊松分布,几何分布,超几何分布)和连续型随机变量(均匀分布,指数分布,正态分布)分布的方差计算以及推导过程,并汇总形成表格,方便查阅和记录

大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。

Jetbrains全系列IDE使用 1年只要46元 售后保障 童叟无欺

1. 方差定义

  • 引言

    我们知道,数学期望表示随机变量的平均值,例如,有一批灯泡,其平均寿命是 E ( X ) = 1000 E(X)=1000 E(X)=1000(小时),但是仅有这一项指标并不能知道这批灯泡质量的好坏,如有可能大部分的寿命在 950 ∼ 1050 950\sim1050 9501050之间,也有可能其中约一半是高质量的,寿命可能在 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)=[XE(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[xkE(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)=+[xkE(X)]2f(x)dx, 其中 f ( x ) f(x) f(x) X X X的概率密度。
  • 在实际计算方差中,我们往往使用 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{
    [XE(X)]2}=E{
    X22XE(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[CE(C)]2=E(C2)[E(C)]2=C2C2=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)]22E(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)][YE(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{
    [XE(X)]+[YE(Y)]}2
    =E[XE(X)]2+E[YE(Y)]2+2E{
    [XE(X)][YE(Y)]}
    =D(X)+D(Y)+2E{
    [XE(X)][YE(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)]22E(X)E(Y)(1)=D(X)+D(Y)+2[E(XY)E(X)E(Y))]X,YE(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}=1E(X2)=E[E(X)]2=[E(X)]2D(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) (01)分布

  • 随机变量 X X X服从 ( 0 − 1 ) (0-1) (01)分布,则其分布律为 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(1p)1k,k=0,1

    此时有 D ( X ) = p ( 1 − p ) D(X)=p(1-p) D(X)=p(1p) .

    证明:

    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=01xk2pk=02p0(1p)10+12p1(1p)11=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=pp2=p(1p)

3.2 二项分布

  • X ∼ b ( n , p ) X\sim b(n,p) Xb(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)pkqnkk=0,1,2,n
    ,此时有 D ( X ) = n p ( 1 − p ) . D(X)=np(1-p). D(X)=np(1p).

    证明:

    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=0nk2(kn)pkqnk=k=0nk2k!(nk)!n!pkqnk=k=1nk(k1)!(nk)!n!pkqnk=k=1n(k1)(k1)!(nk)!n!pkqnk+k=1n(k1)!(nk)!n!pkqnk=k=2n(k2)!(nk)!n!pkqnk+npk1=0n1(k1)!(nk)!(n1)!pk1qnk=n(n1)p2k2=0n2(k2)!(nk)!(n2)!pk2qnk+np(p+q)n1=(n2p2np2)(p+q)n2+np=n2p2np2+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=(n2p2np2+np)(np)2=npnp2=np(1p)

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=0k2k!λkeλ=k=1k(k1)!λkeλ=k=1(k1)(k1)!λkeλ+k=1(k1)!λkeλ=λ2k=2(k2)!λk2eλ+λk=1(k1)!λk1eλ=λ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) XG(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}=(1p)k1pk=1,2,3,
    ,此时有 D ( X ) = 1 − p p 2 . D(X)=\frac{1-p}{p^2}. D(X)=p21p.

    证明:

    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=1k2(1p)k1p=pk=1k2(1p)k1
    \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<1kk=1kxk1=(k=1xk)=(1xx)=(1x)21x=1pxk=1kxk1=x(1x)21k=1kxk=x(1x)21k=1k2xk1=(k=1kxk)=[(1x)2x]=(1x)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=1k2(1p)k1=p[1(1p)]31+1p=p22p

    ∴ 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=p22p(p1)2=p21p.

3.5 超几何分布

  • X ∼ H ( n , M , N ) X\sim H(n,M,N) XH(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)(nkNM)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(1NM)(N1Nn).

    证明:

    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=0min{
    n,M}
    k2(nN)(kM)(nkNM)
    =k=0min{
    n,M}
    k2k!(Mk)!M!(nkNM)N!n!(Nn)!
    =k=1min{
    n,M}
    k(k1)!(Mk)!M!(nkNM)N!n!(Nn)!
    =k=1min{
    n,M}
    (k1)(k1)!(Mk)!M!(nkNM)N!n!(Nn)!+k=1min{
    n,M}
    (k1)!(Mk)!M!(nkNM)N!n!(Nn)!
    =k=2min{
    n,M}
    (k2)!(Mk)!M(M1)(M2)!(nkNM)N!n!(Nn)!+k=0min{
    n,M}
    kk!(Mk)!M!(nkNM)N!n!(Nn)!
    =M(M1)N!n!(Nn)!k=2min{
    n,M}
    (k2M2)(nkNM)+E(X)
    =M(M1)N!n!(Nn)!(n2N2)+nNM(Cm+nk=i=0kCmiCnki)=M(M1)N(N1)n(n1)+nNM=nNM[N1(M1)(n1)+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[N1(M1)(n1)+1](nNM)2=nNM(N1MnMn+1+N1nNM)=nNM[N(N1)MNnMNNn+N2MNn+Mn]=nNM[N(N1)N(NM)n(NM)]=nNM[N(N1)(NM)(Nn)]=nNM(1NM)(N1Nn).

3.6 均匀分布

  • X ∼ U ( a , b ) X\sim U(a,b) XU(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)={
    ba1,a<x<b0,else
    .
    ,此时有 D ( X ) = ( b − a ) 2 12 . D(X)=\frac{(b-a)^2}{12}. D(X)=12(ba)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=ax20dx+abx2ba1dx+b+x20dx=0+(31ba1x3)ab+0=3(ba)b3a3=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(ba)2.

3.7 指数分布

  • X ∼ E ( θ ) X\sim E(\theta) XE(θ) ,则其概率密度为 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)={
    θ1ex/θ,0<x0,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=0x20dx+0+x2θ1ex/θdx=0+(x2ex/θ)0+0+2xex/θdx=20+xex/θdx()=2[(xθex/θ)0+)]20+θex/θdx=2θ20+θ1ex/θdx=2θ2(0+θ1ex/θ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) XN(μ,σ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π
    σ
    1
    e2σ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π
σ
1
e2σ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} +e2t2dt=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π
σ
1
e2t2σdt
=2π
1
+t2σ2e2t2dt+2π
1
+2tσμe2t2dt+2π
1
+μ2e2t2dt
=2π
σ2
+t2e2t2dt+2π
2σμ
+te2t2dt+2π
μ2
+e2t2dt
=2π
σ2
[(te2t2)++e2t2dt]+2π
2σμ
[e2t2]++2π
μ2
2π
=2π
σ2
+e2t2dt+0+μ2
=2π
σ2
2π
+μ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π
1
e2x2
,此时有

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π
1
e2x2
=2π
1
[(ze2z2)++e2z2dz]
=2π
1
2π
=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)=1D(X)=σ2

3.9 常见分布的方差和期望汇总表

分布 参数 分布律或概率密度 数学期望 方差
( 0 − 1 ) (0-1) (01)分布 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(1p)1k,k=0,1
p p p p ( 1 − p ) p(1-p) p(1p)
二项分布 X ∼ b ( n , p ) X\sim b(n,p) Xb(n,p) n ≥ 1 0 < p < 1 n\geq1\\0<p<1 n10<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)pkqnkk=0,1,2,n
n p np np n p ( 1 − p ) np(1-p) np(1p)
泊松分布 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) XG(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}=(1p)k1pk=1,2,3,
1 p \frac{1}{p} p1 1 − p p 2 \frac{1-p}{p^2} p21p
超几何分布 X ∼ H ( n , M , N ) X\sim H(n,M,N) XH(n,M,N) N , M , n N ≥ M N ≥ n N,M,n\\N\geq M\\ N\geq n N,M,nNMNn 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)(nkNM)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(1NM)(N1Nn)
均匀分布 X ∼ U ( a , b ) X\sim U(a,b) XU(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)={
ba1,a<x<b0,else
.
a + b 2 \frac{a+b}{2} 2a+b ( b − a ) 2 12 \frac{(b-a)^2}{12} 12(ba)2
指数分布 X ∼ E ( θ ) X\sim E(\theta) XE(θ) θ > 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)={
θ1ex/θ,0<x0,else
.
θ \theta θ θ 2 \theta^2 θ2
正态分布 X ∼ N ( μ , σ 2 ) X\sim N(\mu,\sigma^2) XN(μ,σ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π
σ
1
e2σ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账号...

(0)


相关推荐

  • C#使用WinExec调用exe程序[通俗易懂]

    C#使用WinExec调用exe程序[通俗易懂]实现1、添加引用usingSystem.Runtime.InteropServices;//调用外部的DLL2、定义win32API//调用exe[DllImport("kernel32.dll")]publicstaticexternintWinExec(stringexeName,intoperType);//生成执行数据privatevoi…

  • LocalDate转Date类型「建议收藏」

    LocalDate转Date类型「建议收藏」LocalDate转Date1.需要先将LocalDate转为LocalDateTimeLocalDate.atStartOfDay()2.获取Instance,需要指定时区,这里使用系统默认LocalDateTime.atZone(ZoneId.systemDefault()).toInstant()3.转化Date.from()连起来就是Date.from(LocalDate.now().atStartOfDay().atZone(ZoneId.sy

  • python 中的 type(), dtype(), astype()的区别

    python 中的 type(), dtype(), astype()的区别函数 说明 type() 返回数据结构类型(list、dict、numpy.ndarray等) dtype() 返回数据元素的数据类型(int、float等) 备注:1)由于list、dict等可以包含不同的数据类型,因此不可调用dtype()函数 2)np.array中要求所有元素属于同一数据类型,因此可调用d…

  • 双边滤波——原理及matlab实现

      思维闭塞时可外出采采风。1、双边滤波简介:   双边滤波(Bilateral filter)是一种非线性滤波方法(空间权值+相似权值)——空间权值:模糊去噪;相似权值:保护边缘。2、双边滤波原理  双边滤波具有两个权重:空间权重与相似权重  1)空间权重:与像素位置有关,为像素之间的距离(欧式距离,空间度量),故可定义为全局变量放在循环外,通常定义为…

  • Python文本情感分析_Python数据分析实战

    Python文本情感分析_Python数据分析实战本文由来为了赚足学分丰富假期生活,初衷是分析老师对学生作业的评价和学生对老师的评价的。本来这个任务是在N多天前就应该完成了,无奈本人懒癌晚期+拖延症不想治疗,不是因为火烧眉毛就绝对没有今天的文章。本文旨在记录自己的学习过程,就这样,开干啦!序幕既然题目是“基于情感词典的文本情感分析”,那么情感词典就是必不可少的了。对于情感词典的要求:要包含积极的词语和消极的词语、每一种类的数量要足够多、包含足够广…

  • navicat15 mac 激活码【2021.7最新】

    (navicat15 mac 激活码)好多小伙伴总是说激活码老是失效,太麻烦,关注/收藏全栈君太难教程,2021永久激活的方法等着你。IntelliJ2021最新激活注册码,破解教程可免费永久激活,亲测有效,下面是详细链接哦~https://javaforall.cn/100143.htmlMLZPB5EL5Q-eyJsaWNlbnNlSWQi…

发表回复

您的电子邮箱地址不会被公开。

关注全栈程序员社区公众号