# HG changeset patch # User Oleksandr Gavenko # Date 1461309955 -10800 # Node ID c18d218b854e465975215a85d00c65cf971410a9 # Parent db3d7a44583b78a1d040007a11afbb201050ff4b Sum of random number of i.i.r.v. diff -r db3d7a44583b -r c18d218b854e probability-continuous.rst --- a/probability-continuous.rst Thu Apr 21 16:22:14 2016 +0300 +++ b/probability-continuous.rst Fri Apr 22 10:25:55 2016 +0300 @@ -469,3 +469,27 @@ https://en.wikipedia.org/wiki/Sum_of_normally_distributed_random_variables +Sum of random number of i.i.r.v. +================================ + +Let :math:`Y = X_1+...+X_N` is a sum of r.v. :math:`N` and all :math:`X_i` are +i.i.r.v. Thus: + +.. math:: E[Y] = E[N]·E[X] + +.. math:: var[Y] = E[N]·var(X) + var(N)·(E[N])² + +Proofs: + +.. math:: + + E[Y] = E[∑_{i=1..N}\ X_i] = E[E[∑_{i=1..n}\ X_i |N=n]] = E[∑_{i=1..n}\ E[X_i|N=n]] + + = E[∑_{i=1..n}\ E[X]] = E[N·E[X]] = E[N]·E[X] + +.. math:: + + var[Y] = E[var(Y|N)] + var(E[Y|N]) = E[var(∑_{i=1..n}\ X_i |N=n)] + var(E[∑_{i=1..n}\ X_i |N=n]) + + = E[N·var(X)] + var(N·E[X]) = E[N]·var(X) + var(N)·(E[X])² +