# HG changeset patch # User Oleksandr Gavenko # Date 1459866170 -10800 # Node ID 44779fa3053dad23370caf01afce780e1d2f69ba # Parent 5a09c6837dcbfeb126cc75b2e99043ca5c9aa101 Law of Iterated Expectations. diff -r 5a09c6837dcb -r 44779fa3053d probability-discrete.rst --- a/probability-discrete.rst Thu Mar 31 13:26:03 2016 +0300 +++ b/probability-discrete.rst Tue Apr 05 17:22:50 2016 +0300 @@ -203,6 +203,21 @@ Property: +.. math:: E[g(Y)·X|Y] = g(Y)·E[X|Y] + +For invertible funtion :math:`h`: + +.. math:: E[X|h(Y)] = E[X|Y] + +Proof: + +.. math:: + + E[X|Y=y] = E[X|h(Y)=h(y)] + +Law of Iterated Expectations +============================ + .. math:: E[E[X|Y]] = E[X] Proof (using total expectation theorem): @@ -211,6 +226,30 @@ E[E[X|Y]] = ∑_y\ E[X|Y](y) = ∑_y\ E[X|Y=y] = E[X] +Generalisation of Law of Iterated Expectations: + +.. math:: E[E[X|Y,Z]|Y] = E[X|Y] + +Proof, for each :math:`y∈Y`: + +.. math:: + + E[X|Y=y] = ∑_x\ x·p_{X|Y}(x|Y=y) = ∑_x\ x·p_{X,Y}(x,y)/p_Y(y) + + = ∑_x\ x·∑_z\ p_{X,Y,Z}(x,y,z)/p_Y(y) + + = ∑_x\ x·∑_z\ p_{X|Y,Z}(x|Y=y,Z=z)·p_{Y,Z}(y,z)/p_Y(y) + + = ∑_x\ x·∑_z\ p_{X|Y,Z}(x|Y=y,Z=z)·p_{Z|Y}(z|Y=y) + + = ∑_x\ ∑_z\ x·p_{X|Y,Z}(x|Y=y,Z=z)·p_{Z|Y}(z|Y=y) + + = ∑_z\ ∑_x\ x·p_{X|Y,Z}(x|Y=y,Z=z)·p_{Z|Y}(z|Y=y) + + = ∑_z\ p_{Z|Y}(z|Y=y)·∑_x\ x·p_{X|Y,Z}(x|Y=y,Z=z) + + = ∑_z\ p_{Z|Y}(z|Y=y)·E[X|Y,Z] = E[E[X|Y,Z]|Y=y] + Conditional variance ====================