# 7.1: Sums of Discrete Random Variables

In this chapter we turn to the important question of determining the distribution of a sum of independent random variables in terms of the distributions of the individual constituents. In this section we consider only sums of discrete random variables, reserving the case of continuous random variables for the next section.

We consider here only random variables whose values are integers. Their distribution functions are then defined on these integers. We shall find it convenient to assume here that these distribution functions are defined for all integers, by defining them to be 0 where they are not otherwise defined.

###### Convolutions

Suppose and Y are two independent discrete random variables with distribution functions m1(x) and m2(x). Let Z = X + Y. We would like to determine the distribution function m3(x) of Z. To do this, it is enough to determine the probability that Z takes on the value z, where z is an arbitrary integer. Suppose that X = k, where k is some integer. Then Z = z if and only if Y = z − k. So the event Z = z is the union of the pairwise disjoint events.

$(X=k) \text{ and } (Y= z - k)$

where k runs over the integers. Since these events are pairwise disjoint, we have

$P(Z=z) = \sum_{k=-\infty}^\infty P(X=k) \cdot P(Y=z-k)$

Thus, we have found the distribution function of the random variable Z. This leads to the following definition.

Definition

Let X and Y be two independent integer-valued random variables, with distribution functions m1(x) and m2(x) respectively. Then the convolution of $$m_1(x)$$ and $$m_2(x)$$ is the distribution function $$m_3 = m_1 * m_2$$ given by

$m_3(j) = \sum_k m_1(k) \cdot m_2(j-k)$,

for j = . . . , −2, −1, 0, 1, 2, . . .. The function m3(x) is the distribution function of the random variable Z = X + Y.

It is easy to see that the convolution operation is commutative, and it is straightforward to show that it is also associative.

Now let $$S_n = X_1 + X_2 + . . . + X_n$$ be the sum of n independent random variables of an independent trials process with common distribution function m defined on the integers. Then the distribution function of S1 is m. We can write

$S_n = S_{n-1} + X_n \) Thus, since we know the distribution function of $$X_n$$ is m, we can find the distribution function of $$S_n$$ by induction. ###### Example 7.1 A die is rolled twice. Let $$X_1$$ and $$X_2$$ be the outcomes, and let $$S_2 = X_1 + X_2$$ be the sum of these outcomes. The $$X_1$$ and $$X_2$$ have the common distribution function: \[ m = \bigg( \begin{array}{}1 & 2 & 3 & 4 & 5 & 6 \\ 1/6 & 1/6 & 1/6 & 1/6 & 1/6 & 1/6 \end{array} \bigg)$.

The distribution function of $$S_2$$ is then the convolution of this distribution with itself. Thus,

$\begin{array}{} P(S_2 =2) & = & m(1)m(1) \\ & = & \frac{1}{6}\cdot\frac{1}{6} = \frac{1}{36} \\ P(S_2 =3) & = & m(1)m(2) + m(2)m(1) \\ & = & \frac{1}{6}\cdot\frac{1}{6} + \frac{1}{6}\cdot\frac{1}{6} = \frac{2}{36} \\ P(S_2 =4) & = & m(1)m(3) + m(2)m(2) + m(3)m(1) \\ & = & \frac{1}{6}\cdot\frac{1}{6} + \frac{1}{6}\cdot\frac{1}{6} + \frac{1}{6}\cdot\frac{1}{6} = \frac{3}{36}\end{array}$

Continuing in this way we would find $$P(S_2 = 5) = 4/36, P(S_2 = 6) = 5/36, P(S_2 = 7) = 6/36, P(S_2 = 8) = 5/36, P(S_2 = 9) = 4/36, P(S_2 = 10) = 3/36, P(S_2 = 11) = 2/36,$$ and $$P(S_2 = 12) = 1/36$$. The distribution for S3 would then be the convolution of the distribution for $$S_2$$ with the distribution for $$X_3$$. Thus $$P(S_3 = 3) = P(S_2 = 2)P(X_3 = 1)$$.

and so forth.

This is clearly a tedious job, and a program should be written to carry out this calculation. To do this we first write a program to form the convolution of two densities p and q and return the density r. We can then write a program to find the density for the sum Sn of n independent random variables with a common density p, at least in the case that the random variables have a finite number of possible values.

Running this program for the example of rolling a die n times for n = 10, 20, 30 results in the distributions shown in Figure 7.1. We see that, as in the case of Bernoulli trials, the distributions become bell-shaped. We shall discuss in Chapter 9 a very general theorem called the Central Limit Theorem that will explain this phenomenon.

###### Example 7.2

A well-known method for evaluating a bridge hand is: an ace is assigned a value of 4, a king 3, a queen 2, and a jack 1. All other cards are assigned a value of 0. The point count of the hand is then the sum of the values of the cards in the hand. (It is actually more complicated than this, taking into account voids in suits, and so forth, but we consider here this simplified form of the point count.) If a card is dealt at random to a player, then the point count for this card has distribution

$p_x = \bigg( \begin{array}{} 0&1 & 2 & 3 & 4 \\ 36/52 & 4/52 & 4/52 & 4/52 & 4/52 \end{array} \bigg)$.

Let us regard the total hand of 13 cards as 13 independent trials with this common distribution. (Again this is not quite correct because we assume here that we are always choosing a card from a full deck.) Then the distribution for the point count C for the hand can be found from the program NFoldConvolution by using the distribution for a single card and choosing n = 13. A player with a point count of 13 or more is said to have an opening bid. The probability of having an opening bid is then

