Why Shifts and Scales Matter
A random variable may be recorded in a new unit, centered by subtracting a constant, or adjusted by adding a fixed amount. These are all affine transformations: a new variable of the form \(Y=aX+b\). Knowing the MGF of \(X\) lets us find the MGF of \(Y\) directly, without first deriving a new probability function. The transformation also gives a quick route to the mean and variance, provided the MGF exists near zero.
The essential detail is that the scale factor \(a\) multiplies the argument of the original MGF. The shift \(b\), by contrast, contributes an exponential factor outside it. Keeping those roles separate prevents a common substitution error.
Why the Affine-Transformation Formula Holds
Use the definition of an MGF and substitute \(Y=aX+b\) inside the exponential. The factor involving \(b\) is constant with respect to \(X\), so it can be taken outside the expectation.
This derivation also explains the domain condition. If \(a\ne 0\), the transformed MGF is finite at \(t\) exactly when \(M_X(at)\) is finite. Thus, if the domain of \(M_X\) is \(D_X\), the domain for \(M_Y\) is the set of \(t\) such that \(at\in D_X\). The factor \(e^{bt}\) is finite for every real \(t\), so the shift does not restrict the domain. When \(a=0\), \(Y\) is constant and its MGF is finite for all real \(t\).
Deriving the Mean and Variance from the Transformed MGF
The MGF derivative formulas give \(M_X'(0)=E[X]\) and \(M_X''(0)=E[X^2]\) when the MGF exists in an open interval around zero. Differentiate \(M_Y(t)=e^{bt}M_X(at)\) using the product and chain rules:
At \(t=0\), \(M_X(0)=1\), so \(M_Y'(0)=b+aE[X]\). Differentiating once more gives
Consequently, \(E[Y^2]=b^2+2abE[X]+a^2E[X^2]\). Subtract the square of \(E[Y]\) to obtain
The cancellation shows precisely why adding \(b\) has no effect on variance, while scaling by \(a\) multiplies variance by \(a^2\).
Applying the Rule to Common MGFs
The same transformation rule works with discrete or continuous variables. The base MGF and its domain must be stated before substitution.
| Base variable and MGF | Affine transformation | Transformed MGF |
|---|---|---|
| \(B\sim\operatorname{Bernoulli}(p)\), \(M_B(t)=1-p+pe^t\), all real \(t\) | \(Y=aB+b\) | \(e^{bt}(1-p+pe^{at})\), all real \(t\) |
| \(X\sim\operatorname{Exponential}(\lambda)\), rate \(\lambda>0\), \(M_X(t)=\lambda/(\lambda-t)\), \(t<\lambda\) | \(Y=aX+b,\ a>0\) | \(e^{bt}\lambda/(\lambda-at)\), \(t<\lambda/a\) |
| \(X\sim\operatorname{Exponential}(\lambda)\), rate \(\lambda>0\) | \(Y=aX+b,\ a<0\) | \(e^{bt}\lambda/(\lambda-at)\), \(t>\lambda/a\) |
| \(X\sim N(\mu,\sigma^2)\), \(M_X(t)=e^{\mu t+\sigma^2t^2/2}\), all real \(t\) | \(Y=aX+b\) | \(e^{(b+a\mu)t+a^2\sigma^2t^2/2}\), all real \(t\) |
For the exponential rows, the sign of \(a\) determines which side of the domain boundary is allowed. The condition is always \(\lambda-at>0\). For example, if \(a<0\), dividing that inequality by \(a\) reverses its direction, giving \(t>\lambda/a\). These domains include zero, as required for an MGF.
Worked Example: An Affine Transformation of a Bernoulli Variable
Let \(B\sim\operatorname{Bernoulli}(0.25)\), so \(P(B=1)=0.25\) and \(P(B=0)=0.75\). Define the hypothetical score \(Y=80+400B\), measured in points. Find its MGF, mean, and variance.
Method. Apply the affine-transformation formula to the Bernoulli MGF \(M_B(t)=0.75+0.25e^t\), which is finite for every real \(t\). Here \(a=400\) and \(b=80\), so
The possible scores are \(80\) when \(B=0\) and \(480\) when \(B=1\). The mean and variance are
As a check from the MGF, \(M_Y'(0)=80+400(0.25)=180\). Its second derivative at zero is \(E[Y^2]=0.75(80^2)+0.25(480^2)=4{,}800+57{,}600=62{,}400\), so the variance is \(62{,}400-180^2=30{,}000\).
Common mistake avoided: Substituting \(t+400\) into \(M_B\) would not represent the scale \(400B\). The correct substitution is \(400t\); the separate shift contributes \(e^{80t}\).
Worked Example: A Reflected and Shifted Exponential Variable
Let \(X\sim\operatorname{Exponential}(4)\), with rate \(\lambda=4\) per unit of measurement. Thus \(M_X(t)=4/(4-t)\) for \(t<4\), \(E[X]=1/4\), and \(\operatorname{Var}(X)=1/16\). Define \(Y=5-2X\). Find its MGF and its first two moments.
Method. This is an affine transformation with \(a=-2\), \(b=5\). Substitute \(-2t\) for the original MGF argument:
For the domain, require the original argument \(-2t\) to be less than \(4\). Therefore \(-2t<4\), which gives \(t>-2\). The MGF is finite on \((-2,\infty)\), including zero.
The mean and variance follow from the affine moment formulas:
As a derivative check, write \(M_Y(t)=e^{5t}(1+t/2)^{-1}\). At zero, the second factor has value \(1\), first derivative \(-1/2\), and second derivative \(1/2\). Hence \(M_Y'(0)=5-1/2=4.5\), and \(M_Y''(0)=25+2(5)(-1/2)+1/2=20.5\). Thus \(\operatorname{Var}(Y)=20.5-(4.5)^2=0.25\).
Common mistake avoided: Reversing the domain inequality incorrectly would give \(t<-2\), which excludes zero. Starting with \(-2t<4\) and dividing by the negative scale factor reverses the inequality, so the correct condition is \(t>-2\).
Worked Example: Shifting and Scaling a Normal Variable
Let \(X\sim N(12,9)\), so its mean is \(12\), its variance is \(9\), and \(M_X(t)=e^{12t+9t^2/2}\) for every real \(t\). Set \(Y=2X-3\). Find the transformed MGF, mean, and variance.
Method. Substitute \(2t\) into the MGF and multiply by the factor for the shift \(b=-3\):
The linear coefficient is \(2(12)-3=21\), and the quadratic coefficient is \(2^2(9)/2=18\). Therefore \(E[Y]=21\) and \(\operatorname{Var}(Y)=2^2(9)=36\). In the normal MGF form \(e^{\mu_Yt+\sigma_Y^2t^2/2}\), the exponent is \(21t+36t^2/2\), which checks both moments. The domain remains all real numbers because the original normal MGF is finite for all real arguments.
Common mistake avoided: Scaling the variance by \(2\) would give \(18\), which is incorrect. A scale of \(2\) multiplies the variance by \(2^2=4\), giving \(36\).
Common Errors and a Reliable Process
Affine MGF problems are short, but several errors can alter the result even when the algebra is otherwise correct. Use this sequence to keep the transformation and its domain straight.
Write the distribution, parameters, base MGF, and the base MGF's domain.
Match the new variable to \(Y=aX+b\), keeping the scale \(a\) and shift \(b\) distinct.
Use \(e^{bt}M_X(at)\), not \(e^{at}M_X(bt)\).
Impose the original domain condition on \(at\); if dividing an inequality by a negative \(a\), reverse its direction.
Use \(E[Y]=aE[X]+b\) and \(\operatorname{Var}(Y)=a^2\operatorname{Var}(X)\), then compare with derivatives if useful.
A shift changes the location of all possible values, but it does not change their spread. A negative scale reflects the variable around the shift, so its mean changes according to the signed \(a\), while its variance still uses \(a^2\). For an exponential variable, a negative scale also changes which side of the MGF domain boundary is allowed. These distinctions make affine transformations useful both for calculation and for checking whether a proposed MGF is plausible.
Check Your Understanding
For each problem, find the requested MGF and moments, and state the MGF domain where requested.
- Let \(B\sim\operatorname{Bernoulli}(0.30)\) and \(W=50+200B\). Find \(M_W(t)\), \(E[W]\), and \(\operatorname{Var}(W)\). (Answer: \(M_W(t)=e^{50t}(0.70+0.30e^{200t})\), all real \(t\); \(E[W]=110\), \(\operatorname{Var}(W)=8{,}400\).)
- Let \(X\sim\operatorname{Exponential}(5)\) with rate \(5\), and let \(U=4X-2\). Find its MGF and domain, mean, and variance. (Answer: \(M_U(t)=e^{-2t}5/(5-4t)\), \(t<1.25\); \(E[U]=-1.2\), \(\operatorname{Var}(U)=0.64\).)
- Let \(X\sim N(-2,16)\) and \(V=3-X\). Find \(M_V(t)\), \(E[V]\), and \(\operatorname{Var}(V)\). (Answer: \(M_V(t)=e^{5t+8t^2}\), all real \(t\); \(E[V]=5\), \(\operatorname{Var}(V)=16\).)
- Let \(X\sim\operatorname{Exponential}(3)\) with rate \(3\), and set \(Y=2-3X\). Find the MGF domain and the mean and variance. Explain why the domain inequality points in that direction. (Answer: \(M_Y(t)=e^{2t}/(1+t)\), \(t>-1\); \(E[Y]=1\), \(\operatorname{Var}(Y)=1\). The base condition is \(-3t<3\); division by \(-3\) reverses the inequality.)
- Let \(B\sim\operatorname{Bernoulli}(0.40)\) and \(Z=10-5B\). Find \(M_Z(t)\), \(E[Z]\), and \(\operatorname{Var}(Z)\), and verify the mean from the two possible values. (Answer: \(M_Z(t)=e^{10t}(0.60+0.40e^{-5t})\), all real \(t\); \(E[Z]=8\), \(\operatorname{Var}(Z)=6\). The values are \(10\) with probability \(0.60\) and \(5\) with probability \(0.40\), giving mean \(0.60(10)+0.40(5)=8\).)