Tutorials › VEE Mathematical Statistics › Sums of Dependent Variables

VEE Mathematical Statistics · Sums and Linear Combinations · Tutorial 341 of 880

Sums of Dependent Variables

Use the joint distribution—not an independence assumption—to calculate probabilities, moments, and densities for sums of dependent random variables.

Intermediate 11 min read

What You'll Learn

  • Calculate a discrete sum distribution by adding joint probabilities along diagonals.
  • Find probabilities for a sum directly from a joint probability function.
  • Derive a continuous sum density using a change of variables and the joint support.
  • Identify when the independent convolution formula is invalid.
  • Check a sum distribution using its total probability and moments.

Why Dependence Changes a Sum Distribution

When two random variables are independent, their sum distribution can be calculated by combining their separate distributions. When they are dependent, those separate distributions do not tell us how often particular pairs occur together. To find the distribution of the sum, we need the joint distribution of the variables.

This distinction matters in actuarial models whenever outcomes share a cause, such as two hypothetical insurance losses affected by the same weather event. If the losses are dependent, a calculation that treats them as independent may assign incorrect probabilities to the total loss—even when the individual loss distributions are known correctly.

Definition: For random variables \(X\) and \(Y\), their sum is \(S=X+Y\). A joint probability function \(p_{X,Y}(x,y)=P(X=x,Y=y)\) gives the probability of each pair in the discrete case. A joint density \(f_{X,Y}(x,y)\) describes their probabilities over regions in the continuous case. The distribution of \(S\) is found by combining the joint probabilities or density over all pairs satisfying \(x+y=s\), with the relevant support restrictions.

Discrete Sums: Add Probabilities Along Diagonals

Suppose \(X\) and \(Y\) are discrete random variables with a joint probability function. For any value \(s\), the event \(S=s\) consists of all possible pairs \((x,y)\) for which \(x+y=s\). These pairs are mutually exclusive, so their joint probabilities add:

$$ P(S=s)=\sum_x P(X=x,Y=s-x), $$

where the sum includes only values for which \((x,s-x)\) is in the joint support. In a table of joint probabilities, each value of \(s\) corresponds to a diagonal running through cells with the same value of \(x+y\). Add the cells on that diagonal; do not multiply marginal probabilities unless independence is established.

Worked Example: Finding a Sum Distribution From a Joint Table

A hypothetical insurer records two discrete claim indicators, \(X\) and \(Y\), for a paired policy group. Their joint probability function is given below. Find the distribution of \(S=X+Y\), then calculate its mean and variance.

\(X\backslash Y\)012
00.100.200.10
10.050.200.15
20.050.050.10

Method. Group the joint probabilities by \(x+y\). The table entries sum to \(0.40+0.40+0.20=1.00\), as required for a joint probability function.

For \(S=0\), only \((X,Y)=(0,0)\) contributes, so \(P(S=0)=0.10\). For \(S=1\), the contributing pairs are \((0,1)\) and \((1,0)\), giving \(0.20+0.05=0.25\). For \(S=2\), use \((0,2),(1,1),(2,0)\), giving \(0.10+0.20+0.05=0.35\). For \(S=3\), use \((1,2),(2,1)\), giving \(0.15+0.05=0.20\). Finally, \(P(S=4)=P(X=2,Y=2)=0.10\).

$$ \begin{array}{c|ccccc} s&0&1&2&3&4\\ \hline P(S=s)&0.10&0.25&0.35&0.20&0.10 \end{array} $$

The probabilities total \(0.10+0.25+0.35+0.20+0.10=1.00\). The mean is

$$ E[S]=0(0.10)+1(0.25)+2(0.35)+3(0.20)+4(0.10)=1.95. $$

For the second moment, \(E[S^2]=0^2(0.10)+1^2(0.25)+2^2(0.35)+3^2(0.20)+4^2(0.10)=0+0.25+1.40+1.80+1.60=5.05\). Therefore,

$$ \operatorname{Var}(S)=E[S^2]-(E[S])^2 =5.05-(1.95)^2 =5.05-3.8025 =1.2475. $$

Check and common mistake. The probabilities sum to one, and the mean also agrees with \(E[X]+E[Y]\): the marginals give \(E[X]=0.8\) and \(E[Y]=1.15\), so their sum is \(1.95\). The mistake to avoid is multiplying marginal probabilities as though the variables were independent; for example, the actual \(P(X=0,Y=0)=0.10\), not \(P(X=0)P(Y=0)=0.40(0.20)=0.08\).

Why Independent Convolution Does Not Apply