$P(C \geq 13)$.

Since we have the distribution of C, it is easy to compute this probability. Doing this we find that

$P(C \geq 13) = .2485,$

so that about one in four hands should be an opening bid according to this simplified model. A more realistic discussion of this problem can be found in Epstein, The Theory of Gambling and Statistical Logic.$$^1$$

For certain special distributions it is possible to find an expression for the distribution that results from convoluting the distribution with itself n times. The convolution of two binomial distributions, one with parameters m and p and the other with parameters n and p, is a binomial distribution with parameters $$(m + n)$$ and $$p$$. This fact follows easily from a consideration of the experiment which consists of first tossing a coin m times, and then tossing it n more times.

The convolution of k geometric distributions with common parameter p is a negative binomial distribution with parameters p and k. This can be seen by considering the experiment which consists of tossing a coin until the kth head appears.

##### Exercises
###### $$\PageIndex{1}$$

A die is rolled three times. Find the probability that the sum of the outcomes is (a) greater than 9 (b) an odd number.

###### $$\PageIndex{2}$$

The price of a stock on a given trading day changes according to the distribution

$p_X = \bigg( \begin{array}{} -1 & 0 & 1 & 2 \\ 1/4 & 1/2 & 1/8 & 1/8 \end{array} \bigg)$.

Find the distribution for change in stock price after two (independent) trading days.

###### $$\PageIndex{3}$$

Let $$X_1$$ and $$X_2$$ be independent random variables with common distribution

$p_X = \bigg( \begin{array}{} 0 & 1 & 2 \\ 1/2 & 3/8 & 1/2 \end{array} \bigg)$.

Find the distribution of the sum $$X_1$$ + $$X_2$$.

###### $$\PageIndex{4}$$

In one play of certain game you win an amount with distribution

$p_X = \bigg( \begin{array}{} 1 & 2 & 3 \\ 1/4 & 1/4 & 1/2 \end{array} \bigg)$.

Using the program NFoldConvolution find the distribution for your total winnings after ten (independent) plays. Plot this distribution.

###### $$\PageIndex{5}$$

Consider the following two experiments: the first has outcome X taking on the values 0, 1, and 2 with equal probabilities; the second results in an (independent) outcome Y taking on the value 3 with probability 1/4 and 4 with probability 3/4. Find the distribution of

$\begin{array}{} (a) & Y+X \\ (b) & Y-X \end{array}$

###### $$\PageIndex{6}$$

People arrive at a queue according to the following scheme: During each minute of time either 0 or 1 person arrives. The probability that 1 person arrives is p and that no person arrives is $$q = 1 − p$$. Let $$C_r$$ be the number of customers arriving in the first r minutes. Consider a Bernoulli trials process with a success if a person arrives in a unit time and failure if no person arrives in a unit time. Let $$T_r$$ be the number of failures before the rth success.

$\begin{array}{} (a) & What is the distribution for $$T_r$$ \\ (b) & What is the distribution $$C_r$$ \\ (c) Find the mean and variance for the number of customers arriving in the first r minutes \end{array}$

###### $$\PageIndex{7}$$

(a) A die is rolled three times with outcomes $$X_1, X_2$$ and $$X_3$$. Let $$Y_3$$ be the maximum value obtained. Show that

$P(Y_3 \leq j) = P(X_1 \leq j)^3$

Use this find the distribution of $$Y_3$$. Does $$Y_3$$ have a bell-shaped distribution?

(b) Now let $$Y_n$$ be the maximum value when dice are rolled. Find the distribution of $$Y_n$$. Is this distribution bell-shaped for large values of n?

###### $$\PageIndex{8}$$

A baseball player is to play in the World Series. Based upon his season play, you estimate that if he comes to bat four times in a game the number of hits he will get has a distribution

$p_X = \bigg( \begin{array}{} 0&1&2&3&4\\.4&.2&.2&.1&.1 \end{array} \bigg)$

Assume that the player comes to bat four times in each game of the series.

(a) Let X denote the number of hits that he gets in a series. Using the program NFoldConvolution, find the distribution of X for each of the possible series lengths: four-game, five-game, six-game, seven-game.

(b) Using one of the distribution found in part (a), find the probability that his batting average exceeds .400 in a four-game series. (The batting average is the number of hits divided by the number of times at bat.)

(c) Given the distribution pX , what is his long-term batting average?

###### $$\PageIndex{9}$$

Prove that you cannot load two dice in such a way that the probabilities for any sum from 2 to 12 are the same. (Be sure to consider the case where one or more sides turn up with probability zero.)

###### $$\PageIndex{10}$$

(Lévy$$^2$$ ) Assume that n is an integer, not prime. Show that you can find two distributions a and b on the nonnegative integers such that the convolution of a and b is the equiprobable distribution on the set 0, 1, 2, . . . , n − 1. If n is prime this is not possible, but the proof is not so easy. (Assume that neither a nor b is concentrated at 0.)

###### $$\PageIndex{11}$$

Assume that you are playing craps with dice that are loaded in the following way: faces two, three, four, and five all come up with the same probability (1/6) + r. Faces one and six come up with probability (1/6) − 2r, with $$0 < r < .02.$$ Write a computer program to find the probability of winning at craps with these dice, and using your program find which values of r make craps a favorable game for the player with these dice.