Dξ=∑(ξ-Eξ)^2*Pξ
=∑(ξ^2+Eξ^2-2*ξ*Eξ)*Pξ
=∑(ξ^2*Pξ+Eξ^2*Pξ-2*Pξ*ξ*Eξ)
=∑ξ^2*Pξ+Eξ^2*∑Pξ-2*Eξ*∑Pξ*ξ
因为∑Pξ=1而且Eξ=∑ξ*Pξ
所以Dξ=∑ξ^2*Pξ-Eξ^2
而∑ξ^2*Pξ,表示E(ξ^2)
所以Dξ =E(ξ^2)-Eξ^2
下面计算几何分布的学期望,
Eξ=∑{ξ=1,∞}ξ*(1-p)^(ξ-1)*p
Eξ=p+∑{ξ=2,∞}ξ*(1-p)^(ξ-1)*p ①
当然
(1-p)*Eξ=∑{ξ=1,∞}ξ*(1-p)^ξ*p
(1-p)*Eξ=∑{ξ=2,∞}(ξ-1)*(1-p)^(ξ-1)*p ②
①-②得
p*Eξ=p+∑{ξ=2,∞}(1-p)^(ξ-1)*p
所以
Eξ=1+∑{ξ=2,∞}(1-p)^(ξ-1)
=∑{ξ=1,∞}(1-p)^(ξ-1)
=lim{x→∞}[1-(1-p)^x]/p
=1/p
若要计算方差,可以根据公式Dξ =E(ξ^2)-Eξ^2计算,
其中E(ξ^2)的计算过程如下:
E(ξ^2)=∑{ξ=1,∞}ξ^2*(1-p)^(ξ-1)*p
E(ξ^2)-Eξ=∑{ξ=1,∞}ξ^2*(1-p)^(ξ-1)*p -∑{ξ=1,∞}ξ*(1-p)^(ξ-1)*p
E(ξ^2)-Eξ=∑{ξ=1,∞}ξ*(ξ-1)*(1-p)^(ξ-1)*p
E(ξ^2)=1/p+∑{ξ=1,∞}ξ*(ξ-1)*(1-p)^(ξ-1)*p ①
(1-p)*E(ξ^2)=(1-p)/p+∑{ξ=1,∞}ξ*(ξ-1)*(1-p)^ξ*p
(1-p)*E(ξ^2)=(1-p)/p+∑{ξ=2,∞}(ξ-1)*(ξ-2)*(1-p)^(ξ-1)*p ②
由①得
E(ξ^2)=1/p+∑{ξ=2,∞}ξ*(ξ-1)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