ProbabilityJoint Distributions

Sums of Independent Variables

The distribution of X + Y comes from adding over every split: P(X + Y = s) = Σ P(X = k) P(Y = s − k), with an integral for densities.

Not started Jump to practice

If $X$ and $Y$ are independent, what is the distribution of $X + Y$? Not the sum of the two distributions: a total can be made in several ways, and we must add over all of them. This uses the independence of random variables and, for densities, integrating out a variable.

Key idea

For independent $X$ and $Y$: $$P(X + Y = s) = \sum_k P(X = k)\,P(Y = s - k), \qquad f_{X + Y}(s) = \int f_X(t)\,f_Y(s - t)\,dt.$$ This operation is called convolution.

Why it works

The event $X + Y = s$ splits by the value of $X$: $X = k$ and $Y = s - k$, for each $k$. These pieces are disjoint, so their probabilities add, and independence turns each piece into a product. For densities, the same splitting turns the sum into an integral: slide the flipped density $f_Y(s - t)$ across $f_X(t)$ and measure their overlap.
Two dice: the grid holds the products of the two pmfs, and the six highlighted cells add to the probability of a total of 7.
Two uniform densities on 0 to 1: the overlap of one with the other flipped and slid to s gives the density of the sum, a triangle.

Worked examples

Worked example: Two dice

Find $P(X + Y = 7)$ for two fair dice, and $P(X + Y = 5)$ for a four-sided die plus a six-sided die.
  1. Two dice: the splits $(1, 6), (2, 5), \ldots, (6, 1)$ each have probability $\frac{1}{36}$: total $\frac{6}{36} = \frac{1}{6}$.
  2. Four-sided and six-sided: the splits $(1, 4), (2, 3), (3, 2), (4, 1)$ each have probability $\frac{1}{24}$: total $\frac{4}{24} = \frac{1}{6}$.

Answer: $\frac{1}{6}$ in both cases.

Worked example: Two uniforms

$X$ and $Y$ are independent and uniform on $[0, 1]$. Find the density of $S = X + Y$.
  1. $f_S(s) = \int_{0}^{1} f_Y(s - t)\,dt$ is the length of $\{t \in [0, 1]: 0 \le s - t \le 1\}$.
  2. For $0 \le s \le 1$ that set is $[0, s]$: $f_S(s) = s$. For $1 \le s \le 2$ it is $[s - 1, 1]$: $f_S(s) = 2 - s$.
  3. A triangle peaking at $s = 1$: middle totals can be made in more ways.

Answer: $f_S(s) = s$ on $[0, 1]$ and $2 - s$ on $[1, 2]$.

Worked example: Two Poisson counts

$X$ and $Y$ are independent Poisson with means $\lambda$ and $\mu$. Show that $X + Y$ is Poisson with mean $\lambda + \mu$.
  1. $$P(X + Y = n) = \sum_{k = 0}^{n} e^{-\lambda}\frac{\lambda^{k}}{k!}e^{-\mu}\frac{\mu^{n - k}}{(n - k)!}$$
  2. $$= \frac{e^{-(\lambda + \mu)}}{n!}\sum_{k} \binom{n}{k}\lambda^{k}\mu^{n - k} = e^{-(\lambda + \mu)}\frac{(\lambda + \mu)^{n}}{n!}$$ by the binomial theorem.

Answer: Poisson with mean $\lambda + \mu$. (Similarly, binomials with the same $p$ add: $n_1 + n_2$ trials.)

Common mistake

Adding the pmfs or densities instead of convolving them. The "sum" of two uniform densities on $[0, 1]$ would have total area 2, and it would not say anything about totals between 1 and 2. Check: the result must add (or integrate) to 1, and its range must run from the smallest possible total to the largest.

Practice

Pass with 3 right answers, the last 2 in a row. Each right answer earns 3 XP.

Loading practice…

Builds on

Leads to

Sources and further reading

  • Grinstead and Snell, Introduction to Probability (2nd revised edition, American Mathematical Society; free from Dartmouth College), chapter 7 (Sums of Random Variables), sections 7.1 and 7.2
  • MIT OpenCourseWare 18.440, Probability and Random Variables (Spring 2014), lecture notes on sums of independent random variables
@teddyrookbook GitHub