72 Probability and Distributionsus to interchange the order of differentiation and integration (or summation in the
discrete case). That is, ifXis continuous,M′(t)=dM(t)
dt=d
dt∫∞−∞etxf(x)dx=∫∞−∞d
dtetxf(x)dx=∫∞−∞xetxf(x)dx.Likewise, ifXis a discrete random variable,
M′(t)=
dM(t)
dt=∑xxetxp(x).Upon settingt=0,wehaveineithercase
M′(0) =E(X)=μ.The second derivative ofM(t)is
M′′(t)=∫∞−∞x^2 etxf(x)dx or∑xx^2 etxp(x),so thatM′′(0) =E(X^2 ). Accordingly, Var(X)equals
σ^2 =E(X^2 )−μ^2 =M′′(0)−[M′(0)]^2.For example, ifM(t)=(1−t)−^1 ,t<1, as in the illustration above, then
M′(t)=(1−t)−^2 and M′′(t)=2(1−t)−^3.Hence
μ=M′(0) = 1
and
σ^2 =M′′(0)−μ^2 =2−1=1.
Of course, we could have computedμandσ^2 from the pdf by
μ=∫∞−∞xf(x)dx and σ^2 =∫∞−∞x^2 f(x)dx−μ^2 ,respectively. Sometimes one way is easier than the other.
In general, ifmis a positive integer and ifM(m)(t)meansthemth derivative of
M(t), we have, by repeated differentiation with respect tot,
M(m)(0) =E(Xm).Now
E(Xm)=∫∞−∞xmf(x)dx or∑xxmp(x),and the integrals (or sums) of this sort are, in mechanics, calledmoments.Since
M(t) generates the values ofE(Xm),m=1, 2 , 3 ,...,it is called the moment-
generating function (mgf). In fact, we sometimes callE(Xm)themth momentof
the distribution, or themth moment ofX.
The next two examples concern random variables whose distributions do not
have mgfs.