离散变量的数学期望
设随机变量X的取值范围为 a 1 , . . . , a n a_1, ..., a_n a1,...,an,其对应的概率分布为 P ( X = a i ) = p i P(X = a_i) = p_i P(X=ai)=pi,则X的数学期望 E ( X ) E(X) E(X)(或记为 E X EX EX)定义为:
E ( X ) = ∑ i = 1 n a i p i E(X) = \sum_{i=1}^n a_i p_i E(X)=i=1∑naipi
无限级数的数学期望
设随机变量X的取值范围为 a 1 , a 2 , . . . a_1, a_2, ... a1,a2,...,其对应的概率分布为 P ( X = a i ) = p i P(X = a_i) = p_i P(X=ai)=pi,且满足 ∑ i = 1 ∞ ∣ a i ∣ p i < ∞ \sum_{i=1}^{\infty} |a_i|p_i < \infty ∑i=1∞∣ai∣pi<∞,则变量X存在数学期望,且其数学期望表达式与上述离散分布相同,即:
E ( X ) = ∑ i = 1 ∞ a i p i E(X) = \sum_{i=1}^{\infty} a_i p_i E(X)=i=1∑∞aipi
连续变量的数学期望
设X有概率密度函数 f ( x ) f(x) f(x),如果 ∫ − ∞ ∞ ∣ x ∣ f ( x ) d x < ∞ \int_{-\infty}^{\infty} |x|f(x)dx < \infty ∫−∞∞∣x∣f(x)dx<∞,则X存在数学期望,其数学期望表达式为:
E ( X ) = ∫ − ∞ ∞ x f ( x ) d x E(X) = \int_{-\infty}^{\infty} xf(x)dx E(X)=∫−∞∞xf(x)dx
若干个随机变量之和的期望等于他们各自的期望之和,即:
E ( X 1 + . . . + X n ) = E ( X 1 ) + . . . + E ( X n ) E(X_1 + ... + X_n) = E(X_1) + ... + E(X_n) E(X1+...+Xn)=E(X1)+...+E(Xn)
若干个独立随机变量之积的期望等于他们各自的期望之积,即:
E ( X 1 X 2 . . . X n ) = E ( X 1 ) E ( X 2 ) . . . E ( X n ) E(X_1X_2...X_n) = E(X_1)E(X_2)...E(X_n) E(X1X2...Xn)=E(X1)E(X2)...E(Xn)
随机变量函数的期望可以表示为:
离散型
E ( g ( X ) ) = ∑ i g ( a i ) p i E(g(X)) = \sum_i g(a_i)p_i E(g(X))=i∑g(ai)pi
连续型
E ( g ( X ) ) = ∫ − ∞ ∞ g ( x ) f ( x ) d x E(g(X)) = \int_{-\infty}^{\infty} g(x) f(x) dx E(g(X))=∫−∞∞g(x)f(x)dx
如果 c c c为一个常数,则:
E ( c ⋅ X ) = c ⋅ E ( X ) E(c\cdot X) = c \cdot E(X) E(c⋅X)=c⋅E(X)
推广:矩的定义
考察两个一维随机变量 X , Y X, Y X,Y,假设:
E X = m 1 , E Y = m 2 , V a r ( X ) = σ 1 2 , V a r ( Y ) = σ 2 2 EX = m_1, EY = m_2, Var(X) = \sigma_1^2, Var(Y) = \sigma_2^2 EX=m1,EY=m2,Var(X)=σ12,Var(Y)=σ22
则我们有定义:
我们有性质:
在上述协方差的基础上,我们可以定义相关系数如下:
同样的,有性质:
用直白的语言来说:
中心极限定理是一系列定理的集合,整体来说就是一系列独立同分布的变量之和满足正态分布。
本质上来说这个算是上方林德伯格-莱维定理的一个实例。
P ( x = i ; n , p ) = C n i ⋅ p i ⋅ ( 1 − p ) n − i P(x=i; n,p) = C_{n}^{i} \cdot p^i \cdot (1-p)^{n-i} P(x=i;n,p)=Cni⋅pi⋅(1−p)n−i
E ( X ) = n p E(X) = np E(X)=np
类似的,对于负二项分布 P ( x = k ; r , p ) = C k + r − 1 r − 1 ⋅ p r ⋅ ( 1 − p ) k P(x=k; r,p) = C_{k+r-1}^{r-1} \cdot p^r \cdot (1-p)^{k} P(x=k;r,p)=Ck+r−1r−1⋅pr⋅(1−p)k,同样可以计算其均值为:
E ( X ) = r 1 − p p E(X) = r\frac{1-p}{p} E(X)=rp1−p
V a r ( x ) = n p ( 1 − p ) Var(x) = np(1-p) Var(x)=np(1−p)
P ( x = i ) = e − λ ⋅ λ i / i ! P(x=i) = e^{-\lambda} \cdot \lambda^i / i! P(x=i)=e−λ⋅λi/i!
E ( X ) = λ E(X) = \lambda E(X)=λ
V a r ( X ) = λ Var(X) = \lambda Var(X)=λ
f ( x ) = 1 / ( b − a ) f(x) = 1/(b-a) f(x)=1/(b−a)
E ( X ) = a + b 2 E(X) = \frac{a+b}{2} E(X)=2a+b
V a r ( X ) = ( b − a ) 2 / 12 Var(X) = (b-a)^2/12 Var(X)=(b−a)2/12
m = a + b 2 m = \frac{a+b}{2} m=2a+b
f ( x ) = λ ⋅ e − λ x f(x) = \lambda \cdot e^{-\lambda x} f(x)=λ⋅e−λx
E ( X ) = 1 / λ E(X) = 1/\lambda E(X)=1/λ
V a r ( X ) = 1 / λ 2 Var(X) = 1/\lambda^2 Var(X)=1/λ2
f ( x ) = 1 2 π ⋅ σ ⋅ e x p ( − ( x − μ ) 2 2 σ 2 ) f(x) = \frac{1}{\sqrt{2\pi} \cdot \sigma} \cdot exp(-\frac{(x-\mu)^2}{2\sigma^2}) f(x)=2π⋅σ1⋅exp(−2σ2(x−μ)2)
E ( X ) = μ E(X) = \mu E(X)=μ
V a r ( X ) = σ 2 Var(X) = \sigma^2 Var(X)=σ2
m = μ m=\mu m=μ
k n ( x ) = 1 Γ ( n / 2 ) 2 n / 2 e − x / 2 x ( n − 2 ) / 2 k_n(x) = \frac{1}{\Gamma(n/2) 2^{n/2}}e^{-x/2}x^{(n-2)/2} kn(x)=Γ(n/2)2n/21e−x/2x(n−2)/2
E ( X ) = n E(X) = n E(X)=n
V a r ( X ) = 2 n Var(X) = 2n Var(X)=2n
t n ( x ) = Γ ( ( n + 1 ) / 2 ) n π Γ ( n / 2 ) ( 1 + x 2 n ) − n + 1 2 t_n(x) = \frac{\Gamma((n+1)/2)}{\sqrt{n\pi} \Gamma(n/2)} (1+ \frac{x^2}{n})^{-\frac{n+1}{2}} tn(x)=nπΓ(n/2)Γ((n+1)/2)(1+nx2)−2n+1
E ( X ) = 0 E(X) = 0 E(X)=0
V a r ( X ) = n n − 2 Var(X) = \frac{n}{n-2} Var(X)=n−2n
f m n ( x ) = m m / 2 n n / 2 Γ ( ( m + n ) / 2 ) Γ ( m / 2 ) Γ ( n / 2 ) x m / 2 − 1 ( m x + n ) − ( m + n ) / 2 f_{mn}(x) = m^{m/2} n^{n/2} \frac{\Gamma((m+n)/2)}{\Gamma(m/2)\Gamma(n/2)} x^{m/2-1}(mx+n)^{-(m+n)/2} fmn(x)=mm/2nn/2Γ(m/2)Γ(n/2)Γ((m+n)/2)xm/2−1(mx+n)−(m+n)/2
E ( X ) = n n − 2 E(X) = \frac{n}{n-2} E(X)=n−2n
V a r ( X ) = 2 n 2 ( n + m − 2 ) m ( n − 2 ) 2 ( n − 4 ) Var(X) = \frac{2n^2(n+m-2)}{m(n-2)^2(n-4)} Var(X)=m(n−2)2(n−4)2n2(n+m−2)