링크텍스트
위 강의를 듣고 정리하는 글입니다.
random variable(확률변수): a function from sample space to (real) number
RV
- continuous RV
- Discrete RV
cumulative distribution function(cdf, 누적 분포 함수) of RV X
F(x)=P(X≤x)
4.2 types of RV
1. Discrete RV
probability mass function(pmf): PX(a)=P(X=a)
ΣiP(xi)=1
2. Continuous RV
probability density function(pdf): f(x)=dxdF(x) (cdf를 미분한 것)
P(a<X≤b)=∫abf(x)dx → f(x)는 확률이 아니고 확률 밀도임!
P(X=a)=0
4.3 jointly distributed random variables
joint cumulative distribution function(joint cdf) FXY(x,y)=P(X≤x,Y≤y)
marginal cdf FX(x)=P(X≤x)=P(X≤x,Y≤∞)=FXY(x,∞)
FY(y)=FXY(∞,y)
- 만약 X, Y가 discrete RV라면
joint pmf P(xi,yi)=P(X=xi,Y=yi)
marginal pmf P(xi)=ΣjP(xi,yj), P(yi)=ΣjP(xj,yi)
- joint pmf를 알면 marginal pmf를 구할 수 있겠지
- marginal pmf를 알면 joint pmf를 구할 수 있나? → X, Y가 independent해야만 구하는게 가능하겠지
- 만약 X, Y가 contiuous RV라면
joint pdf fXY(x,y)=∂x∂y∂2F(x,y) → F(a,b)=∫−∞b∫−∞af(x,y)dxdy
marginal pdf fX(x)=∫−∞∞f(x,y)dy, fY(y)=∫−∞∞f(x,y)dx
4.3.1 independent random variables
FXY(a,b)=FX(a)FY(b) for all a, b
joint cdf가 marginal cdf의 곱으로 표현이 될 때 두 RV X와 Y는 independent
- discrete RV
- PXY(x,y)=PX(x)PY(y)
- continuous RV
- fXY(x,y)=fX(x)fY(y)
4.3.2 conditional distributions
- discrete RV
conditional pmf PX∣Y(x∣y)=P(X=x∣Y=y)=P(Y=y)P(X=x,Y=y)=PY(y)P(x,y)
- continuous RV
conditional pdf fX∣Y(x∣y)=fY(y)fXY(x,y)
4.4 expectation
mean of X
expectation of X
E[X]=i∑xiP(X=xi)
E[X]=∫−∞∞xfX(x)dx=lim∑xP(x<X<x+dx)
discrete RV X에 대하여 P(X=xi)=Pi(i=1,2,…,n)라고 했을 때
xi의 정보의 양(Amount of information of xi) = log2Pi1
RV X의 평균 information(Entropy) H(X)=∑i=1nPilog2Pi1
4.5 properties of the expected value
E[aX+b]=aE[X]+b
E[Xn] = nth moment of X
4.5.1 expected value of sums of random variables
E[aX+bY]=aE[X]+bE[Y]
어떤 RV의 값을 그것의 mean(µ)으로 예측하면 mean square error(MSE, prediction의 오류의 제곱의 평균)가 최소가 된다.
증명)
c=prediction of X
µ=E[X]
E[(X−c)2]=E[(X−µ+µ−c)2]=E[(X−µ)2]+(µ−c)2≥E[(X−µ)2]
4.6 variance
Var(X)=E[(X−µ)2]=E[X2]−µ2
4.7 covariance and variance of sums of RVs
RV가 여러 개 있을 때 그것들의 합의 분포에 관심이 많게 됨
일반적으로는 Var(X+Y)=Var(X)+Var(Y)
그럼 합의 variance는 어떻게 되니? → covariance
covariance of X and Y
Cov(X,Y)=E[(X−µX)(Y−µY)]
=E[XY−µXY−µYX+µXµY]
=E[XY]−µXµY−µXµY+µXµY
=E[XY]−E[X]E[Y]
- E[XY]=E[X]E[Y]이면 X and Y are
uncorrelated(Cov(X,Y)=0)
- X and Y are independent → X and Y are uncorrelated
correlation of X and Y = E[XY]
correlation coefficient of X and Y = Var(X)Var(Y)Cov(X,Y)
Var(X+Y)=Var(X)+Var(Y)+2Cov(X,Y)
4.8 moment generating functions(MGF)
Φ(t)=E[etx]=x∑etxp(x)
Φ(t)=E[etx]=∫−infinfetxf(x)dx
Φ′(t)=dtdE[etx]=E[dtdetx]=E[xetx]
Φ′(0)=E[x]
MGF를 알면 E[x] 구하기가 쉬움. MGF 미분해서 0 넣으면 됨.(pdf의 경우 E[x]를 구하기 위해 적분을 해야 하지만 MGF는 미분을 하면 됨 → 일반적으로 적분보다 미분이 쉬움)
4.9 Chebyshev’s inequality and the weak law of large numbers
Markov’s inequality
X is a positive RV, a>0일 때
P(X>a)<=aE[x]
E[x]는 분포에 대해 많은 것을 이야기해 주는구나
증명)
E[x]=∫0infxf(x)dx=∫0axf(x)dx+∫ainfxf(x)dx
>=∫ainfxf(x)dx>=∫ainfaf(x)dx=a∫ainff(x)dx=aP(X>a)
Chebyshev’s inequality
E[x]=µ, Var(X)=σ2
P(∣X−µ∣>=k)<=k2σ2
증명)
Markov’s inequality에서 X 대신 (X−µ)2을 넣어주고, a 대신 k2을 넣어주면 됨
The weak law of large numbers
X1,…Xn: iid(independent and identically distributed, 독립이고 분포가 같은) RVs
분포가 모두 같으니 E[Xi]=µ
임의의 ε>0에 대하여
n−>inflimP(∣nX1+...+Xn−µ∣>ε)=0