# Homework Help: Expectation and variance of a random number of random variables

1. Jan 26, 2010

### Kate2010

1. The problem statement, all variables and given/known data

Let X1...XN be independent and identically distributed random variables, N is a non-negative integer valued random variable. Let Z = X1 + ... + XN (assume when N=0 Z=0).
1. Find E(Z)
2. Show var(Z) = var(N)E(X1)2 + E(N)var(X1)

2. Relevant equations

E(Z) = EX (E(X|Z))
Law of total variance: var(Z) = EX (var(Z|X)) + VarX (E(Z|X))

3. The attempt at a solution

1. I think I have managed this, I got E(N)E(X)
2. I'm unsure how to tackle this one, I know var(Z) = E(Z2) - E(Z)2, and I know E(Z)2 but I don't know how to calculate the other, or if I should be using the equation above, and if so, how.

2. Jan 26, 2010

### csopi

2. follows immediately from the total variance formula.

var Z=E ( var (Z|N)) + var (E (Z|N))

E ( var (Z|N))=E(N var (X1))=var(X1) E(N) -- by fixing N, Z is a sum of fixed number of Xi-s

var (E (Z|N))=var (N E(X1))=[E(X1)]^2*var(N)

3. Jan 27, 2010

### Kate2010

Thanks :)

4. Jan 27, 2010

### Kate2010

The question has a second part which I've just attempted but am also struggling with:

The number of calls received each day at an emergency centre, N, has a poisson distribution, with mean $$\mu$$. Each call has probability p of requiring immediate police response. Let Z be the random bariable representing the number of calls involving police response.

a) What is the probability mass function of Z given N=n?
b) What is the probability generating function of Z, given that we know N=n?
c) Find E(sZ) (use the partition theorem for expectation)
d) Deduce the unconditional distribution of Z and write down var(Z).
e) How is this related to the formula we already worked out?

a) If we know N=n, can we model Z on a binomial distribution with parameters (n,p) so pZ(n) = ($$^{N}_{n}$$)pn(1-p)N-n =pn
b) The binomial p.g.f. is (q+ps)n
c) E(sZ) = $$\sum$$$$^{N}_{n=1}$$ E(sZ | N=n)P(N=n) = $$\sum$$$$^{N}_{n=1}$$ (q+ps)npn = $$\sum$$$$^{N}_{n=1}$$ (pq + p2s)n

I don't understand where I go from here if any of that is correct. I'm not sure that I should have modelled Z on a binomial r.v.