Let X1,X2,...XN be independent identically distributed random variables, where N is a

non-negative integer valued random variable. Let Z = X1 + X2 + : : + XN, (assuming that Z = 0 if N = 0). Find E(Z) and show that

var(Z) = var(N)E(X1)^2 + E(N) var (X1)

Not a clue on this one! I know Expectation of Z is NE(X1)

but how do I show this result?

Many Many thanks