# HG changeset patch # User Oleksandr Gavenko # Date 1459868854 -10800 # Node ID 8a32b268e8bfd4ed6f25a91e27df9b97d65537f3 # Parent fa0dee44fe1fa217f9e9f9868aa4a3ae42e9977d Sum of a random number of r.v diff -r fa0dee44fe1f -r 8a32b268e8bf probability-discrete.rst --- a/probability-discrete.rst Tue Apr 05 17:32:02 2016 +0300 +++ b/probability-discrete.rst Tue Apr 05 18:07:34 2016 +0300 @@ -312,6 +312,34 @@ = ∑_{x,y:x+y=z}\ P(X=x)·P(Y=z-x) = ∑_x\ p_X(x)·p_Y(z-x) +Sum of a random number of r.v +============================= + +Let :math:`X_i` is independent equally distributed r.v. and let :math:`Y = +∑_{i=1..N}\ X_i`, where :math:`N` is r.v. Then: + +.. math:: + + E[Y|N=n] = n·E[X] + + E[Y|N] = N·E[X] + +Proof: + +.. math:: E[Y|N=n] = E[∑_{i=1..N}\ X_i |N=n] = E[∑_{i=1..n}\ X_i] = ∑_{i=1..n}\ E[X_i] = n·E[X] + +Variance of sum of a random number independent r.v.: + +.. math:: var(∑_{i=1..N}\ X_i|N) = E[N]·var(X) + (E[X])²·var(N) + +Proof: + +.. math:: + + var(Y|N=n) = var[∑_{i=1..N}\ X_i|N=n] = var[∑_{i=1..n}\ X_i] = ∑_{i=1..n}\ var[X_i] = n·var(X) + + var(Y) = E[var(Y|N)] + var(E[Y|N]) = E[N]·var(X) + (E[X])²·var(N) + Well known discrete r.v. ========================