Why Coefficients Matter in Sums
A sum such as \(X+Y\) gives equal weight to both variables. In many applications, however, the quantities being combined have different units or importance. A portfolio total might be \(3X+Y\), while a net amount might be \(X-2Y\). To find the distribution of such a total, it is not enough to find the distribution of \(X+Y\) and then multiply the answer by a coefficient: each component is scaled separately, and its support and probabilities change.
This tutorial develops a consistent approach for weighted sums of independent random variables. The key steps are to transform each variable, track its support, and then combine the transformed variables. Moment generating functions provide a compact alternative when they exist.
Scale Each Variable Before Combining It
For a nonzero coefficient \(a\), the transformation \(Z=aX\) changes values in the support of \(X\) to values multiplied by \(a\). If \(X\) is discrete, each probability stays attached to its transformed value; if different original values map to the same value, their probabilities must be added. If \(X\) has density \(f_X\), the density transformation includes a factor \(1/|a|\). The absolute value matters, especially for negative coefficients.
Once the components have been scaled, independence allows their moment generating functions to be multiplied. Alternatively, their distributions can be combined by the discrete or continuous convolution formula. The support of the final sum is contained in the set of sums of possible component values. For continuous variables, it is contained between the sums of the lower endpoints and the sums of the upper endpoints when those endpoints are finite.
Why the Product Formula Holds
The moment generating function of a random variable \(W\) is \(M_W(t)=E[e^{tW}]\), for values of \(t\) where the expectation is finite. For the weighted sum, the exponential separates into a product:
Because the variables are independent, the expectation of this product is the product of the expectations. Taking the constant \(e^{tc}\) outside the expectation gives
This also explains why the argument of each component’s MGF is \(a_jt\), not \(t\). The formula requires independence and finiteness of the component MGFs at the indicated arguments. If the variables are not independent, the product step is not justified; the formula cannot be used merely because each marginal MGF is known.
Worked Examples
Worked Example: A Discrete Difference With Unequal Supports
Let independent random variables \(X\) and \(Y\) have \(P(X=0)=0.7\), \(P(X=1)=0.3\), \(P(Y=1)=0.6\), and \(P(Y=4)=0.4\). Find the distribution, mean, and MGF of \(W=X-2Y\). Method: enumerate the independent outcomes and multiply their probabilities. This avoids losing or mis-scaling support values when the coefficient is negative.
The four possible pairs \((X,Y)\) have probabilities found by independence. Their corresponding values of \(W\) are:
Thus \(W\) has values \(-8,-7,-2,-1\), with respective probabilities \(0.28,0.12,0.42,0.18\). The probabilities sum to \(0.28+0.12+0.42+0.18=1\), as required. Its mean is
As a check, \(E[X]=0(0.7)+1(0.3)=0.3\) and \(E[Y]=1(0.6)+4(0.4)=2.2\), so \(E[X-2Y]=0.3-2(2.2)=-4.1\). The MGFs are \(M_X(t)=0.7+0.3e^t\) and \(M_Y(t)=0.6e^t+0.4e^{4t}\). Therefore
Expanding gives \(M_W(t)=0.42e^{-2t}+0.28e^{-8t}+0.18e^{-t}+0.12e^{-7t}\), which matches the enumerated distribution. A common mistake is to use \(M_Y(2t)\) rather than \(M_Y(-2t)\); the negative coefficient reverses the sign of the MGF argument.
Worked Example: A Weighted Sum of Exponential Variables
Suppose \(X\) and \(Y\) are independent, with \(X\) exponential of rate \(4\) and \(Y\) exponential of rate \(1\). Find the density, MGF, and probability \(P(2X+Y\leq 1)\). Rates are per unit of the same time scale, and both variables are nonnegative. Method: scale \(X\), then convolve the two resulting densities. This avoids treating the rate of \(2X\) as twice the original rate.
Set \(U=2X\). Since \(f_X(x)=4e^{-4x}\) for \(x\geq0\), the scaling rule gives
Thus \(U\) is exponential with rate \(2\), while \(Y\) has density \(e^{-y}\) for \(y\geq0\). For \(W=U+Y\), independence and continuous convolution give, for \(w\geq0\),
The support is \(w\geq0\), since both summands are nonnegative. The density is nonnegative there because \(e^{-w}\geq e^{-2w}\). Integrating the density from \(0\) to \(w\) gives \(F_W(w)=1-2e^{-w}+e^{-2w}\) for \(w\geq0\). Therefore
For the MGF, \(M_X(t)=4/(4-t)\) for \(t<4\) and \(M_Y(t)=1/(1-t)\) for \(t<1\). Hence
The restriction \(t<1\) is the intersection of the component restrictions \(2t<4\) and \(t<1\). As a check, \(E[W]=2E[X]+E[Y]=2(1/4)+1=1.5\). The common scaling error is to assign \(2X\) rate \(8\); multiplying an exponential variable by \(2\) divides its rate by \(2\), giving rate \(2\).
Worked Example: Two Scaled Uniform Variables
Let \(X\sim\operatorname{Uniform}(0,2)\) and \(Y\sim\operatorname{Uniform}(0,1)\) be independent. Find the density and MGF of \(W=X+2Y\), and calculate \(P(W\leq3)\). Method: identify the transformed supports and convolve the densities. This avoids adding the original supports without accounting for the coefficient on \(Y\).
The density of \(X\) is \(1/2\) on \([0,2]\). The variable \(V=2Y\) is uniform on \([0,2]\), with density \(f_V(v)=\frac12 f_Y(v/2)=1/2\) on that interval. Thus \(W=X+V\) has support \([0,4]\). For a fixed \(w\), the convolution integrates over values of \(x\) that satisfy both \(0\leq x\leq2\) and \(0\leq w-x\leq2\). The length of this interval is \(w\) for \(0\leq w\leq2\), and \(4-w\) for \(2\leq w\leq4\). The product of the two densities is \(1/4\), so
The density integrates to \(1\): each triangular half has area \(\frac12(2)(1/2)=1/2\). For \(P(W\leq3)\), it is convenient to subtract the upper tail. On \([3,4]\), the density is \((4-w)/4\), so
For \(X\sim\operatorname{Uniform}(0,2)\), \(M_X(t)=(e^{2t}-1)/(2t)\), with limiting value \(1\) at \(t=0\). Since \(2Y\) has the same uniform distribution as \(X\), independence gives
with the value at \(t=0\) defined by continuity. As a check, \(E[W]=1+2(1/2)=2\), the center of the triangular density, and its support endpoints are \(0\) and \(4\). A common mistake is to use the support \([0,3]\), obtained by adding the original endpoints \(2+1\); the scaled variable \(2Y\) has upper endpoint \(2\), so the correct total upper endpoint is \(4\).
A Reliable Calculation Sequence
For a weighted sum, a short sequence of checks prevents most errors. In particular, keep the transformation of each component separate from the later combination of those components.
Record the exact coefficients and any constant, for example \(W=c+aX+bY\). Confirm that the variables are independent before using product MGFs or independent convolution.
Multiply each possible value or support endpoint by its coefficient. Reverse the endpoint order for a negative coefficient; treat a zero coefficient as a constant zero.
For a manageable discrete model, enumerate outcomes and combine probabilities at matching values. For continuous variables, use scaled densities and convolution. When available, multiply \(M_{X_j}(a_jt)\).
Verify that probabilities sum to one or a density integrates to one, compare the mean with \(c+\sum a_jE[X_j]\), and confirm that the answer respects the transformed support.
Common Exam Traps and Why the Method Matters
- Forgetting the coefficient inside the MGF. For \(aX\), the MGF is \(M_X(at)\), not \(aM_X(t)\). A constant multiplier of a random variable changes its distribution, not just the numerical value of its MGF.
- Dropping the absolute value in a density transformation. The density multiplier is \(1/|a|\), ensuring the transformed density has total area one even when \(a<0\).
- Keeping the original support after scaling. A negative coefficient can make values negative and reverses support order; a positive coefficient can stretch or shrink the support.
- Multiplying MGFs without independence. The product formula follows from independence. Marginal distributions alone do not justify it for dependent variables.
- Checking only the mean. A correct mean does not establish a correct distribution. Check support and total probability as well.
Weighted sums appear whenever components are converted to a common total using fixed weights, including hypothetical insurance portfolios with different benefit amounts or measurements combined in different units. The method is valuable because it separates two tasks: first determine what each coefficient does to its variable, then combine the transformed variables under the stated independence assumption. That separation also makes it easier to detect a wrong sign, rate, or endpoint before it contaminates the final result.
Check Your Understanding
For each problem, state the support or distribution as requested and use independence only where it is given.
- Independent Bernoulli variables \(X,Y\) satisfy \(P(X=1)=0.25\) and \(P(Y=1)=0.5\). Find the distribution and mean of \(W=3X-2Y\). (Answer: \(P(W=0)=0.375,\ P(W=-2)=0.375,\ P(W=3)=0.125,\ P(W=1)=0.125;\ E[W]=-0.25\).)
- Let \(X\sim\operatorname{Uniform}(0,1)\) and \(W=-4X\). State the support and density of \(W\), then find \(P(W<-1)\). (Answer: support \([-4,0]\), density \(1/4\) on that interval, and probability \(0.7500\).)
- Independent \(X\sim\operatorname{Poisson}(2)\) and \(Y\sim\operatorname{Poisson}(1)\) define \(W=2X+Y\). Find its MGF and mean. (Answer: \(M_W(t)=\exp(2(e^{2t}-1)+(e^t-1))\); \(E[W]=5\).)
- Independent \(X\) and \(Y\) are exponential with rates \(3\) and \(2\), respectively. For \(Z=2X+Y\), give the MGF, its interval of finiteness containing zero, and the mean. (Answer: \(M_Z(t)=\frac{3/2}{3/2-t}\frac{2}{2-t}\), finite for \(t<3/2\); \(E[Z]=7/6\).)
- Independent \(X\sim N(1,4)\) and \(Y\sim N(0,1)\) define \(W=-2X+3Y\). Find the distribution, using the convention that the second normal parameter is the variance. (Answer: \(W\sim N(-2,25)\).)