For any pair of discrete random variables, the sum formula uses the joint probability \(P(X=x,Y=s-x)\). Independence would allow that joint probability to be replaced by \(P(X=x)P(Y=s-x)\), but only if \(X\) and \(Y\) are independent. Thus the familiar independent convolution formula is a special case of the joint-probability calculation, not a general formula for dependent variables.

Key condition: If \(X\) and \(Y\) are independent, then \(P(X=x,Y=y)=P(X=x)P(Y=y)\) for every pair in their support, and the sum formula reduces to \(P(S=s)=\sum_x P(X=x)P(Y=s-x)\). Without independence, retain the joint probabilities.

Here is a short justification. The event \(S=s\) can be written as the union of events \(\{X=x,Y=s-x\}\) over the possible \(x\). Different values of \(x\) give disjoint events, so additivity of probability gives the joint-probability sum. If independence holds, each term factors into the product of marginal probabilities. If it does not, that factorization has no justification.

Worked Example: A Dependent Pair of Claim Indicators

In a hypothetical paired-policy model, \(X\) and \(Y\) are each indicators of whether a claim occurs during a specified year. Their joint probabilities are \(P(X=0,Y=0)=0.40\), \(P(X=0,Y=1)=0.10\), \(P(X=1,Y=0)=0.10\), and \(P(X=1,Y=1)=0.40\). Find the distribution and variance of the total number of claims \(S=X+Y\), and compare with the result from an incorrect independence assumption.

Method. Add the joint probabilities for each possible total. The event \(S=0\) occurs only at \((0,0)\), so its probability is \(0.40\). The event \(S=1\) occurs at \((0,1)\) or \((1,0)\), so its probability is \(0.10+0.10=0.20\). The event \(S=2\) occurs only at \((1,1)\), so its probability is \(0.40\). These probabilities sum to one.

$$ P(S=0)=0.40,\qquad P(S=1)=0.20,\qquad P(S=2)=0.40. $$

The expected total is \(E[S]=0(0.40)+1(0.20)+2(0.40)=1.00\). Also, \(E[S^2]=0^2(0.40)+1^2(0.20)+2^2(0.40)=0.20+1.60=1.80\). Hence

$$ \operatorname{Var}(S)=1.80-(1.00)^2=0.80. $$

Both indicators have marginal probability \(0.50\) of being one. If they were incorrectly treated as independent, the resulting sum probabilities would be \(0.25,0.50,0.25\), giving variance \(0.50\). That is not the specified joint model. In fact, \(P(X=1,Y=1)=0.40\), whereas independence would require \(0.50(0.50)=0.25\). The joint distribution therefore shows positive dependence, and the independent calculation understates the variance. The correction is to use the four given joint probabilities.

Continuous Sums: Use the Joint Density and Support

For continuous variables, the joint density must be combined over the line \(x+y=s\). A convenient change of variables is \(S=X+Y\) and \(U=X\), so that \(X=U\) and \(Y=S-U\). The absolute value of the Jacobian determinant for this transformation is \(1\). Therefore, when a joint density exists,

$$ f_S(s)=\int_{-\infty}^{\infty} f_{X,Y}(u,s-u)\,du, $$

where the integral is restricted to values of \(u\) for which \((u,s-u)\) lies in the joint support. Those limits can depend on \(s\); ignoring them is a frequent source of errors. The formula does not say that the density is a product of marginal densities. Such a product is valid only under independence.

Worked Example: Sum Density on a Triangular Support

Let \(X\) and \(Y\) have the joint density \(f_{X,Y}(x,y)=2\) on the triangular region \(0<y<x<1\), and zero elsewhere. Find the density of \(S=X+Y\), and check its total probability, mean, and variance.

Method. First verify the joint density: the region has area \(1/2\), so its integral is \(2(1/2)=1\). For a fixed \(s\), set \(y=s-x\). The support conditions \(0<s-x<x<1\) imply \(x>s/2\), \(x<s\), and \(x<1\). Thus the lower integration limit is \(s/2\), and the upper limit is \(\min(s,1)\). The possible sums range from 0 to 2.

For \(0<s<1\), the upper limit is \(s\), so

$$ f_S(s)=\int_{s/2}^{s}2\,dx=2(s-s/2)=s. $$

For \(1\leq s<2\), the upper limit is 1, so

$$ f_S(s)=\int_{s/2}^{1}2\,dx=2(1-s/2)=2-s. $$

The density is zero outside \(0<s<2\). Its total integral is \(\int_0^1 s\,ds+\int_1^2(2-s)\,ds=1/2+1/2=1\). Its mean is

$$ E[S]=\int_0^1 s^2\,ds+\int_1^2 s(2-s)\,ds =\frac{1}{3}+\left[s^2-\frac{s^3}{3}\right]_1^2 =\frac{1}{3}+\frac{2}{3}=1. $$

For the second moment,

