5. 기댓값과 적률, 공분산, 조건부기댓값
확률변수 X의 기댓값(expectation value) E(X)는
확률질량함수가 f(x)인 이산확률변수에 대해서 E(X)=∑xxf(x)이고
확률밀도함수가 f(x)인 연속확률변수에 대해서 E(X)=∫∞−∞xf(x)dx이다.
(합 또는 적분이 존재한다고 가정한다. 그렇지 않으면 기댓값이 정의되지 않는다.)
E(X)는 X의 평균(mean)이라고 하고 E(X)=μ로 나타낸다.
다음은 기댓값의 성질이다.
(1) E(g(X))는 확률질량함수가 f(x) 이산확률변수의 경우, ∑xg(x)f(x),
확률밀도함수가 f(x)인 연속확률변수의 경우 ∫∞−∞g(x)f(x)dx이다.
(2) E(aX+b)=aE(X)+b (a,b는 상수)
증명:
(1) 여기서는 X가 이산이고 유한한 경우에 대해서만 보일 것이다(일반적인 경우는 수준을 넘기 때문이다).
x=xi1,⋯,xini일 때 g(x)=gi이라 하면P(g(X)=gi)=ni∑j=1f(xij)이고, g(x)=g1,⋯,gm이면,E(g(X))=m∑i=1giP(g(X)=gi)=m∑i=1gi(ni∑j=1f(xij))=m∑i=1ni∑j=1gif(xij)=∑xg(x)f(x)이다.
(2) 이산확률변수의 경우E(aX+b)=∑x(ax+b)f(x)=a∑xxf(x)+b∑xf(x)=aE(X)+b이고, 연속확률변수의 경우E(aX+b)=∫∞−∞(ax+b)f(x)dx=a∫∞−∞xf(x)dx+b∫∞−∞f(x)dx=aE(X)+b이다.
확률변수 X,Y에 대해 g(X,Y)의 기댓값은
결합확률질량함수가 f(x,y)인 이산확률변수의 경우 E(g(X,Y))=∑x∑yg(x,y)f(x,y)이고,
결합확률밀도함수가 f(x,y)인 연속확률변수의 경우 E(g(X,Y))=∫∞−∞g(x,y)f(x,y)dxdy이다.
앞에서 E(X)=μ를 확률변수 X의 평균으로 정의했다. X의 분산(variance) Var(X)와 표준편차(standard deviation) σ는 다음과 같이 정의된다.Var(X)=E((X−μ)2)=σ2σ=√Var(X)이때 분산 식을 Var(X)=E(X2)−{E(X)}2로 나타낼 수 있는데 그 이유는 다음과 같다.E((X−μ)2)=E((X2−2μX+μ2))=E(X2)−2μE(X)+μ2=E(X2)−2μ2+μ2=E(X2)−{E(X)}2
주사위 한 개를 굴려서 나온 눈의 수를 X라고 할 때,
평균:E(X)=16⋅1+16⋅2+⋯+16⋅6=216=72
분산:E(X2)=16⋅12+16⋅22+⋯+16⋅62=916이므로Var(X)=E(X2)−{E(X)}2=916−(72)2=3512이다.
확률변수 X의 분산이 σ2이면, Var(aX+b)=a2σ2이다.
증명: E(aX+b)=aE(X)+b이므로
이산확률변수의 경우: Var(aX+b)=∑x{(ax+b)−(aμ+b)}2f(x)=a2∑x(x−μ)2f(x)=a2σ2이고,
연속확률변수의 경우: Var(aX+b)=∫∞−∞{(ax+b)−(aμ+b)}2f(x)dx=a2∫∞−∞(x−μ)2f(x)dx=a2σ2이다.
체비셰프 정리(Chebyshev's theorem)
확률변수 X에 대하여 E(X)=μ, Var(X)=σ2이면, 임의의 상수 k에 대하여P(|X−μ|<kσ)≥1−1k2이다.
증명은 생략하겠다.
확률변수 X와 t∈R에 대하여 함수 MX(t)=E(etX)를 확률변수 X의 적률생성함수(moment generating function)라고 한다.
이산확률변수의 경우 E(etX)=∑xetxf(x)이고,
연속확률변수의 경우 E(etX)=∫∞−∞etxf(x)dx이다.
상수 a,b에 대하여 MaX+b(t)=E(e(aX+b)t)=ebtMX(eat)가 성립한다.
이 결과로부터MX−μσ=e−μtσMX(tσ)이다.
연속확률변수 X의 적률생성함수 MX(t)에 대하여ddtMX(t)=ddt∫∞−∞etxf(x)dx=∫∞−∞xetxf(x)dxd2dt2MX(t)=d2dt2∫∞−∞etxf(x)dx=∫∞−∞x2etxf(x)dx⋮dmdtmMX(t)=dmdtm∫∞−∞etxf(x)dx=∫∞−∞xmetxf(x)dx이므로MX(0)=E(X),M′X(t)=E(X2),⋯,M(m)X(t)=E(Xm)이고 E(Xm)을 m차 적률(moment)이라고 한다.
MX(t)의 매클로린 전개는MX(t)=MX(0)+M′X(0)1!t+MX″이므로\frac{d^{r}}{dt^{r}}M_{X}(t)|_{t=0}=E(X^{r})이다.
확률변수 X와 Y의 평균 E(X)=\mu_{X},\,E(Y)=\mu_{Y}와, 공분산 \text{Cov}(X,\,Y)는 다음과 같이 정의된다.\begin{align*}E(X)&=\begin{cases}\displaystyle\sum_{x}{xf_{X}(x)},&\,(\text{discrete})\\ \displaystyle\int_{-\infty}^{\infty}{xf_{X}(x)dx},&\,(\text{continuous})\end{cases}\\ E(Y)&=\begin{cases}\displaystyle\sum_{x}{yf_{Y}(y)},&\,(\text{discrete})\\ \displaystyle\int_{-\infty}^{\infty}{yf_{Y}(y)dy},&\,(\text{continuous})\end{cases}\\ \text{Cov}(X,\,Y)&=E((X-\mu_{X})(Y-\mu_{Y}))\end{align*}여기서 f_{X}(x),\,f_{Y}(y)는 주변확률밀도함수 또는 주변확률질량함수이고, 이때E(XY)=\begin{cases}\displaystyle\sum_{x}{\sum_{y}{xyf(x,\,y)}},&\,(\text{discrete})\\ \displaystyle\int_{-\infty}^{\infty}{\int_{-\infty}^{\infty}{xyf(x,\,y)dxdy}},&\,(\text{continuous})\end{cases}이고,\begin{align*}E((X-\mu_{X})(Y-\mu_{Y}))&=E(XY-X\mu_{Y}-Y\mu_{X}+\mu_{X}\mu_{Y})\\&=E(XY)-\mu_{Y}\mu_{X}-\mu_{X}\mu_{Y}+\mu_{X}\mu_{Y}\\&=E(XY)-\mu_{X}\mu_{Y}\end{align*}이므로 \text{Cov}(X,\,Y)=E(XY)-E(X)E(Y)이다.
이산확률변수 X,\,Y에 대한 결합확률과 주변확률이 다음 표와 같다.
|
X=0 |
X=1 |
X=2 |
계 |
Y=0 |
\displaystyle\frac{1}{6} |
\displaystyle\frac{1}{3} |
\displaystyle\frac{1}{12} |
\displaystyle\frac{7}{12} |
Y=1 |
\displaystyle\frac{2}{9} |
\displaystyle\frac{1}{6} |
0 |
\displaystyle\frac{7}{18} |
Y=2 |
\displaystyle\frac{1}{36} |
0 |
0 |
\displaystyle\frac{1}{36} |
계 |
\displaystyle\frac{5}{12} |
\displaystyle\frac{1}{2} |
\displaystyle\frac{1}{12} |
1 |
공분산 \text{Cov}(X,\,Y)를 구하면\begin{align*} E(XY)&=0\cdot0\cdot\frac{1}{6}+0\cdot1\cdot\frac{2}{9}+0\cdot2\cdot\frac{1}{36}+1\cdot0\cdot\frac{1}{3}+1\cdot1\cdot\frac{1}{6}+2\cdot0\cdot\frac{1}{12}\\&=\frac{1}{6}\end{align*}이고,\begin{align*}E(X)&=0\cdot\frac{5}{12}+1\cdot\frac{1}{2}+2\cdot\frac{1}{12}=\frac{2}{3}\\E(Y)&=0\cdot\frac{7}{12}+1\cdot\frac{7}{18}+2\cdot\frac{1}{36}=\frac{4}{9}\end{align*}이므로\text{Cov}(X,\,Y)=E(XY)-E(X)E(Y)=\frac{1}{6}-\frac{2}{3}\cdot\frac{4}{9}=-\frac{7}{54}이다.
확률변수 X,\,Y가 독립이면, E(XY)=E(X)E(Y)이고, \text{Cov}(X,\,Y)=0이다.
증명: X,\,Y가 독립이면, 결합확률질량함수 또는 결합확률밀도함수는 X와 Y의 곱으로 나타낼 수 있으므로 E(XY)=E(X)E(Y)이고, 따라서 \text{Cov}(X,\,Y)=E(XY)-E(X)E(Y)=E(X)E(Y)-E(X)E(Y)=0이다.
참고: \text{Cov}(X,\,Y)=0이라고 해서, X,\,Y가 독립이라고 할 수 없다.
확률변수 X,\,Y에 대하여 Z=aX+bY일 때,\text{Var}(Z)=a^{2}\text{Var}(X)+b^{2}\text{Var}(Y)+2ab\text{Cov}(X,\,Y)이고, X,\,Y가 독립이면, \text{Cov}(X,\,Y)=0이므로,\text{Var}(Z)=a^{2}\text{Var}(X)+b^{2}\text{Var}(Y)이다.
확률변수 X,\,Y에 대하여 Y=y일 때 g(X)의 조건부기댓값(conditional expectation)은 다음과 같이 정의된다.
(a) 이산확률변수일 때 \displaystyle E(g(X)|y)=\sum_{x}{g(x)f(x|y)}이고,
(b) 연속확률변수일 때 \displaystyle E(g(X)|y)=\int_{-\infty}^{\infty}{g(x)f(x|y)dx}이다.
비슷하게 X=x일 때 h(Y)의 조건부기댓값은 다음과 같이 정의된다.
(a) 이산확률변수일 때 \displaystyle E(h(Y)|x)=\sum_{y}{h(y)f(y|x)}이고,
(b) 연속확률변수일 때 \displaystyle E(h(Y)|x)=\int_{-\infty}^{\infty}{h(y)f(y|x)dy}이다.
위와 같은 방법으로 Y=y일 때 X의 조건부기댓값은 E(X|y)이고, 조건부분산(conditional variance) \text{Var}(X|y)는 다음과 같다.\text{Var}(X|y)=E((X-E(X|y))^{2}|y)=E(X^{2}|y)-\{E(X|y)\}^{2}
확률변수 X,\,Y에 대하여 E(E(X|Y))=E(X)이다.
증명: 연속확률변수인 경우에 대해서 보일 것이다. 이산확률변수인 경우는 적분을 합으로 대체하면 된다.
\begin{align*}E(E(X|Y))&=\int_{-\infty}^{\infty}{\left\{\int_{-\infty}^{\infty}{xf(x|y)dx}\right\}f_{Y}(y)dy}\\&=\int_{-\infty}^{\infty}{\int_{-\infty}^{\infty}{xf(x,\,y)dx}dy}\,\left(\because\,f(x|y)=\frac{f(x,\,y)}{f_{Y}(y)}\right)\\&=\int_{-\infty}^{\infty}{\int_{-\infty}^{\infty}{xf(x,\,y)dx}dy}\\&=\int_{-\infty}^{\infty}{x\left(\int_{-\infty}^{\infty}{f(x,\,y)dy}\right)dx}\\&=\int_{-\infty}^{\infty}{xf_{X}(x)dx}\\&=E(X)\end{align*}
참고자료:
John E Freund's Mathematical Statistics 8th edition, Irwon Miller, Marylees Miller, Pearson
Introduction to Mathematical Statistics 7th edition, Hogg, McKean, Craig, Pearson
수리통계학, 허문열, 송문섭, 박영사
'확률및통계 > 수리통계학' 카테고리의 다른 글
[수리통계학] 7. 연속확률변수와 관련된 분포들 (0) | 2018.11.22 |
---|---|
[수리통계학] 6. 이산확률변수와 관련된 분포들 (0) | 2018.11.21 |
[수리통계학] 4. 확률변수와 분포(2) (0) | 2018.11.19 |
[수리통계학] 3. 확률변수와 분포(1) (0) | 2018.11.18 |
[수리통계학] 2. 확률 (0) | 2018.11.17 |