Probability - University of Michigan



1.6 Sums and Other Functions of Random Variables

We have seen some examples of sums of random variables.

Example 1. We roll a die twice. Let X1 = result of first roll and X2 = result of second roll. Let T be the sum of the two rolls. Then T is the sum of X1 and X2, i.e. T = X1 + X2. In section 1.3 we found the probablility mass function of T.

Example 2. We flip a coin n times. Let Xk = 1 if the kth flip is a head and Xk = 0 it the kth flip is a tail. Let N = the number of heads in the n flips. Then N = X1 + ( + Xn. Recall from section 1.6 that N has a binomial distribution.

In general, we want to find the probablility mass function fS(s) of the sum S = X + Y of two random variables X and Y or S = X1 + ( + Xn of n random variables X1, …, Xn.

Consider the case S = X + Y and let (X = {x0, x1, …, xn} and (Y = {y0, y1, …, ym} be the set of values X and Y take on. Then (S = {s = x + y: x ( (X and y ( (Y} is the set of values S takes on. If s is one of these values then

(1) fS(s) = Pr{S = s} = = f(x, y)

where fX,Y(x, y) is the joint probability mass function of X and Y and in the sums we are summing over those pairs (x, y) where x ( (X and y ( (Y and x + y = s. We can write this as

(2) fS(s)  = f(x, s - x)  = f(xi, s – xi)

with the understanding that f(x, s - x) = 0 if the pair x is not in (X or s – x is not in (Y.

Example 3. Mary is making two investment, one the Angolian Oil Company and the other in Speedy Computer Corporation. Suppose

1. The profit X from the Angolian Oil investment will be either $0, $1000 or $2000

2. The profit Y from the Speedy Computer investment will be either $0, $1000 or $2000.

3. The joint probability mass function fX,Y(x, y) is given by the following table.

| |Y = 0 |Y = 1 |Y = 2 |

|X = 0 |f(0, 0) = 0.05 |f(0, 1) = 0.10 |f(0, 2) = 0.15 |

|X = 1 |f(1, 0) = 0.15 |f(1, 1) = 0.20 |f(1, 2) = 0.10 |

|X = 2 |f(2, 0) = 0.10 |f(2, 1) = 0.10 |f(2, 2) = 0.05 |

For simplicity we are measuring the values of X and Y in units of thousands of dollars so X = 1 or Y = 1 means $1000.

We want to find the probability mass function fS(s) of the sum S = X + Y of the profits from the two investments.

Solution. Here is the same table where we also include the value of S for each combination of values of X and Y.

| |Y = 0 |Y = 1 |Y = 2 |

|X = 0 |f(0, 0) = 0.05 |f(0, 1) = 0.10 |f(0, 2) = 0.15 |

| |S = 0 |S = 1000 |S = 2000 |

|X = 1 |f(1, 0) = 0.15 |f(1, 1) = 0.20 |f(1, 2) = 0.10 |

| |S = 1 |S = 2 |S = 3 |

|X = 2 |f(2, 0) = 0.10 |f(2, 1) = 0.10 |f(2, 2) = 0.05 |

| |S = 2 |S = 3 |S = 4 |

From the table we can find the pairs (x, y) that have given sums. One has

fS(0) = f(0, 0) = 0.05

fS(1) = f(0, 1) + f(1, 0) = 0.10 + 0.15 = 0.25

fS(2) = f(0, 2) + f(1, 1) + f(2, 0) = 0.15 + 0.20 + 0.10 = 0.45

fS(3) = f(1, 2) + f(2, 1) = 0.10 + 0.10 = 0.20

fS(4) = f(2, 2) = 0.05

Note that to compute fS(s) we are summing the diagonal of the above table where X + Y = s.

Finding the probability mass function for some other function of one or two random variables is similar to the sum. In the table for the joint probability mass function one simply replaces the values of the sum by the value of whatever function of the two random variables we are considering.

Problem 1. In Example 3, find the probability mass function of Z = X – Y.

Things are a little simpler in the case where X and Y are independent. Then f(x, y) = fX(x)fY(y) so (2) can be rewritten as

(3) fS(s)  = fX(xi)fY(s - xi)

A sum of this form is often called the convolution of the functions fX(x) and fY(y). If we let gs(y) = fY(s – y), then (3) can be written as

(4) fS(s)  = fX(xi)gs(xi) =

The term on the right is the inner product of two vectors. The first, fX, is the vector of fX(x) values in increasing order of the value of x. The second gs is the vector of fY(y) values in decreasing order of the value of y and shifted so the value of f(x) is in the same position as gs(x) = fY(s – x). Both vectors are padded on the left and/or right so they are the same length.

Example 4. In Example 3 suppose that the assumptions are changed to the following.

1. The profit X from the Angolian Oil investment will be either $0, $1000 or $2000 with probabilities 0.3, 0.5 and 0.2 respectively.

2. The profit Y from the Speedy Computer investment will be either $0, $1000 or $2000 with probabilities 0.1, 0.6 and 0.3 respectively.

3. The return from the two investments are independent.

Solution. The vector fX is (0.3, 0.5, 0.2). The corresponding vector of x values is (0, 1, 2). The vector of fY(y) values in decreasing order of the value of y is (0.3, 0.6, 0.1). The corresponding vector of y values is (2, 1, 0). To compute fS(0) we must align the vectors (0.3, 0.5, 0.2) and (0.3, 0.6, 0.1) so that corresponding elements correspond to the sum of the x and y values being 0. This alignment is when the 0.3 at the beginning of the first vector is over the 0.1 at the end of the second, i.e. . Now we multiply corresponding component and add.

fS(0) = (0.3)(0.1) = 0.03

To compute fS(1) we shift the bottom vector one position to the right so that it is and again multiply corresponding component and add.

fS(1) = (0.3)(0.6) + (0.5)(0.1) = 0.18 + 0.05 = 0.23

To compute fS(2) we shift the bottom vector one more position to the right so that it is and repeat.

fS(2) = (0.3)(0.3) + (0.5)(0.6) + (0.2)(0.1) = 0.09 + 0.3 + 0.02 = 0.41

For fS(3) we have so

fS(3000) = (0.5)(0.3) + (0.2)(0.6) = 0.15 + 0.12 = 0.27

For fS(4) one has so

fS(4) = (0.2)(0.3) = 0.06

Consider the special case (X = {0, 1, … , n} and (Y = {0, 1, … , m} with m ( n. Then (S = {0, 1, … , n + m} and the formula (3) becomes

(5) fS(k)  = =

Example 5. John is very lucky and when ever he buys a raffle ticket he either makes a profit of $0, $1 or $2 each with probability 1/3. Suppose he buys two raffle tickets and the outcome of the two tickets are independent of each other. Let S be the amount of profit he makes on the two tickets. Find the probability mass function of S.

Solution. T = U + V where U is the profit on the first ticket and V is the profit on the second ticket. Then U and V are independent and both have probability mass function f given by f(0) =  f(1) = f(2) = 1/3. Then (5) becomes

(6) fT(k) = = =

In the special case where (X = (Y = {0, 1, … , n, … } then (5) becomes

(7) fS(k)  =

Example 6. Suppose that X and Y have Poisson distributions with means ( and ( respectively. Find the probability mass function of S = X + Y.

Solution. One has fX(i) = for i = 0, 1, 2, …. and fY(j) = for j = 0, 1, 2, …. . Using (5) one has

fS(k)  = ) = =

where we have used the binomial theorem discussed at the end of section 1.6. So S is again a Poisson random variable with mean ( + (.

We can extend (5) to the case where the values of X and Y are equally spaced with the same spacing h, i.e. (X = {a + ih: i = 0, … , n} and (Y = {b + jh: j = 0, … , m} for some a and b and m ( n. Then (S = {a + b + kh: k = 0, … , n + m}. Then the random variables U = (X – a)/h and V = (Y – b)/h have the property that (U = {0, 1, … , n} and (V = {0, 1, … , m} so we can apply (5) to them to get the probability mass funtion of U + V. Then X + Y = a + b +h(U + V) and we can get the probability mass function of X + Y from that of U + V.

Example 7. Suppose that each day a newsstand either makes a profit of $100, $200 or $300 each with probability 1/3 and each day is independent of any other day. Let S be the amount of profit the newsstand makes in a two day period. Find the probability mass function of S.

Solution. S = X + Y where X is the profit the newsstand makes in the first day and Y is the amount of profit in the second day. Let U = (X – 100)/100 and V = (Y – 100)/100. Then U and V have the same probability mass function as in Example 5. So the sum T = U + V has probability mass function given by (6). Then X + Y = 200 +100T so the probability mass function of S = X + Y is

fS(k) =

As we have seen, finding the probability mass function of the sum of just two random variables requires some effort even in the case where they are independent and have the same distribution. Finding the probability mass function of the sum S = X1 + ( + Xn of n random variables X1, …, Xn is usually more difficult and it may not be possible to find a simple formula for it. One case which one can handle is the sum of independent Bernoulli random variables which was seen in section 1.4 to have a binomial distribution. As one can see from Example 6, the sum of independent Poisson random variables is again Poisson with the mean being the sum of the means. Sometimes finding the probability mass function of a sum of random variables is easier using moment generating functions. The moment generating function of a random variable X is M(t) =  and how they are used is discussed in various books.

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download