$$ E[S^2]=\int_0^1 s^3\,ds+\int_1^2 s^2(2-s)\,ds =\frac{1}{4}+\left[\frac{2s^3}{3}-\frac{s^4}{4}\right]_1^2 =\frac{1}{4}+\frac{11}{12} =\frac{7}{6}. $$

Therefore \(\operatorname{Var}(S)=7/6-1^2=1/6\). The density and moments provide checks on one another: the density integrates to one, and its mean is consistent with \(E[X]+E[Y]\). The mistake to avoid is applying the independent density convolution. The given joint support is triangular, and the variables are not independent; the actual line integral must use the joint density and the support-derived limits.

Moments as Checks, Not as a Substitute for the Distribution

For any variables with finite means, \(E[X+Y]=E[X]+E[Y]\), whether or not the variables are independent. This identity is useful for checking a sum distribution. Variance behaves differently: dependence matters through covariance.

Theorem: If \(X\) and \(Y\) have finite variances, then $$ \operatorname{Var}(X+Y)=\operatorname{Var}(X)+\operatorname{Var}(Y)+2\operatorname{Cov}(X,Y). $$ The formula holds for dependent as well as independent variables. Under independence, \(\operatorname{Cov}(X,Y)=0\); otherwise, omitting the covariance term can give an incorrect variance.

The identity follows by writing \(E[S]=E[X]+E[Y]\) and expanding: \(\operatorname{Var}(S)=E[(X+Y-E[X]-E[Y])^2]\). Expanding the square gives the two individual squared deviations and twice their product. Taking expectations yields \(\operatorname{Var}(X)+\operatorname{Var}(Y)+2\operatorname{Cov}(X,Y)\). This checks a moment, but it does not by itself determine the full distribution of \(S\). Different joint distributions can have the same means and variances but different probabilities for particular sums.

A Reliable Calculation Sequence

1
Identify the joint model.
Write down the joint probability function or density and state the joint support. Do not infer independence from the fact that both marginals are known.
2
Set the sum condition.
For a discrete model, list the pairs with \(x+y=s\). For a continuous model, substitute \(y=s-x\) and impose every joint-support restriction.
3
Calculate and check.
Sum or integrate the joint probabilities or density. Check that the resulting distribution has total probability one and, when useful, compare its mean or variance with the moment identities.

The central exam trap is using an independent convolution formula because it is familiar, even when the problem supplies a joint table or a non-product joint density. The correct question is not whether a convolution-looking calculation is possible; it is whether its product of marginals is justified. When dependence is present, work directly from the joint model.

Check Your Understanding

For each problem, use the joint information provided and check any distribution by verifying that its probabilities total one.

  1. A joint probability function has \(P(X=0,Y=0)=0.20\), \(P(X=0,Y=1)=0.30\), \(P(X=1,Y=0)=0.10\), and \(P(X=1,Y=1)=0.40\). Find the distribution, mean, and variance of \(S=X+Y\). (Answer: \(P(S=0,1,2)=(0.20,0.40,0.40)\), \(E[S]=1.20\), \(\operatorname{Var}(S)=0.56\).)
  2. A joint table has rows \(X=0,1,2\) and columns \(Y=0,1\), with row entries \((0.10,0.20)\), \((0.15,0.25)\), and \((0.20,0.10)\), respectively. Find the distribution of \(S=X+Y\). (Answer: \(P(S=0,1,2,3)=(0.10,0.35,0.45,0.10)\).)
  3. For two dependent Bernoulli variables, let \(P(0,0)=0.30\), \(P(0,1)=0.20\), \(P(1,0)=0.20\), and \(P(1,1)=0.30\). Find \(P(S=s)\) and \(\operatorname{Var}(S)\); state what the independent model with the same marginals would predict. (Answer: \(P(S=0,1,2)=(0.30,0.40,0.30)\), \(\operatorname{Var}(S)=0.60\); independence would give \((0.25,0.50,0.25)\).)
  4. A joint density is \(f_{X,Y}(x,y)=2\) on \(0<x\), \(0<y\), \(x+y<1\), and zero elsewhere. Find the density and variance of \(S=X+Y\). (Answer: \(f_S(s)=2s\) for \(0<s<1\), zero otherwise; \(\operatorname{Var}(S)=1/18\).)
  5. Suppose \(E[X]=2\), \(E[Y]=3\), \(\operatorname{Var}(X)=1\), \(\operatorname{Var}(Y)=4\), and \(\operatorname{Cov}(X,Y)=-1.5\). Find the mean and variance of \(S=X+Y\), and say whether these quantities determine its full distribution. (Answer: \(E[S]=5\), \(\operatorname{Var}(S)=2\); they do not determine the full distribution.)
Clinical Biostats