The random variable N takes positive integer values and has pgf (probability generating function) G(t). The random variables Xi, where i=1,2,3,…, are independently and identically distributed, each with pgf H(t). The random variables Xi are also independent of N. The random variable Y is defined by
Y=i=1∑NXi. Given that the pgf of Y is G(H(t)), show that
E(Y)=E(N)E(Xi)andVar(Y)=Var(N)(E(Xi))2+E(N)Var(Xi). A fair coin is tossed until a head occurs. The total number of tosses is N. The coin is then tossed a further N times and the total number of heads in these N tosses is Y. Find in this particular case the pgf of Y, E(Y), Var(Y) and P(Y=r).