5
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

4.3(標準) 条件付き期待値,条件付き分散

Posted at

方針

条件付き期待値


確率変数X,Yを考える.X=xのもとでのg(X,Y)の条件付き期待値を,次のように定義する.

\mathbb{E}_{Y|X\sim f_{Y|X}}[g(X,Y)|X=x]=\int g(x,y)f_{Y|X}(y|x)dy

ここでは,xは条件つけられた値であるから,期待値は定数である.ここで,xに再び確率変数Xを代入し,

\mathbb{E}_{Y|X\sim f_{Y|X}}[g(X,Y)|X]=\int g(x,y)f_{Y|X}(y|x)dy

とすると,これは確率変数Xに依存するため,期待値などを考えることができる.


繰り返し期待値の法則


\mathbb{E}_{X\sim f_X}[\mathbb{E}_{Y|X\sim f_{Y|X}}[Y|X]]=\mathbb{E}_{Y\sim f_Y}[Y]

(証明)

\begin{align}
\mathbb{E}_{X\sim f_X}[\mathbb{E}_{Y|X\sim f_{Y|X}}[Y|X]]&=
\mathbb{E}_{X\sim f_X}[\int yf_{Y|X}(y|x)dy]\\
&= \int\{\int yf_{Y|X}(y|x)dy\}f_X(x)dx\\
&= \int\int yf_{Y|X}(y|x)f_X(x)dxdy\\
&= \int\int yf_{X,Y}(x,y)dxdy\\
&= \int yf_Y(y)dy\\
&= \mathbb{E}_{Y\sim f_Y}[Y]
\end{align}

条件付き分散


確率変数X,Yを考える.Yで条件づけられたXの分散とは,条件付き期待値を

\mu_{X|Y}=\mathbb{E}_{X|Y\sim f_{X|Y}}[X|Y]

と置くと,

\begin{align}
Var(X|Y)&= \mathbb{E}_{X|Y\sim f_{X|Y}}[(X-\mu_{X|Y})^2|Y]\\
&= \int(x-\mu_{X|Y})^2f_{X|Y}(x|y)dx
\end{align}

全分散の法則


Var(X)=\mathbb{E}_{Y\sim f_{Y}}[Var(X|Y)]+Var(\mathbb{E}_{X|Y\sim f_{X|Y}}[X|Y])

(証明)

\begin{align}
Var(X)&= \mathbb{E}_{X\sim f_X}[(X-\mu_X)^2]\\
&= \int (x-\mu_X)^2f_X(x)dx\\
&= \int\int (x-\mu_X)^2f_{X.Y}(x,y)dxdy\\
&= \int\int\{(x-\mu_{X|Y})+(\mu_{X|Y}-\mu_X)\}^2f_{X.Y}(x,y)dxdy\\
&= \int\int(x-\mu_{X|Y})^2f_{X,Y}(x,y)dxdy\tag{1}\\
& \ \ \ +2\int\int(\mu_{X|Y}-\mu_X)(x-\mu_{X|Y})f_{X,Y}(x,y)dxdy\tag{2}\\
& \ \ \ +\int(\mu_{X|Y}-\mu_X)^2f_Y(y)dy\tag{3}
\end{align}

ここで,

\begin{align}
(1)&= \int\int(x-\mu_{X|Y})^2f_{X,Y}(x,y)dxdy\\
&= \int\int(x-\mu_{X|Y})^2f_Y(y)f_{X|Y}(x|y)dxdy\\
&= \int\{\int(x-\mu_{X|Y})^2f_{X|Y}(x|y)dx\}f_Y(y)dy\\
&= \mathbb{E}_{Y\sim f_Y}[Var(X|Y)]\\
(3)&= \int(\mu_{X|Y}-\mu_X)^2f_Y(y)dy\\
&= \int(\mu_{X|Y}-\mathbb{E}_{Y\sim f_Y}[\mu_{X|Y}])^2f_Y(y)dy\\
&= Var(\mathbb{E}_{X|Y\sim f_{X|Y}}[X|Y])\\
(2)&= \int\int(\mu_{X|Y}-\mu_X)(x-\mu_{X|Y})f_{X,Y}(x,y)dxdy\\
&= \int\int(\mu_{X|Y}-\mu_X)(x-\mu_{X|Y})f_Y(y)f_{X|Y}(x|y)dxdy\\
&= \int\{\int(x-\mu_{X|Y})f_{X|Y}(x|y)dx\}(\mu_{X|Y}-\mu_X)f_Y(y)dy\\
&= 0
\end{align}

以上の計算を用いて問題を解く.

1.答案

Cov(X,Y-\mathbb{E}_{Y|X\sim f_{Y|X}}[Y|X])=0\tag{1}

を示せば良い.

\begin{align}
Cov(X,Y-\mathbb{E}[Y|X])&= \mathbb{E}[X(Y-\mathbb{E}[Y|X])]-\mathbb{E}[X]\mathbb{E}[Y-\mathbb{E}[Y|X]]\\
&= \mathbb{E}[XY]-\mathbb{E}[X\mathbb{E}[Y|X]]-\mathbb{E}[X]\{\mathbb{E}[Y]-\mathbb{E}[\mathbb{E}[Y|X]]\}\tag{2}
\end{align}

ここで,

\begin{align}
\mathbb{E}[X\mathbb{E}[Y|X]]&= \int x\mathbb{E}[Y|X]f_X(x)dx\\
&= \int x\{\int yf_{Y|X}(y|x)dy\}f_X(x)dx\\
&= \int\int xyf_{X,Y}(x,y)dxdy\\
&= \mathbb{E}[XY]\\
\mathbb{E}[\mathbb{E}[Y|X]]&= \int\mathbb{E}[Y|X]f_X(x)dx\\
&= \int\{\int yf_{Y|X}(y|x)dy\}f_X(x)dx\\
&= \int\int yf_{X,Y}(x,y)dxdy\\
&= \int yf_Y(y)dy\\
&= \mathbb{E}[Y]
\end{align}

これらを(2)に代入することで題意(1)が証明される.

2.答案

\begin{align}
Var(Y-\mathbb{E}[Y|X])&= \mathbb{E}[(Y-\mathbb{E}[Y|X]-\mathbb{E}[Y-\mathbb{E}[Y|X]])^2]\\
&= \mathbb{E}[(Y-\mathbb{E}[Y|X]-\mathbb{E}[Y]+\mathbb{E}[Y])^2]\\
&= \mathbb{E}[(Y-\mathbb{E}[Y|X])^2]\\
&= \mathbb{E}[\mathbb{E}[(Y-\mathbb{E}[Y|X])^2|X]]\\
&= \mathbb{E}[Var(Y|X)]
\end{align}

参考文献

5
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?