This question introduces a rather efficient method for calculating the mean and variance of probability distributions. We define the moment generating function M(t) for a random variable x by
M(t)=⟨etx⟩.(3.51)
Show that this definition implies that
⟨xn⟩=M(n)(0),(3.52)
where M(n)(t)=dnM/dtn and further that the mean ⟨x⟩=M(1)(0) and the variance σx=M(2)(0)−[M(1)(0)]2. Hence show that:
(a) for a single Bernoulli trial,
M(t)=pet+1−p;(3.53)
(b) for the binomial distribution,
M(t)=(pet+1−p)n;(3.54)
(c) for the Poisson distribution,
M(t)=em(et−1);(3.55)
(d) for the exponential distribution,
M(t)=λ−tλ.(3.56)
Hence derive the mean and variance in each case and show that they agree with the results derived earlier.