设有一个随机变量X, 其期望存在为E(X),方差存在为D(X)
有结论 D ( X ) = E ( X 2 ) − [ E ( X ) ] 2 D(X) = E(X^2) - [E(X)]^2 D(X)=E(X2)−[E(X)]2
表达式:
X ~ b ( n , p ) P { X = k } = ( n k ) p k ( 1 − p ) n − k , k = 0 , 1 , 2 , . . . , n X \text{\textasciitilde} b(n, p)\\ P\{X=k\} = {n \choose k}p^k(1-p)^{n-k}, \space k=0,1,2,...,n X~b(n,p)P{X=k}=(kn)pk(1−p)n−k, k=0,1,2,...,n
期望推导过程:
E ( X ) = ∑ k = 0 n P { X = k } ⋅ k = ∑ k = 1 n ( n k ) k p k ( 1 − p ) n − k = ∑ k = 1 n n p ( n − 1 k − 1 ) p k − 1 ( 1 − p ) n − k = n p ∑ k = 1 n ( n − 1 k − 1 ) p k − 1 ( 1 − p ) n − k = n p \begin{aligned} E(X) = &\sum_{k=0}^nP\{X=k\}\sdot k = \sum_{k=1}^n{n \choose k}kp^k(1-p)^{n-k}={\sum_{k=1}^n}np{n-1 \choose k-1}p^{k-1}(1-p)^{n-k}\\ =&\space np\sum_{k=1}^n {n-1 \choose k-1}p^{k-1}(1-p)^{n-k} = np \end{aligned} E(X)==k=0∑nP{X=k}⋅k=k=1∑n(kn)kpk(1−p)n−k=k=1∑nnp(k−1n−1)pk−1(1−p)n−k npk=1∑n(k−1n−1)pk−1(1−p)n−k=np
这里面有2个变换:
( n k ) = n k ( n − 1 k − 1 ) ( n − 1 k − 1 ) p k − 1 ( 1 − p ) n − k = ( p + 1 − p ) n − 1 = 1 {n \choose k} = \frac n k {n-1 \choose k-1} \\ {n-1 \choose k-1}p^{k-1}(1-p)^{n-k} = (p+1-p)^{n-1} = 1 (kn)=kn(k−1n−1)(k−1n−1)pk−1(1−p)n−k=(p+1−p)n−1=1
方差的推导过程:
E ( X 2 ) = ∑ k = 0 n k 2 ( n k ) p k ( 1 − p ) n − k 令 1 − p = q E ( X 2 ) = ∑ k = 1 n k 2 ( n k ) p k q n − k = ∑ k = 1 n n k ( n − 1 k − 1 ) p k q n − k = ∑ k = 1 n n ( k − 1 + 1 ) ( n − 1 k − 1 ) p k q n − k = ∑ k = 1 n n ( k − 1 ) ( n − 1 k − 1 ) p k q n − k + ∑ k = 1 n n p ( n − 1 k − 1 ) p k − 1 q n − k = ∑ k = 2 n n ( n − 1 ) p 2 ( n − 2 k − 2 ) p k − 2 q n − k + n p = n ( n − 1 ) p 2 + n p D ( X ) = E ( X 2 ) − [ E ( X ) 2 ] = n ( n − 1 ) p 2 + n p − ( n p ) 2 = n p ( 1 − p ) \begin{aligned} E(X^2) &= \sum_{k=0}^nk^2{n \choose k}p^k(1-p)^{n-k} \quad 令 1-p = q\\ E(X^2) &= \sum_{k=1}^n k^2 {n \choose k} p^k q^{n-k} = \sum_{k=1}^n nk {n-1 \choose k-1} p^k q^{n-k}\\ &= \sum_{k=1}^n n(k -1 + 1){n-1 \choose k-1} p^k q^{n-k}\\ &= \sum_{k=1}^n n(k-1) {n-1 \choose k-1}p^k q^{n-k} \space + \sum_{k=1}^n np {n-1 \choose k-1} p^{k-1} q^{n-k}\\ &= \sum_{k=2}^n n(n-1) p^2 {n-2 \choose k-2} p^{k-2} q^{n-k} + np\\ &= n(n-1)p^2 + np\\ \\ D(X) &= E(X^2) - [E(X)^2]\\ &= n(n-1)p^2 + np -(np)^2\\ &= np(1-p) \end{aligned} E(X2)E(X2)D(X)=k=0∑nk2(kn)pk(1−p)n−k令1−p=q=k=1∑nk2(kn)pkqn−k=k=1∑nnk(k−1n−1)pkqn−k=k=1∑nn(k−1+1)(k−1n−1)pkqn−k=k=1∑nn(k−1)(k−1n−1)pkqn−k +k=1∑nnp(k−1n−1)pk−1qn−k=k=2∑nn(n−1)p2(k−2n−2)pk−2qn−k+np=n(n−1)p2+np=E(X2)−[E(X)2]=n(n−1)p2+np−(np)2=np(1−p)
表达式:
X ~ π ( λ ) P { X = k } = λ k e − λ k ! , k = 0 , 1 , 2 , . . . X \text{\textasciitilde} \pi(\lambda)\\ P\{X=k\} = \frac {\lambda^k e^{-\lambda}} {k!}, k=0,1,2,... X~π(λ)P{X=k}=k!λke−λ,k=0,1,2,...
期望推导过程:
E ( X ) = ∑ k = 0 ∞ k λ k e − λ k ! = λ e − λ ∑ k = 1 ∞ λ k − 1 k ! = λ e − λ e λ = λ \begin{aligned} E(X) &= \sum_{k=0}^\infin k {\frac {\lambda^k e^{-\lambda} } {k!}} = \lambda e^{-\lambda} \sum_{k=1}^\infin {\frac {\lambda^{k-1}} {k!} } \\ &= \lambda e^{-\lambda} e^{\lambda}\\ &= \lambda\\ \end{aligned} E(X)=k=0∑∞kk!λke−λ=λe−λk=1∑∞k!λk−1=λe−λeλ=λ
这里也有一个变换(就是 e^x的泰勒展开式):
∑ k = 0 ∞ λ k k ! = e λ \sum_{k=0}^\infin {\frac {\lambda^{k}} {k!} } = e^{\lambda} k=0∑∞k!λk=eλ
方差推导过程:
E ( X 2 ) = ∑ k = 0 ∞ k 2 λ k e − λ k ! = ∑ k = 1 ∞ k e − λ λ λ k − 1 ( k − 1 ) ! = ∑ k = 1 ∞ ( k − 1 + 1 ) λ e − λ λ k − 1 ( k − 1 ) ! = ∑ k = 1 ∞ ( k − 1 ) λ e − λ λ k − 1 ( k − 1 ) ! + λ e − λ ∑ k = 1 ∞ λ k − 1 ( k − 1 ) ! = λ 2 e − λ ∑ k = 2 ∞ λ k − 2 ( k − 2 ) ! + λ = λ 2 + λ D ( X ) = λ 2 + λ − λ 2 = λ \begin{aligned} E(X^2) &= \sum_{k=0}^\infin k^2 {\frac {\lambda^k e^{-\lambda}} {k!}} = \sum_{k=1}^\infin k e^{-\lambda} \lambda \space {\frac {\lambda^{k-1}} {(k-1)!}} \\ &= \sum_{k=1}^\infin (k-1+1) \lambda e^{-\lambda} {\frac {\lambda^{k-1}} {(k-1)!}} \\ &= \sum_{k=1}^\infin (k-1) \lambda e^{-\lambda} {\frac {\lambda ^{k-1}} {(k-1)!}} \space + \lambda e^{-\lambda} \sum_{k=1}^\infin {\frac {\lambda^{k-1}} {(k-1)!}} \\ &= \lambda^2 e^{-\lambda} \sum_{k=2}^\infin {\frac {\lambda^{k-2}} {(k-2)!}} \space + \lambda \\ &= \lambda^2 + \lambda \\ \\ D(X) &= \lambda^2 + \lambda - \lambda^2 = \lambda \end{aligned} E(X2)D(X)=k=0∑∞k2k!λke−λ=k=1∑∞ke−λλ (k−1)!λk−1=k=1∑∞(k−1+1)λe−λ(k−1)!λk−1=k=1∑∞(k−1)λe−λ(k−1)!λk−1 +λe−λk=1∑∞(k−1)!λk−1=λ2e−λk=2∑∞(k−2)!λk−2 +λ=λ2+λ=λ2+λ−λ2=λ
表达式:
X ~ G ( p ) P { X = k } = ( 1 − p ) k − 1 p , k = 1 , 2 , 3 , . . . X \text{\textasciitilde} G(p)\\ P\{X=k\} = (1-p)^{k-1}p, \space k= 1, 2, 3, ... X~G(p)P{X=k}=(1−p)k−1p, k=1,2,3,...
期望的推导:
E ( X ) = ∑ k = 1 ∞ k ( 1 − p ) k − 1 p = p ∑ k = 1 ∞ k ( 1 − p ) k − 1 令 q = 1 − p , S = ∑ k = 1 ∞ k q k − 1 S = 1 + 2 q + 3 q 2 + 4 q 3 + . . . + k q k − 1 , k = ∞ ① q S = q + 2 q 2 + 3 q 3 + 4 q 4 + . . . + k q k , k = ∞ ② ① − ② 得 ( 1 − q ) S = 1 + q + q 2 + q 3 + . . . + q k − 1 − k q k S = 1 − q k ( 1 − q ) 2 − k q k 1 − q = 1 ( 1 − q ) 2 = 1 p 2 , 这 里 因 为 k = ∞ E ( X ) = p 1 p 2 = 1 p \begin{aligned} E(X) &= \sum_{k=1}^\infin k (1-p)^{k-1} p = p \sum_{k=1}^\infin k (1-p)^{k-1} \\ 令q = &1 - p, \space S = \sum_{k=1}^\infin kq^{k-1} \\ &\\ S = 1 &+ 2q + 3q^2 + 4q^{3} + ... + kq^{k-1}, k=\infin \qquad ① \\ qS = q&+ 2q^2 + 3q^3 + 4q^4 + ... + kq^k, k=\infin \qquad ② \\ ① - ②得 \quad &(1-q)S = 1+ q +q^2 + q^3 + ... + q^{k-1} - kq^k \\ S = & {\frac {1-q^k} {(1-q)^2} } - {\frac {kq^k} {1-q}} = {\frac 1 {(1-q)^2} } = \frac 1 {p^2}, \quad 这里因为k=\infin \\ \\ E(X) &= p {\frac 1 {p^2}} = {\frac 1 p} \\ \end{aligned} E(X)令q=S=1qS=q①−②得S=E(X)=k=1∑∞k(1−p)k−1p=pk=1∑∞k(1−p)k−11−p, S=k=1∑∞kqk−1+2q+3q2+4q3+...+kqk−1,k=∞①+2q2+3q3+4q4+...+kqk,k=∞②(1−q)S=1+q+q2+q3+...+qk−1−kqk(1−q)21−qk−1−qkqk=(1−q)21=p21,这里因为k=∞=pp21=p1
方差推导过程:
E ( X 2 ) = ∑ k = 1 ∞ k 2 ( 1 − p ) k − 1 p = p ∑ k − 1 ∞ k 2 ( 1 − p ) k − 1 令 1 − p = q S = ∑ k = 1 ∞ k 2 q k − 1 = ∑ k = 1 ∞ ( k q k ) ′ = [ ∑ k = 1 ∞ k q n ] ′ = [ q ( 1 − q ) 2 ] ′ = ( 1 − q ) 2 + 2 ( 1 − q ) q ( 1 − q ) 4 = 2 p − p 2 p 4 = 2 − p p 3 所 以 E ( X 2 ) = 2 − p p 2 D ( X ) = 2 − p p 2 − ( 1 p ) 2 = 1 − p p 2 \begin{aligned} E(X^2) &= \sum_{k=1}^\infin k^2 (1-p)^{k-1} p = p\sum_{k-1}^\infin k^2 {(1-p)}^{k-1} \\ 令1-p &= q \\ S &= \sum_{k=1}^\infin k^2 q^{k-1} = \sum_{k=1}^\infin (kq^k)' = {[\sum_{k=1}^\infin kq^n]}' \\ &= [\frac q {(1-q)^2}]' \\ &= \frac {(1-q)^2 + 2(1-q)q} {(1-q)^4} \\ &= \frac {2p - p^2} {p^4} \\ &= \frac {2-p} {p^3} \\ 所以 E(X^2) &= \frac {2-p} {p^2} \\ D(X) &= \frac {2-p} {p^2} - {(\frac 1 p)}^2 \\ &= \frac {1-p} {p^2}\\ \end{aligned} E(X2)令1−pS所以E(X2)D(X)=k=1∑∞k2(1−p)k−1p=pk−1∑∞k2(1−p)k−1=q=k=1∑∞k2qk−1=k=1∑∞(kqk)′=[k=1∑∞kqn]′=[(1−q)2q]′=(1−q)4(1−q)2+2(1−q)q=p42p−p2=p32−p=p22−p=p22−p−(p1)2=p21−p
表达式:
X ~ H ( n , K , N ) P { X = k } = ( K k ) ( N − K n − k ) ( N n ) X \text{\textasciitilde} H(n, K, N) \\ P\{X=k\} = {\frac {{K \choose k} {N-K \choose n-k} } {N \choose n} } \\ X~H(n,K,N)P{X=k}=(nN)(kK)(n−kN−K)
期望推导过程:
E ( X ) = ∑ k = 0 n k ( K k ) ( N − K n − k ) ( N n ) = K n N ∑ k = 1 n ( K − 1 k − 1 ) ( N − K n − k ) ( N − 1 n − 1 ) = K n N \begin{aligned} E(X) &= \sum_{k=0}^n k {\frac {{K \choose k} {N-K \choose n-k} } {N \choose n}} \\ &= {\frac {Kn} {N}} \sum_{k=1}^n {\frac {{K-1 \choose k-1} {N-K \choose n-k}} {N-1 \choose n-1}} \\ &= {\frac {Kn} {N}}\\ \end{aligned} E(X)=k=0∑nk(nN)(kK)(n−kN−K)=NKnk=1∑n(n−1N−1)(k−1K−1)(n−kN−K)=NKn
方差的推导过程:
E ( X 2 ) = ∑ k = 0 n k 2 ( K k ) ( N − K n − k ) ( N n ) = K n N ∑ k = 1 n ( k − 1 + 1 ) ( K − 1 k − 1 ) ( N − K n − k ) ( N − 1 n − 1 ) = K n N [ ∑ k = 1 n ( k − 1 ) ( K − 1 k − 1 ) ( N − K n − k ) ( N − 1 n − 1 ) + ∑ k = 1 n ( K − 1 k − 1 ) ( N − K n − k ) ( N − 1 n − 1 ) ] = K n N [ ( K − 1 ) ( n − 1 ) N − 1 ∑ k = 2 n ( K − 2 k − 2 ) ( N − K n − k ) ( N − 2 n − 2 ) + 1 ] = K n N [ ( K − 1 ) ( n − 1 ) N − 1 + 1 ] D ( X ) = K n N [ ( K − 1 ) ( n − 1 ) N − 1 + 1 ] − ( K n N ) 2 = K n N ( N − K ) ( N − n ) N ( N − 1 ) \begin{aligned} E(X^2) &= \sum_{k=0}^n k^2 {\frac {{K \choose k} {N-K \choose n-k}} {N \choose n} } \\ &= {\frac {Kn} {N}} \sum_{k=1}^n (k-1+1) {\frac { {K-1 \choose k-1} {N-K \choose n-k} } {N-1 \choose n-1} } \\ &={\frac {Kn} {N}} [ \sum_{k=1}^n (k-1){\frac { {K-1 \choose k-1} {N-K \choose n-k} } {N-1 \choose n-1}} + \sum_{k=1}^n{\frac { {K-1 \choose k-1} {N-K \choose n-k} } {N-1 \choose n-1}} ] \\ &= {\frac {Kn} {N}} [{\frac {(K-1)(n-1)} {N-1}}\sum_{k=2}^n {\frac { {K-2 \choose k-2} {N-K \choose n-k} } {N-2 \choose n-2}} + 1] \\ &= {\frac {Kn} {N}}[{\frac {(K-1)(n-1)} {N-1}} +1] \\ \\ D(X) &= {\frac {Kn} {N}}[{\frac {(K-1)(n-1)} {N-1}} +1] - ({\frac {Kn} N})^2 \\ &= {\frac {Kn} {N}} {\frac {(N-K)(N-n)} {N(N-1)}} \\ \end{aligned} E(X2)D(X)=k=0∑nk2(nN)(kK)(n−kN−K)=NKnk=1∑n(k−1+1)(n−1N−1)(k−1K−1)(n−kN−K)=NKn[k=1∑n(k−1)(n−1N−1)(k−1K−1)(n−kN−K)+k=1∑n(n−1N−1)(k−1K−1)(n−kN−K)]=NKn[N−1(K−1)(n−1)k=2∑n(n−2N−2)(k−2K−2)(n−kN−K)+1]=NKn[N−1(K−1)(n−1)+1]=NKn[N−1(K−1)(n−1)+1]−(NKn)2=NKnN(N−1)(N−K)(N−n)
表达式: