基本信息
授课教师:qz
Lecture 10 概率论
实质内容可以不听回头自己看
有手有脑得个八九十分不是问题
来听就一定能听懂;不来听也能懂
作业 = 没有意义的东西
研究随机事件发生的可能性的应用数学
集合论 Set Theory
- 并集 Union ∪
- 交集 Intersection ∩
- 补集 Complement AC
- 互斥 mutually Exclusive
- 穷尽 Collectively Exhaustive
- 分割 Partition
Applying Set Theory to Probability
- 随机实验 Random Experience
- 样本空间 Sample Space
- 事件 Events
Probability Axioms
- A1: P[A]≥0
- A2: P[S]=1
- A3: mutually exclusive events P[A1∪A2∪…]=P[A1]+P[A2]+…
- P[A∪B]=P[A]+P[B]−P[A∩B]
Discrete Sample Space
S={a1,a2,…an}
P[{ai}]=1/n
Conditonal Probability
Defination
P[A∣B]=P[AB]/P[B]
Theorem
- P[A∣B]>0
- P[B∣B]=1
- If Ai is the partition of A, then P[A∣B]=P[A1∣B]+P[A2∣B]+…
Partitions & the Law of Total Probability
If the partition is B={B1,B2,…,Bn}, and Ci=A∩Bi, then A=C1∪C2∪…∪Cn
Bayel’s Law
P[B∣A]=P[A]P[A∣B]P[B]
Independence
A and B are independent if only if P(A∩B)=P(A)P(B)⟺P(A∣B)=P(A),P(B∣A)=P(B)
Independence & Mutually Exclusive
independence ans mutually exclusive are not synonyms
only when P(A)P(B)=0, Ind = M.E.
Random Variables
X∈S
SX: random variable range
map the sample outcomes s to the corresponding value of the random variable X
Discrete Random Variables
Probablity Mass Function
Defination: PX(x)=P[X=x]
Classical Distribution
Name |
Meaning |
PMF |
Expected Value |
Variance |
Bernoulli(p) |
one test, result is 0, or 1 |
{1−pp,x=0,x=1 |
p |
p(1−p) |
Geometric(p) |
the number of tests that result occurs 1 time |
p(1−p)x−1,x=1,2,... |
p1 |
p21−p |
Binomial(p) |
the number of result occurs in n times of tests |
(nk)pk(1−p)n−k,k=0,1,2,... |
np |
np(1−p) |
Pascal(k, p) |
the number of tests when the result occurs k times |
(k−1x−1)pk(1−p)x−k |
pk |
p2k(1−p) |
Discrete Uniform(k, l) |
in range [k,l+1), all events have equal probability |
(l+1)−k1 |
2(l+1)+k−1 |
12((l+1)−k−1)((l+1)−k+1) |
Poisson(a) |
the number of events occuring in a fixed interval of time if each occurs with a known average rate a and independently |
x!axe−a |
a |
a |
Expected Value: E[X]=μX=x∈SX∑xPX(x)
Variance Value: Var[X]=E[(X−μX)2]=E(X2)−μX2
Standard Deviation: σX=Var[X]
Cumulative Distribution Function (CDF)
Defination: FX(x)=P[X≤x]=xi≤x∑P[X=xi]
Derived Random Variable
Y=g(x),E[Y]=x∈SX∑g(x)PX(x)
- E[aX+b]=aE[X]+b
- Var[aX+b]=a2Var[X]
Continuous Random Variables
CDF: FX(x)=P[X≤x]
- P[x1≤X≤x2]=∫x1x2fX(x)dx=FX(x2)−FX(x1)
PDF: fX(x)=dxdFX(x)
- ∫−∞+∞fX(x)dx=1
X is a uniform (a, b), PDF: fX(x)=b−a1
CDF: FX(x)=(x−a)/(b−x),x∈(a,b)
E[X]=(a+b)/2
Var[X]=(b−a)2/12
Gaussian / Normal Random Variables
X is a Gaussian, PDF: fX(x)=2πσ21e−2σ2(x−μ)2
CDF: FX(x)=Φ(σx−μ)
Deifine: Φ(x)=2π1∫−∞xe−2t2dt
E[X]=μ
Var[X]=σ2
Standard Normal Random Variables
Gaussian Random Variables when μ=0,σ=1
X is a Standard Normal, PDF: fX(x)=2π1e−2x2
CDF: FX(x)=Φ(x)=2π1∫−∞xe−2t2dt
E[X]=0
Var[X]=1
In Gaussian(μ, σ), test x=x0, in Standard Normal, x′=(x0−μ)/σ
- Φ(z)+Φ(−z)=1
Binary Random Variables
Joint Probability Mass Function(PMF)
PX,Y(x,y)=P[X=x,Y=y]
use table to present P(x, y)
Joint CDF
FX,Y(x,y)=P[X≤x,Y≤y]
Joint PDF
fX,Y(x,y)=∂x∂y∂2FX,Y(x,y)
Marginal PMF
PX(x)=y∈SY∑PX,Y(x,y)
PY(y)=x∈SX∑PX,Y(x,y)
Marginal PDF
fX(x)=∫−∞∞FX,Y(x,y)dy
Covariance
Cov[X,Y]=E[(X−μX)(Y−μY)]
- Cov[X,Y]=E[X⋅Y]−μxμy
If 2 variables tend to show
- similar behaviour, cov is positive
- opposite behaviour, cov is negative
- uncorrelated behaviour, cov is zero
Correlation
rX,Y=E[X⋅Y]
A normalization of correlation: ρX,Y∈[−1,1]
ρX,Y=Var[X]Var[Y]Cov[X,Y]=σXσYCov[X,Y]
独立则无关,无关不一定独立
X^=aX+b,Y^=cY+d
- ρX^,Y^=ρX,Y
- Cov[X^,Y^]=ac⋅Cov[X,Y]
Other Theorem
- Cov[X,Y]=rX,Y−μXμY
- Var[X+Y]=Var[X]+Var[Y]+2Cov[X,Y]
Independence
Bivariate Gaussian Random Variables
Conditional PMF
PX∣Y(x∣y)=P[X=x∣Y=y]=PY(y)PX,Y(x,y)
Sample
Expected Value of Sums
Wn=X1+X2+…+Xn
E[Wn]=E[X1]+E[X2]+…+E[Xn]
Var[Wn]=i=1∑nVar[Xi]+2i=1∑n−1j=i+1∑nCov[Xi,Xj]=i=1∑nj=1∑nCov[Xi,Xj]
其实就是任意两项(包括自己与自己)的协方差之和
Central Limit Theorem
Xi:iid⇒Zn=nσX2,Wn−nμXn→+∞limFZn(z)=Φ(z)=2π1∫−∞ze−u2/2du
iid:independent and identically distributed 独立同分布
Approximation: FWn(w)≈Φ(nσX2Wn−nμX)
一种无视具体分布类型,利用 X 的期望和反差,用标准正态分布估计原 iid 的 CDF 的方法
K=Binomial(n,p)
P[k1≤K≤k2]≈Φ(np(1−p)k2+0.5−np)−Φ(np(1−p)k2−0.5−np)
上下界~随意~扩展 0.5
Sample Mean
Mn(X)=n1(X1+X2+…+Xn)
Mn(X): Random Variable
E[X]: A Constant Number
n→∞limMn(X)=E[X]
E[Mn(X)]=E[X]
Var[Mn(X)]=nVar[X]
n→∞limVar[Mn(X)]=0
Useful Inequalities in Probability
Markov Inequality
P[X<0]=0→P[X≥c2]≤c2E[X]
Chebyshev Inequality
let X=(Y−μY)→P[X≥c2]=P[(Y−μY)2≥c2]≤c2Var[Y] or P[X≥c2]=P[∣Y−μY∣≥c]≤c2Var[Y]
Laws of Large Numbers
P[∣Mn(X)−μX∣≥c]≤Var[X]/(nc2)
limn→∞P[∣Mn(X)−μX∣≥c]=0,c→0⇒Mn(X)=μX
Point Estimates of Model Parameters
estimate: r
general estimates: R^n is a function of X1,X2,…,Xn
Consistent Estimator
defination(weak): ∀ϵ>0,n→∞limP[∣R^n−r∣≥ϵ]=0
defination(strong): R^=r
Unbiased Estimator
defination: E[R^]=r
Asymptotically Unbiased Estimator
definaton: n→∞limE[R^n]=r
Mean Square Error
e=E[(R^−r)2]
limn→∞en=0⇒R^n is consistent
Mn(X) is an unbiased estimate of E[X]
Standard Error
e
Sample Variance
defination: Vn(X)=n1i=1∑n(Xi−Mn(X))2
E[Vn(X)]=(1−n1)Var[X]
E[Vn(X)]<Var[X]