X ∼ B ( n , p ) X \sim B(n,p) X∼B(n,p)
E ( X ) = n p E(X)=np E(X)=np
D ( X ) = n p ( 1 − p ) D(X)=np(1-p) D(X)=np(1−p)
X ∼ P ( λ ) X\sim P(\lambda) X∼P(λ)
E ( X ) = D ( X ) = λ E(X)=D(X)=\lambda E(X)=D(X)=λ
p { x = k } = λ k k ! e − λ p\{x=k\}=\frac{\lambda^k}{k!}e^{-\lambda} p{x=k}=k!λke−λ
因为概率和为1
∑ k = 0 ∞ λ k k ! e − λ = 1 \sum_{k=0}^{\infty}\frac{\lambda^k}{k!}e^{-\lambda}=1 k=0∑∞k!λke−λ=1
所以:
∑ k = 0 ∞ λ k k ! = e λ \sum_{k=0}^{\infty}\frac{\lambda^k}{k!}=e^{\lambda} k=0∑∞k!λk=eλ
其实是 e λ e^{\lambda} eλ的泰勒展开变形
X ∼ U ( a , b ) X\sim U(a,b) X∼U(a,b)
E ( X ) = a + b 2 E(X)=\frac{a+b}{2} E(X)=2a+b
D ( X ) = ( b − a ) 2 12 D(X)=\frac{(b-a)^2}{12} D(X)=12(b−a)2
X ∼ E ( λ ) X\sim E(\lambda) X∼E(λ)
E ( X ) = 1 λ E(X)=\frac{1}{\lambda} E(X)=λ1
D ( X ) = 1 λ 2 D(X)=\frac{1}{\lambda^2} D(X)=λ21
X ∼ f ( x ) = { λ e − λ x , x > 0 0 , x ≤ 0 X\sim f(x)=\left\{\begin{matrix} \lambda e^{-\lambda x},x>0 \\ 0,x\leq0 \end{matrix}\right. X∼f(x)={λe−λx,x>00,x≤0
p x > t = ∫ t + ∞ λ e − λ t d t = e − λ t p{x>t}=\int_t^{+\infty}\lambda e^{-\lambda t}dt=e^{-\lambda t} px>t=∫t+∞λe−λtdt=e−λt
p x > t + s ∣ x > s = p ( x > t + s , x > s ) p ( x > s ) = p ( x > t + s ) p ( x > s ) = e − λ ( t + s ) e − λ s = e − λ t p{x>t+s|x>s}=\frac{p(x>t+s\ \ ,\ \ x>s)}{p(x>s)}=\frac{p(x>t+s)}{p(x>s)}=\frac{e^{-\lambda(t+s)}}{e^{-\lambda s}}=e^{-\lambda t} px>t+s∣x>s=p(x>s)p(x>t+s , x>s)=p(x>s)p(x>t+s)=e−λse−λ(t+s)=e−λt
X ∼ N ( μ , σ 2 ) X\sim N(\mu,\sigma^2) X∼N(μ,σ2)
E ( X ) = μ E(X)=\mu E(X)=μ
D ( X ) = σ 2 D(X)=\sigma^2 D(X)=σ2
X ∼ f ( x ) = 1 2 π σ e − ( x − μ ) 2 2 σ 2 X\sim f(x)=\frac{1}{\sqrt{2\pi}\sigma}e^{-\frac{(x-\mu)^2}{2\sigma^2}} X∼f(x)=2πσ1e−2σ2(x−μ)2
X ∼ N ( 0 , 1 ) X\sim N(0,1) X∼N(0,1)
用 φ ( x ) \varphi(x) φ(x)来表示
φ ( x ) 1 2 π e − x 2 2 \varphi(x)\frac{1}{\sqrt{2\pi}}e^{-\frac{x^2}{2}} φ(x)2π1e−2x2
用 ϕ \phi ϕ来表示
有个对称性的性质:
ϕ ( x ) = 1 − ϕ ( − x ) \phi(x)=1-\phi(-x) ϕ(x)=1−ϕ(−x)
①:
A ∪ B ‾ = A ˉ ∩ B ˉ \overline{A\cup B}=\bar{A}\cap \bar{B} A∪B=Aˉ∩Bˉ
②:
A ∩ B ‾ = A ˉ ∪ B ˉ \overline{A\cap B}=\bar{A}\cup \bar{B} A∩B=Aˉ∪Bˉ
③:
A − B ‾ = A ˉ ∪ B \overline{A- B}=\bar{A}\cup B A−B=Aˉ∪B
这个感觉有点少见
①:
p ( B ∣ A ) = p ( B ∣ A ˉ ) = p ( B ) p(B|A)=p(B|\bar A)=p(B) p(B∣A)=p(B∣Aˉ)=p(B)
p ( B ∣ A ) = p ( A B ) p ( A ) = p ( A ) p ( B ) p ( A ) = p ( B ) p(B|A)=\frac{p(AB)}{p(A)}=\frac{p(A)p(B)}{p(A)}=p(B) p(B∣A)=p(A)p(AB)=p(A)p(A)p(B)=p(B)
p ( B ∣ A ˉ ) p(B|\bar A) p(B∣Aˉ)同理
②:
p ( A ∣ B ) = 1 − p ( A ˉ ∣ B ˉ ) p(A|B)=1-p(\bar A|\bar B) p(A∣B)=1−p(Aˉ∣Bˉ)
这个怎么来的???
X ∼ f ( x ) , Y ∼ g ( f ( x ) ) X\sim f(x),Y\sim g(f(x)) X∼f(x),Y∼g(f(x))
f Y ( y ) = F Y ′ ( y ) f_Y(y)=F'_Y(y) fY(y)=FY′(y)
而
F Y ( y ) = p ( Y ≤ y ) = p ( g ( x ) ≤ y ) = ∫ g ( x ) ≤ y f x ( x ) d y F_Y(y)=p(Y\leq y)=p(g(x)\leq y)=\int_{g(x)\leq y}f_x(x)dy FY(y)=p(Y≤y)=p(g(x)≤y)=∫g(x)≤yfx(x)dy
根据王式安老师说的,好像是个定理,要研究生的课才上
如果:
X ∼ f ( x ) , F ( x ) X\sim f(x),F(x) X∼f(x),F(x)
并且有 Y = F ( X ) Y=F(X) Y=F(X)这个代换,那么
Y ∼ U ( 0 , 1 ) Y\sim U(0,1) Y∼U(0,1)
Y ∼ F Y ( y ) = p ( Y ≤ y ) = p ( F ( X ) ≤ y ) = p ( X ≤ F − 1 ( y ) ) = F ( F − 1 ( y ) ) = y Y\sim F_Y(y)=p(Y\leq y)=p(F(X)\leq y)=p(X\leq F^{-1}(y))=F(F^{-1}(y))=y Y∼FY(y)=p(Y≤y)=p(F(X)≤y)=p(X≤F−1(y))=F(F−1(y))=y
f x ( x ) , f X ( x ) , f x ( X ) , f X ( X ) f_x(x),f_X(x),f_x(X),f_X(X) fx(x),fX(x),fx(X),fX(X)
C o v ( X , Y ) = E { [ X − E ( X ) ] [ Y − E ( Y ) ] } = E ( X Y ) − E ( X ) E ( Y ) Cov(X,Y)=E\{[X-E(X)][Y-E(Y)]\}=E(XY)-E(X)E(Y) Cov(X,Y)=E{[X−E(X)][Y−E(Y)]}=E(XY)−E(X)E(Y)
①:
C o v ( a X , b Y ) = a b C o v ( X , Y ) Cov(aX,bY)=abCov(X,Y) Cov(aX,bY)=abCov(X,Y)
②:
C o v ( X 1 + X 2 , Y ) = C o v ( X 1 , Y ) + C o v ( X 2 , Y ) Cov(X_1+X_2,Y)=Cov(X_1,Y)+Cov(X_2,Y) Cov(X1+X2,Y)=Cov(X1,Y)+Cov(X2,Y)
用协方差来计算和的方差
D ( X ± Y ) = D ( X ) ± 2 C o v ( X , Y ) + D ( Y ) D(X\pm Y)=D(X)\pm2Cov(X,Y)+D(Y) D(X±Y)=D(X)±2Cov(X,Y)+D(Y)
ρ X Y = C o v ( X , Y ) D ( X ) D ( Y ) \rho_{XY}=\frac{Cov(X,Y)}{\sqrt{D(X)D(Y)}} ρXY=D(X)D(Y)Cov(X,Y)
p ( ∣ X − E ( X ) ∣ ≥ ε ) ≤ D ( X ) ε 2 p(|X-E(X)|\geq \varepsilon)\leq\frac{D(X)}{\varepsilon^2} p(∣X−E(X)∣≥ε)≤ε2D(X)
大数定理这一节,截个王式安老师的图:
伯努利大数定理可以看成是上面两个的特殊情况
反正就是求期望就完事了~
X ‾ = 1 n ∑ i = 1 n X i \overline X=\frac{1}{n}\sum_{i=1}^nX_i X=n1i=1∑nXi
S 2 = 1 n − 1 ∑ i − 1 n ( X i − X ‾ ) 2 S^2=\frac{1}{n-1}\sum_{i-1}^n(X_i-\overline X)^2 S2=n−11i−1∑n(Xi−X)2
样本方差阔以化为两种形状:
①:
1 n − 1 ∑ i − 1 n ( X i − X ‾ ) 2 = 1 n − 1 [ ∑ i = 1 n X i 2 − n X ‾ 2 ] \frac{1}{n-1}\sum_{i-1}^n(X_i-\overline X)^2=\frac{1}{n-1}[\sum_{i=1}^nX_i^2-n\overline X^2] n−11i−1∑n(Xi−X)2=n−11[i=1∑nXi2−nX2]
过程:
S 2 = 1 n − 1 ∑ i − 1 n ( X i − X ‾ ) 2 = 1 n − 1 ∑ i − 1 n ( X i 2 − 2 X i X ‾ + X ‾ 2 ) = 1 n − 1 [ ∑ i − 1 n X i 2 − 2 X ‾ ∑ i = 1 n X i + ∑ i = 1 n X ‾ 2 ] = 1 n − 1 [ ∑ i − 1 n X i 2 − 2 X ‾ ⋅ n X ‾ + ∑ i = 1 n X ‾ 2 ] = 1 n − 1 ( ∑ i − 1 n X i 2 − n X ‾ 2 ) S^2=\frac{1}{n-1}\sum_{i-1}^n(X_i-\overline X)^2=\frac{1}{n-1}\sum_{i-1}^n(X_i^2-2X_i\overline X+\overline X^2)=\frac{1}{n-1}[\sum_{i-1}^nX_i^2-2\overline X\sum_{i=1}^nX_i+\sum_{i=1}^n\overline X^2]=\frac{1}{n-1}[\sum_{i-1}^nX_i^2-2\overline X\cdot n\overline{X}+\sum_{i=1}^n\overline X^2]=\frac{1}{n-1}(\sum_{i-1}^nX_i^2-n\overline X^2) S2=n−11i−1∑n(Xi−X)2=n−11i−1∑n(Xi2−2XiX+X2)=n−11[i−1∑nXi2−2Xi=1∑nXi+i=1∑nX2]=n−11[i−1∑nXi2−2X⋅nX+i=1∑nX2]=n−11(i−1∑nXi2−nX2)
②:
1 n − 1 ∑ i − 1 n ( X i − X ‾ ) 2 = ∑ i = 1 n ( X i − μ ) 2 − n ( X ‾ − μ ) 2 \frac{1}{n-1}\sum_{i-1}^n(X_i-\overline X)^2=\sum_{i=1}^n(X_i-\mu)^2-n(\overline X-\mu)^2 n−11i−1∑n(Xi−X)2=i=1∑n(Xi−μ)2−n(X−μ)2
过程:
1 n − 1 ∑ i − 1 n ( X i − X ‾ ) 2 = 1 n − 1 ∑ i − 1 n [ ( X i − μ ) − ( X ‾ − μ ) ] 2 = 1 n − 1 ∑ i − 1 n [ ( X i − μ ) 2 − 2 ( X i − μ ) ( X ‾ − μ ) + ( X ‾ − μ ) 2 ] = ∑ i = 1 n [ ( X i − μ ) 2 − ( X ‾ − μ ) 2 ] = ∑ i = 1 n ( X i − μ ) 2 − n ( X ‾ − μ ) 2 \frac{1}{n-1}\sum_{i-1}^n(X_i-\overline X)^2=\frac{1}{n-1}\sum_{i-1}^n[(X_i-\mu)-(\overline X-\mu)]^2=\frac{1}{n-1}\sum_{i-1}^n[(X_i-\mu)^2-2(X_i-\mu)(\overline X-\mu)+(\overline X-\mu)^2]=\sum_{i=1}^n[(X_i-\mu)^2-(\overline X-\mu)^2]=\sum_{i=1}^n(X_i-\mu)^2-n(\overline X-\mu)^2 n−11i−1∑n(Xi−X)2=n−11i−1∑n[(Xi−μ)−(X−μ)]2=n−11i−1∑n[(Xi−μ)2−2(Xi−μ)(X−μ)+(X−μ)2]=i=1∑n[(Xi−μ)2−(X−μ)2]=i=1∑n(Xi−μ)2−n(X−μ)2
这儿有篇苏剑林写的关于无偏估计的:为啥是n-1
E ( X ‾ ) = E ( 1 n ∑ i = 1 n X i ) = ∑ i = 1 n E ( 1 n X i ) = ∑ i = 1 n 1 n μ = μ E(\overline X)=E(\frac{1}{n}\sum_{i=1}^nX_i)=\sum_{i=1}^nE(\frac{1}{n}X_i)=\sum_{i=1}^n\frac{1}{n}\mu=\mu E(X)=E(n1i=1∑nXi)=i=1∑nE(n1Xi)=i=1∑nn1μ=μ
D ( X ‾ ) = D ( 1 n ∑ i = 1 n X i ) = ∑ i = 1 n D ( 1 n X i ) = ∑ i = 1 n 1 n 2 D ( X i ) = ∑ i = 1 n 1 n 2 σ 2 = σ 2 n D(\overline X)=D(\frac{1}{n}\sum_{i=1}^nX_i)=\sum_{i=1}^nD(\frac{1}{n}X_i)=\sum_{i=1}^n\frac{1}{n^2}D(X_i)=\sum_{i=1}^n\frac{1}{n^2}\sigma^2=\frac{\sigma^2}{n} D(X)=D(n1i=1∑nXi)=i=1∑nD(n1Xi)=i=1∑nn21D(Xi)=i=1∑nn21σ2=nσ2
E ( S 2 ) = 1 n − 1 [ ∑ i = 1 n E ( X i 2 ) − n E ( X ‾ 2 ) ] = 1 n − 1 [ ∑ i = 1 n ( D ( X i ) + E 2 ( X i ) ) − n ( D ( X ‾ ) + E 2 ( X ‾ ) ) ] = 1 n − 1 [ ∑ i = 1 n ( σ 2 + μ 2 ) − n ( σ 2 n + μ 2 ) ] = 1 n − 1 [ n σ 2 + n μ 2 − σ 2 − n μ 2 ] = 1 n − 1 [ ( n − 1 ) σ 2 ] = σ 2 E(S^2)=\frac{1}{n-1}[\sum_{i=1}^nE(X_i^2)-nE(\overline X^2)]=\frac{1}{n-1}[\sum_{i=1}^n(D(X_i)+E^2(X_i))-n(D(\overline X)+E^2(\overline X))]=\frac{1}{n-1}[\sum_{i=1}^n(\sigma^2+\mu^2)-n(\frac{\sigma^2}{n}+\mu^2)]=\frac{1}{n-1}[n\sigma^2+n\mu^2-\sigma^2-n\mu^2]=\frac{1}{n-1}[(n-1)\sigma^2]=\sigma^2 E(S2)=n−11[i=1∑nE(Xi2)−nE(X2)]=n−11[i=1∑n(D(Xi)+E2(Xi))−n(D(X)+E2(X))]=n−11[i=1∑n(σ2+μ2)−n(nσ2+μ2)]=n−11[nσ2+nμ2−σ2−nμ2]=n−11[(n−1)σ2]=σ2
X ∼ χ 2 ( n ) X\sim \chi^2(n) X∼χ2(n)
E ( X ) = n E(X)=n E(X)=n
D ( X ) = 2 n D(X)=2n D(X)=2n
还有一个关于 开方分布 与 样本方差 的一个定理,感觉经常用,但是证明很麻烦,是书上P143,证明在章末附录
( n − 1 ) S 2 σ 2 ∼ χ 2 ( n − 1 ) \frac{(n-1)S^2}{\sigma^2}\sim\chi^2(n-1) σ2(n−1)S2∼χ2(n−1)
X ∼ N ( 0 , 1 ) Y ∼ χ 2 ( n ) X\sim N(0,1)\\Y\sim \chi^2(n) X∼N(0,1)Y∼χ2(n)
T = X Y / n T=\frac{X}{\sqrt{Y/n}} T=Y/nX
t 1 − α ( n ) = − t α ( n ) t_{1-\alpha}(n)=-t_{\alpha}(n) t1−α(n)=−tα(n)
关于 t分布 与 样本方差 的一个定理
T = X ‾ − μ S 2 / n ∼ t ( n − 1 ) T=\frac{\overline X-\mu}{\sqrt{S^2/n}}\sim t(n-1) T=S2/nX−μ∼t(n−1)
①:
X ‾ ∼ N ( μ , σ 2 n ) , X ‾ − μ σ 2 / n ∼ N ( 0 , 1 ) \overline X\sim N(\mu,\frac{\sigma^2}{n}),\frac{\overline X-\mu}{\sqrt{\sigma^2/n}}\sim N(0,1) X∼N(μ,nσ2),σ2/nX−μ∼N(0,1)
②:
X ‾ 与 S 2 相 互 独 立 , 且 ( n − 1 ) S 2 σ 2 ∼ χ 2 ( n − 1 ) \overline X与S^2相互独立,且\frac{(n-1)S^2}{\sigma^2} \sim \chi^2(n-1) X与S2相互独立,且σ2(n−1)S2∼χ2(n−1)
③:
T = X ‾ − μ S 2 / n ∼ t ( n − 1 ) T=\frac{\overline X-\mu}{\sqrt{S^2/n}}\sim t(n-1) T=S2/nX−μ∼t(n−1)
背一个积分
∫ 0 ∞ x n e − x d x = n ! \int_0^\infty x^ne^{-x}dx=n! ∫0∞xne−xdx=n!