probability-discrete.rst
changeset 11 44779fa3053d
parent 9 d4bed13a2c37
child 12 fa0dee44fe1f
equal deleted inserted replaced
10:5a09c6837dcb 11:44779fa3053d
   201 
   201 
   202 .. math:: E[X|Y](y) = E[X|Y=y]
   202 .. math:: E[X|Y](y) = E[X|Y=y]
   203 
   203 
   204 Property:
   204 Property:
   205 
   205 
       
   206 .. math:: E[g(Y)·X|Y] = g(Y)·E[X|Y]
       
   207 
       
   208 For invertible funtion :math:`h`:
       
   209 
       
   210 .. math:: E[X|h(Y)] = E[X|Y]
       
   211 
       
   212 Proof:
       
   213 
       
   214 .. math::
       
   215 
       
   216    E[X|Y=y] = E[X|h(Y)=h(y)]
       
   217 
       
   218 Law of Iterated Expectations
       
   219 ============================
       
   220 
   206 .. math:: E[E[X|Y]] = E[X]
   221 .. math:: E[E[X|Y]] = E[X]
   207 
   222 
   208 Proof (using total expectation theorem):
   223 Proof (using total expectation theorem):
   209 
   224 
   210 .. math::
   225 .. math::
   211 
   226 
   212    E[E[X|Y]] = ∑_y\ E[X|Y](y) = ∑_y\ E[X|Y=y] = E[X]
   227    E[E[X|Y]] = ∑_y\ E[X|Y](y) = ∑_y\ E[X|Y=y] = E[X]
       
   228 
       
   229 Generalisation of Law of Iterated Expectations:
       
   230 
       
   231 .. math:: E[E[X|Y,Z]|Y] = E[X|Y]
       
   232 
       
   233 Proof, for each :math:`y∈Y`:
       
   234 
       
   235 .. math::
       
   236 
       
   237    E[X|Y=y] = ∑_x\ x·p_{X|Y}(x|Y=y) = ∑_x\ x·p_{X,Y}(x,y)/p_Y(y)
       
   238 
       
   239    = ∑_x\ x·∑_z\ p_{X,Y,Z}(x,y,z)/p_Y(y)
       
   240 
       
   241    = ∑_x\ x·∑_z\ p_{X|Y,Z}(x|Y=y,Z=z)·p_{Y,Z}(y,z)/p_Y(y)
       
   242 
       
   243    = ∑_x\ x·∑_z\ p_{X|Y,Z}(x|Y=y,Z=z)·p_{Z|Y}(z|Y=y)
       
   244 
       
   245    = ∑_x\ ∑_z\ x·p_{X|Y,Z}(x|Y=y,Z=z)·p_{Z|Y}(z|Y=y)
       
   246 
       
   247    = ∑_z\ ∑_x\ x·p_{X|Y,Z}(x|Y=y,Z=z)·p_{Z|Y}(z|Y=y)
       
   248 
       
   249    = ∑_z\ p_{Z|Y}(z|Y=y)·∑_x\ x·p_{X|Y,Z}(x|Y=y,Z=z)
       
   250 
       
   251    = ∑_z\ p_{Z|Y}(z|Y=y)·E[X|Y,Z] = E[E[X|Y,Z]|Y=y]
   213 
   252 
   214 Conditional variance
   253 Conditional variance
   215 ====================
   254 ====================
   216 
   255 
   217 :def:`Conditional variance` of :math:`X` on :math:`Y` is r.v.:
   256 :def:`Conditional variance` of :math:`X` on :math:`Y` is r.v.: