text stringlengths 1 7.76k | source stringlengths 17 81 |
|---|---|
154 CHAPTER 4. CONDITIONAL PROBABILITY man with mustache 1/4 girl with blond hair 1/3 girl with ponytail 1/10 black man with beard 1/10 interracial couple in a car 1/1000 partly yellow car 1/10 Table 4.5: Collins case probabilities. If you were the lawyer for the Collins couple how would you have countered the above argument? (The appeal of this case is discussed in Exercise 5.1.34.) 29 A student is applying to Harvard and Dartmouth. He estimates that he has a probability of .5 of being accepted at Dartmouth and .3 of being accepted at Harvard. He further estimates the probability that he will be accepted by both is .2. What is the probability that he is accepted by Dartmouth if he is accepted by Harvard? Is the event “accepted at Harvard” independent of the event “accepted at Dartmouth”? 30 Luxco, a wholesale lightbulb manufacturer, has two factories. Factory A sells bulbs in lots that consists of 1000 regular and 2000 softglow bulbs each. Ran- dom sampling has shown that on the average there tend to be about 2 bad regular bulbs and 11 bad softglow bulbs per lot. At factory B the lot size is reversed—there are 2000 regular and 1000 softglow per lot—and there tend to be 5 bad regular and 6 bad softglow bulbs per lot. The manager of factory A asserts, “We’re obviously the better producer; our bad bulb rates are .2 percent and .55 percent compared to B’s .25 percent and .6 percent. We’re better at both regular and softglow bulbs by half of a tenth of a percent each.” “Au contraire,” counters the manager of B, “each of our 3000 bulb lots con- tains only 11 bad bulbs, while A’s 3000 bulb lots contain 13. So our .37 percent bad bulb rate beats their .43 percent.” Who is right? 31 Using the Life Table for 1981 given in Appendix C, find the probability that a male of age 60 in 1981 lives to age 80. Find the same probability for a female. 32 (a) There has been a blizzard and Helen is trying to drive from Woodstock to Tunbridge, which are connected like the top graph in Figure 4.6. Here p and q are the probabilities that the two roads are passable. What is the probability that Helen can get from Woodstock to Tunbridge? (b) Now suppose that Woodstock and Tunbridge are connected like the mid- dle graph in Figure 4.6. What now is the probability that she can get from W to T? Note that if we think of the roads as being components of a system, then in (a) and (b) we have computed the reliability of a system whose components are (a) in series and (b) in parallel. | prob_Page_162_Chunk5001 |
4.1. DISCRETE CONDITIONAL PROBABILITY 155 Woodstock Tunbridge p q C D T W .8 .9 .9 .8 .95 W T p q (a) (b) (c) Figure 4.6: From Woodstock to Tunbridge. (c) Now suppose W and T are connected like the bottom graph in Figure 4.6. Find the probability of Helen’s getting from W to T. Hint: If the road from C to D is impassable, it might as well not be there at all; if it is passable, then figure out how to use part (b) twice. 33 Let A1, A2, and A3 be events, and let Bi represent either Ai or its complement ˜Ai. Then there are eight possible choices for the triple (B1, B2, B3). Prove that the events A1, A2, A3 are independent if and only if P(B1 ∩B2 ∩B3) = P(B1)P(B2)P(B3) , for all eight of the possible choices for the triple (B1, B2, B3). 34 Four women, A, B, C, and D, check their hats, and the hats are returned in a random manner. Let Ωbe the set of all possible permutations of A, B, C, D. Let Xj = 1 if the jth woman gets her own hat back and 0 otherwise. What is the distribution of Xj? Are the Xi’s mutually independent? 35 A box has numbers from 1 to 10. A number is drawn at random. Let X1 be the number drawn. This number is replaced, and the ten numbers mixed. A second number X2 is drawn. Find the distributions of X1 and X2. Are X1 and X2 independent? Answer the same questions if the first number is not replaced before the second is drawn. | prob_Page_163_Chunk5002 |
156 CHAPTER 4. CONDITIONAL PROBABILITY Y -1 0 1 2 X -1 0 1/36 1/6 1/12 0 1/18 0 1/18 0 1 0 1/36 1/6 1/12 2 1/12 0 1/12 1/6 Table 4.6: Joint distribution. 36 A die is thrown twice. Let X1 and X2 denote the outcomes. Define X = min(X1, X2). Find the distribution of X. *37 Given that P(X = a) = r, P(max(X, Y ) = a) = s, and P(min(X, Y ) = a) = t, show that you can determine u = P(Y = a) in terms of r, s, and t. 38 A fair coin is tossed three times. Let X be the number of heads that turn up on the first two tosses and Y the number of heads that turn up on the third toss. Give the distribution of (a) the random variables X and Y . (b) the random variable Z = X + Y . (c) the random variable W = X −Y . 39 Assume that the random variables X and Y have the joint distribution given in Table 4.6. (a) What is P(X ≥1 and Y ≤0)? (b) What is the conditional probability that Y ≤0 given that X = 2? (c) Are X and Y independent? (d) What is the distribution of Z = XY ? 40 In the problem of points, discussed in the historical remarks in Section 3.2, two players, A and B, play a series of points in a game with player A winning each point with probability p and player B winning each point with probability q = 1 −p. The first player to win N points wins the game. Assume that N = 3. Let X be a random variable that has the value 1 if player A wins the series and 0 otherwise. Let Y be a random variable with value the number of points played in a game. Find the distribution of X and Y when p = 1/2. Are X and Y independent in this case? Answer the same questions for the case p = 2/3. 41 The letters between Pascal and Fermat, which are often credited with having started probability theory, dealt mostly with the problem of points described in Exercise 40. Pascal and Fermat considered the problem of finding a fair division of stakes if the game must be called offwhen the first player has won r games and the second player has won s games, with r < N and s < N. Let P(r, s) be the probability that player A wins the game if he has already won r points and player B has won s points. Then | prob_Page_164_Chunk5003 |
4.1. DISCRETE CONDITIONAL PROBABILITY 157 (a) P(r, N) = 0 if r < N, (b) P(N, s) = 1 if s < N, (c) P(r, s) = pP(r + 1, s) + qP(r, s + 1) if r < N and s < N; and (1), (2), and (3) determine P(r, s) for r ≤N and s ≤N. Pascal used these facts to find P(r, s) by working backward: He first obtained P(N −1, j) for j = N −1, N −2, . . . , 0; then, from these values, he obtained P(N −2, j) for j = N −1, N −2, . . . , 0 and, continuing backward, obtained all the values P(r, s). Write a program to compute P(r, s) for given N, a, b, and p. Warning: Follow Pascal and you will be able to run N = 100; use recursion and you will not be able to run N = 20. 42 Fermat solved the problem of points (see Exercise 40) as follows: He realized that the problem was difficult because the possible ways the play might go are not equally likely. For example, when the first player needs two more games and the second needs three to win, two possible ways the series might go for the first player are WLW and LWLW. These sequences are not equally likely. To avoid this difficulty, Fermat extended the play, adding fictitious plays so that the series went the maximum number of games needed (four in this case). He obtained equally likely outcomes and used, in effect, the Pascal triangle to calculate P(r, s). Show that this leads to a formula for P(r, s) even for the case p ̸= 1/2. 43 The Yankees are playing the Dodgers in a world series. The Yankees win each game with probability .6. What is the probability that the Yankees win the series? (The series is won by the first team to win four games.) 44 C. L. Anderson11 has used Fermat’s argument for the problem of points to prove the following result due to J. G. Kingston. You are playing the game of points (see Exercise 40) but, at each point, when you serve you win with probability p, and when your opponent serves you win with probability ¯p. You will serve first, but you can choose one of the following two conventions for serving: for the first convention you alternate service (tennis), and for the second the person serving continues to serve until he loses a point and then the other player serves (racquetball). The first player to win N points wins the game. The problem is to show that the probability of winning the game is the same under either convention. (a) Show that, under either convention, you will serve at most N points and your opponent at most N −1 points. (b) Extend the number of points to 2N −1 so that you serve N points and your opponent serves N −1. For example, you serve any additional points necessary to make N serves and then your opponent serves any additional points necessary to make him serve N −1 points. The winner 11C. L. Anderson, “Note on the Advantage of First Serve,” Journal of Combinatorial Theory, Series A, vol. 23 (1977), p. 363. | prob_Page_165_Chunk5004 |
158 CHAPTER 4. CONDITIONAL PROBABILITY is now the person, in the extended game, who wins the most points. Show that playing these additional points has not changed the winner. (c) Show that (a) and (b) prove that you have the same probability of win- ning the game under either convention. 45 In the previous problem, assume that p = 1 −¯p. (a) Show that under either service convention, the first player will win more often than the second player if and only if p > .5. (b) In volleyball, a team can only win a point while it is serving. Thus, any individual “play” either ends with a point being awarded to the serving team or with the service changing to the other team. The first team to win N points wins the game. (We ignore here the additional restriction that the winning team must be ahead by at least two points at the end of the game.) Assume that each team has the same probability of winning the play when it is serving, i.e., that p = 1 −¯p. Show that in this case, the team that serves first will win more than half the time, as long as p > 0. (If p = 0, then the game never ends.) Hint: Define p′ to be the probability that a team wins the next point, given that it is serving. If we write q = 1 −p, then one can show that p′ = p 1 −q2 . If one now considers this game in a slightly different way, one can see that the second service convention in the preceding problem can be used, with p replaced by p′. 46 A poker hand consists of 5 cards dealt from a deck of 52 cards. Let X and Y be, respectively, the number of aces and kings in a poker hand. Find the joint distribution of X and Y . 47 Let X1 and X2 be independent random variables and let Y1 = φ1(X1) and Y2 = φ2(X2). (a) Show that P(Y1 = r, Y2 = s) = X φ1(a)=r φ2(b)=s P(X1 = a, X2 = b) . (b) Using (a), show that P(Y1 = r, Y2 = s) = P(Y1 = r)P(Y2 = s) so that Y1 and Y2 are independent. 48 Let Ωbe the sample space of an experiment. Let E be an event with P(E) > 0 and define mE(ω) by mE(ω) = m(ω|E). Prove that mE(ω) is a distribution function on E, that is, that mE(ω) ≥0 and that P ω∈ΩmE(ω) = 1. The function mE is called the conditional distribution given E. | prob_Page_166_Chunk5005 |
4.1. DISCRETE CONDITIONAL PROBABILITY 159 49 You are given two urns each containing two biased coins. The coins in urn I come up heads with probability p1, and the coins in urn II come up heads with probability p2 ̸= p1. You are given a choice of (a) choosing an urn at random and tossing the two coins in this urn or (b) choosing one coin from each urn and tossing these two coins. You win a prize if both coins turn up heads. Show that you are better offselecting choice (a). 50 Prove that, if A1, A2, . . . , An are independent events defined on a sample space Ωand if 0 < P(Aj) < 1 for all j, then Ωmust have at least 2n points. 51 Prove that if P(A|C) ≥P(B|C) and P(A| ˜C) ≥P(B| ˜C) , then P(A) ≥P(B). 52 A coin is in one of n boxes. The probability that it is in the ith box is pi. If you search in the ith box and it is there, you find it with probability ai. Show that the probability p that the coin is in the jth box, given that you have looked in the ith box and not found it, is p = pj/(1 −aipi), if j ̸= i, (1 −ai)pi/(1 −aipi), if j = i. 53 George Wolford has suggested the following variation on the Linda problem (see Exercise 1.2.25). The registrar is carrying John and Mary’s registration cards and drops them in a puddle. When he pickes them up he cannot read the names but on the first card he picked up he can make out Mathematics 23 and Government 35, and on the second card he can make out only Mathematics 23. He asks you if you can help him decide which card belongs to Mary. You know that Mary likes government but does not like mathematics. You know nothing about John and assume that he is just a typical Dartmouth student. From this you estimate: P(Mary takes Government 35) = .5 , P(Mary takes Mathematics 23) = .1 , P(John takes Government 35) = .3 , P(John takes Mathematics 23) = .2 . Assume that their choices for courses are independent events. Show that the card with Mathematics 23 and Government 35 showing is more likely to be Mary’s than John’s. The conjunction fallacy referred to in the Linda problem would be to assume that the event “Mary takes Mathematics 23 and Government 35” is more likely than the event “Mary takes Mathematics 23.” Why are we not making this fallacy here? | prob_Page_167_Chunk5006 |
160 CHAPTER 4. CONDITIONAL PROBABILITY 54 (Suggested by Eisenberg and Ghosh12) A deck of playing cards can be de- scribed as a Cartesian product Deck = Suit × Rank , where Suit = {♣, ♦, ♥, ♠} and Rank = {2, 3, . . ., 10, J, Q, K, A}. This just means that every card may be thought of as an ordered pair like (♦, 2). By a suit event we mean any event A contained in Deck which is described in terms of Suit alone. For instance, if A is “the suit is red,” then A = {♦, ♥} × Rank , so that A consists of all cards of the form (♦, r) or (♥, r) where r is any rank. Similarly, a rank event is any event described in terms of rank alone. (a) Show that if A is any suit event and B any rank event, then A and B are independent. (We can express this briefly by saying that suit and rank are independent.) (b) Throw away the ace of spades. Show that now no nontrivial (i.e., neither empty nor the whole space) suit event A is independent of any nontrivial rank event B. Hint: Here independence comes down to c/51 = (a/51) · (b/51) , where a, b, c are the respective sizes of A, B and A ∩B. It follows that 51 must divide ab, hence that 3 must divide one of a and b, and 17 the other. But the possible sizes for suit and rank events preclude this. (c) Show that the deck in (b) nevertheless does have pairs A, B of nontrivial independent events. Hint: Find 2 events A and B of sizes 3 and 17, respectively, which intersect in a single point. (d) Add a joker to a full deck. Show that now there is no pair A, B of nontrivial independent events. Hint: See the hint in (b); 53 is prime. The following problems are suggested by Stanley Gudder in his article “Do Good Hands Attract?”13 He says that event A attracts event B if P(B|A) > P(B) and repels B if P(B|A) < P(B). 55 Let Ri be the event that the ith player in a poker game has a royal flush. Show that a royal flush (A,K,Q,J,10 of one suit) attracts another royal flush, that is P(R2|R1) > P(R2). Show that a royal flush repels full houses. 56 Prove that A attracts B if and only if B attracts A. Hence we can say that A and B are mutually attractive if A attracts B. 12B. Eisenberg and B. K. Ghosh, “Independent Events in a Discrete Uniform Probability Space,” The American Statistician, vol. 41, no. 1 (1987), pp. 52–56. 13S. Gudder, “Do Good Hands Attract?” Mathematics Magazine, vol. 54, no. 1 (1981), pp. 13– 16. | prob_Page_168_Chunk5007 |
4.1. DISCRETE CONDITIONAL PROBABILITY 161 57 Prove that A neither attracts nor repels B if and only if A and B are inde- pendent. 58 Prove that A and B are mutually attractive if and only if P(B|A) > P(B| ˜A). 59 Prove that if A attracts B, then A repels ˜B. 60 Prove that if A attracts both B and C, and A repels B ∩C, then A attracts B ∪C. Is there any example in which A attracts both B and C and repels B ∪C? 61 Prove that if B1, B2, . . . , Bn are mutually disjoint and collectively exhaustive, and if A attracts some Bi, then A must repel some Bj. 62 (a) Suppose that you are looking in your desk for a letter from some time ago. Your desk has eight drawers, and you assess the probability that it is in any particular drawer is 10% (so there is a 20% chance that it is not in the desk at all). Suppose now that you start searching systematically through your desk, one drawer at a time. In addition, suppose that you have not found the letter in the first i drawers, where 0 ≤i ≤7. Let pi denote the probability that the letter will be found in the next drawer, and let qi denote the probability that the letter will be found in some subsequent drawer (both pi and qi are conditional probabilities, since they are based upon the assumption that the letter is not in the first i drawers). Show that the pi’s increase and the qi’s decrease. (This problem is from Falk et al.14) (b) The following data appeared in an article in the Wall Street Journal.15 For the ages 20, 30, 40, 50, and 60, the probability of a woman in the U.S. developing cancer in the next ten years is 0.5%, 1.2%, 3.2%, 6.4%, and 10.8%, respectively. At the same set of ages, the probability of a woman in the U.S. eventually developing cancer is 39.6%, 39.5%, 39.1%, 37.5%, and 34.2%, respectively. Do you think that the problem in part (a) gives an explanation for these data? 63 Here are two variations of the Monty Hall problem that are discussed by Granberg.16 (a) Suppose that everything is the same except that Monty forgot to find out in advance which door has the car behind it. In the spirit of “the show must go on,” he makes a guess at which of the two doors to open and gets lucky, opening a door behind which stands a goat. Now should the contestant switch? 14R. Falk, A. Lipson, and C. Konold, “The ups and downs of the hope function in a fruitless search,” in Subjective Probability, G. Wright and P. Ayton, (eds.) (Chichester: Wiley, 1994), pgs. 353-377. 15C. Crossen, “Fright by the numbers: Alarming disease data are frequently flawed,” Wall Street Journal, 11 April 1996, p. B1. 16D. Granberg, “To switch or not to switch,” in The power of logical thinking, M. vos Savant, (New York: St. Martin’s 1996). | prob_Page_169_Chunk5008 |
162 CHAPTER 4. CONDITIONAL PROBABILITY (b) You have observed the show for a long time and found that the car is put behind door A 45% of the time, behind door B 40% of the time and behind door C 15% of the time. Assume that everything else about the show is the same. Again you pick door A. Monty opens a door with a goat and offers to let you switch. Should you? Suppose you knew in advance that Monty was going to give you a chance to switch. Should you have initially chosen door A? 4.2 Continuous Conditional Probability In situations where the sample space is continuous we will follow the same procedure as in the previous section. Thus, for example, if X is a continuous random variable with density function f(x), and if E is an event with positive probability, we define a conditional density function by the formula f(x|E) = f(x)/P(E), if x ∈E, 0, if x ̸∈E. Then for any event F, we have P(F|E) = Z F f(x|E) dx . The expression P(F|E) is called the conditional probability of F given E. As in the previous section, it is easy to obtain an alternative expression for this probability: P(F|E) = Z F f(x|E) dx = Z E∩F f(x) P(E) dx = P(E ∩F) P(E) . We can think of the conditional density function as being 0 except on E, and normalized to have integral 1 over E. Note that if the original density is a uniform density corresponding to an experiment in which all events of equal size are equally likely, then the same will be true for the conditional density. Example 4.18 In the spinner experiment (cf. Example 2.1), suppose we know that the spinner has stopped with head in the upper half of the circle, 0 ≤x ≤1/2. What is the probability that 1/6 ≤x ≤1/3? Here E = [0, 1/2], F = [1/6, 1/3], and F ∩E = F. Hence P(F|E) = P(F ∩E) P(E) = 1/6 1/2 = 1 3 , which is reasonable, since F is 1/3 the size of E. The conditional density function here is given by | prob_Page_170_Chunk5009 |
4.2. CONTINUOUS CONDITIONAL PROBABILITY 163 f(x|E) = 2, if 0 ≤x < 1/2, 0, if 1/2 ≤x < 1. Thus the conditional density function is nonzero only on [0, 1/2], and is uniform there. 2 Example 4.19 In the dart game (cf. Example 2.8), suppose we know that the dart lands in the upper half of the target. What is the probability that its distance from the center is less than 1/2? Here E = { (x, y) : y ≥0 }, and F = { (x, y) : x2 + y2 < (1/2)2 }. Hence, P(F|E) = P(F ∩E) P(E) = (1/π)[(1/2)(π/4)] (1/π)(π/2) = 1/4 . Here again, the size of F ∩E is 1/4 the size of E. The conditional density function is f((x, y)|E) = f(x, y)/P(E) = 2/π, if (x, y) ∈E, 0, if (x, y) ̸∈E. 2 Example 4.20 We return to the exponential density (cf. Example 2.17). We sup- pose that we are observing a lump of plutonium-239. Our experiment consists of waiting for an emission, then starting a clock, and recording the length of time X that passes until the next emission. Experience has shown that X has an expo- nential density with some parameter λ, which depends upon the size of the lump. Suppose that when we perform this experiment, we notice that the clock reads r seconds, and is still running. What is the probability that there is no emission in a further s seconds? Let G(t) be the probability that the next particle is emitted after time t. Then G(t) = Z ∞ t λe−λx dx = −e−λx ∞ t = e−λt . Let E be the event “the next particle is emitted after time r” and F the event “the next particle is emitted after time r + s.” Then P(F|E) = P(F ∩E) P(E) = G(r + s) G(r) = e−λ(r+s) e−λr = e−λs . | prob_Page_171_Chunk5010 |
164 CHAPTER 4. CONDITIONAL PROBABILITY This tells us the rather surprising fact that the probability that we have to wait s seconds more for an emission, given that there has been no emission in r seconds, is independent of the time r. This property (called the memoryless property) was introduced in Example 2.17. When trying to model various phenomena, this property is helpful in deciding whether the exponential density is appropriate. The fact that the exponential density is memoryless means that it is reasonable to assume if one comes upon a lump of a radioactive isotope at some random time, then the amount of time until the next emission has an exponential density with the same parameter as the time between emissions. A well-known example, known as the “bus paradox,” replaces the emissions by buses. The apparent paradox arises from the following two facts: 1) If you know that, on the average, the buses come by every 30 minutes, then if you come to the bus stop at a random time, you should only have to wait, on the average, for 15 minutes for a bus, and 2) Since the buses arrival times are being modelled by the exponential density, then no matter when you arrive, you will have to wait, on the average, for 30 minutes for a bus. The reader can now see that in Exercises 2.2.9, 2.2.10, and 2.2.11, we were asking for simulations of conditional probabilities, under various assumptions on the distribution of the interarrival times. If one makes a reasonable assumption about this distribution, such as the one in Exercise 2.2.10, then the average waiting time is more nearly one-half the average interarrival time. 2 Independent Events If E and F are two events with positive probability in a continuous sample space, then, as in the case of discrete sample spaces, we define E and F to be independent if P(E|F) = P(E) and P(F|E) = P(F). As before, each of the above equations imply the other, so that to see whether two events are independent, only one of these equations must be checked. It is also the case that, if E and F are independent, then P(E ∩F) = P(E)P(F). Example 4.21 (Example 4.18 continued) In the dart game (see Example 4.18), let E be the event that the dart lands in the upper half of the target (y ≥0) and F the event that the dart lands in the right half of the target (x ≥0). Then P(E ∩F) is the probability that the dart lies in the first quadrant of the target, and P(E ∩F) = 1 π Z E∩F 1 dxdy = Area (E ∩F) = Area (E) Area (F) = 1 π Z E 1 dxdy 1 π Z F 1 dxdy = P(E)P(F) so that E and F are independent. What makes this work is that the events E and F are described by restricting different coordinates. This idea is made more precise below. 2 | prob_Page_172_Chunk5011 |
4.2. CONTINUOUS CONDITIONAL PROBABILITY 165 Joint Density and Cumulative Distribution Functions In a manner analogous with discrete random variables, we can define joint density functions and cumulative distribution functions for multi-dimensional continuous random variables. Definition 4.6 Let X1, X2, . . . , Xn be continuous random variables associated with an experiment, and let ¯X = (X1, X2, . . . , Xn). Then the joint cumulative distribution function of ¯X is defined by F(x1, x2, . . . , xn) = P(X1 ≤x1, X2 ≤x2, . . . , Xn ≤xn) . The joint density function of ¯X satisfies the following equation: F(x1, x2, . . . , xn) = Z x1 −∞ Z x2 −∞ · · · Z xn −∞ f(t1, t2, . . . tn) dtndtn−1 . . . dt1 . 2 It is straightforward to show that, in the above notation, f(x1, x2, . . . , xn) = ∂nF(x1, x2, . . . , xn) ∂x1∂x2 · · · ∂xn . (4.4) Independent Random Variables As with discrete random variables, we can define mutual independence of continuous random variables. Definition 4.7 Let X1, X2, . . . , Xn be continuous random variables with cumula- tive distribution functions F1(x), F2(x), . . . , Fn(x). Then these random variables are mutually independent if F(x1, x2, . . . , xn) = F1(x1)F2(x2) · · · Fn(xn) for any choice of x1, x2, . . . , xn. Thus, if X1, X2, . . . , Xn are mutually inde- pendent, then the joint cumulative distribution function of the random variable ¯X = (X1, X2, . . . , Xn) is just the product of the individual cumulative distribution functions. When two random variables are mutually independent, we shall say more briefly that they are independent. 2 Using Equation 4.4, the following theorem can easily be shown to hold for mu- tually independent continuous random variables. Theorem 4.2 Let X1, X2, . . . , Xn be continuous random variables with density functions f1(x), f2(x), . . . , fn(x). Then these random variables are mutually in- dependent if and only if f(x1, x2, . . . , xn) = f1(x1)f2(x2) · · · fn(xn) for any choice of x1, x2, . . . , xn. 2 | prob_Page_173_Chunk5012 |
166 CHAPTER 4. CONDITIONAL PROBABILITY 1 1 r r 0 ω ω E 2 1 1 2 1 Figure 4.7: X1 and X2 are independent. Let’s look at some examples. Example 4.22 In this example, we define three random variables, X1, X2, and X3. We will show that X1 and X2 are independent, and that X1 and X3 are not independent. Choose a point ω = (ω1, ω2) at random from the unit square. Set X1 = ω2 1, X2 = ω2 2, and X3 = ω1 + ω2. Find the joint distributions F12(r1, r2) and F23(r2, r3). We have already seen (see Example 2.13) that F1(r1) = P(−∞< X1 ≤r1) = √r1, if 0 ≤r1 ≤1 , and similarly, F2(r2) = √r2 , if 0 ≤r2 ≤1. Now we have (see Figure 4.7) F12(r1, r2) = P(X1 ≤r1 and X2 ≤r2) = P(ω1 ≤√r1 and ω2 ≤√r2) = Area (E1) = √r1 √r2 = F1(r1)F2(r2) . In this case F12(r1, r2) = F1(r1)F2(r2) so that X1 and X2 are independent. On the other hand, if r1 = 1/4 and r3 = 1, then (see Figure 4.8) F13(1/4, 1) = P(X1 ≤1/4, X3 ≤1) | prob_Page_174_Chunk5013 |
4.2. CONTINUOUS CONDITIONAL PROBABILITY 167 1 1 0 ω ω ω + ω = 1 1/2 1 2 1 2 Ε 2 Figure 4.8: X1 and X3 are not independent. = P(ω1 ≤1/2, ω1 + ω2 ≤1) = Area (E2) = 1 2 −1 8 = 3 8 . Now recalling that F3(r3) = 0, if r3 < 0, (1/2)r2 3, if 0 ≤r3 ≤1, 1 −(1/2)(2 −r3)2, if 1 ≤r3 ≤2, 1, if 2 < r3, (see Example 2.14), we have F1(1/4)F3(1) = (1/2)(1/2) = 1/4. Hence, X1 and X3 are not independent random variables. A similar calculation shows that X2 and X3 are not independent either. 2 Although we shall not prove it here, the following theorem is a useful one. The statement also holds for mutually independent discrete random variables. A proof may be found in R´enyi.17 Theorem 4.3 Let X1, X2, . . . , Xn be mutually independent continuous random variables and let φ1(x), φ2(x), . . . , φn(x) be continuous functions. Then φ1(X1), φ2(X2), . . . , φn(Xn) are mutually independent. 2 Independent Trials Using the notion of independence, we can now formulate for continuous sample spaces the notion of independent trials (see Definition 4.5). 17A. R´enyi, Probability Theory (Budapest: Akad´emiai Kiad´o, 1970), p. 183. | prob_Page_175_Chunk5014 |
168 CHAPTER 4. CONDITIONAL PROBABILITY 0.2 0.4 0.6 0.8 1 0.5 1 1.5 2 2.5 3 α = β =.5 α = β =1 α = β = 2 0 Figure 4.9: Beta density for α = β = .5, 1, 2. Definition 4.8 A sequence X1, X2, . . . , Xn of random variables Xi that are mutually independent and have the same density is called an independent trials process. 2 As in the case of discrete random variables, these independent trials processes arise naturally in situations where an experiment described by a single random variable is repeated n times. Beta Density We consider next an example which involves a sample space with both discrete and continuous coordinates. For this example we shall need a new density function called the beta density. This density has two parameters α, β and is defined by B(α, β, x) = (1/B(α, β))xα−1(1 −x)β−1, if 0 ≤x ≤1, 0, otherwise. Here α and β are any positive numbers, and the beta function B(α, β) is given by the area under the graph of xα−1(1 −x)β−1 between 0 and 1: B(α, β) = Z 1 0 xα−1(1 −x)β−1 dx . Note that when α = β = 1 the beta density if the uniform density. When α and β are greater than 1 the density is bell-shaped, but when they are less than 1 it is U-shaped as suggested by the examples in Figure 4.9. We shall need the values of the beta function only for integer values of α and β, and in this case B(α, β) = (α −1)! (β −1)! (α + β −1)! . Example 4.23 In medical problems it is often assumed that a drug is effective with a probability x each time it is used and the various trials are independent, so that | prob_Page_176_Chunk5015 |
4.2. CONTINUOUS CONDITIONAL PROBABILITY 169 one is, in effect, tossing a biased coin with probability x for heads. Before further experimentation, you do not know the value x but past experience might give some information about its possible values. It is natural to represent this information by sketching a density function to determine a distribution for x. Thus, we are considering x to be a continuous random variable, which takes on values between 0 and 1. If you have no knowledge at all, you would sketch the uniform density. If past experience suggests that x is very likely to be near 2/3 you would sketch a density with maximum at 2/3 and a spread reflecting your uncertainly in the estimate of 2/3. You would then want to find a density function that reasonably fits your sketch. The beta densities provide a class of densities that can be fit to most sketches you might make. For example, for α > 1 and β > 1 it is bell-shaped with the parameters α and β determining its peak and its spread. Assume that the experimenter has chosen a beta density to describe the state of his knowledge about x before the experiment. Then he gives the drug to n subjects and records the number i of successes. The number i is a discrete random variable, so we may conveniently describe the set of possible outcomes of this experiment by referring to the ordered pair (x, i). We let m(i|x) denote the probability that we observe i successes given the value of x. By our assumptions, m(i|x) is the binomial distribution with probability x for success: m(i|x) = b(n, x, i) = n i xi(1 −x)j , where j = n −i. If x is chosen at random from [0, 1] with a beta density B(α, β, x), then the density function for the outcome of the pair (x, i) is f(x, i) = m(i|x)B(α, β, x) = n i xi(1 −x)j 1 B(α, β)xα−1(1 −x)β−1 = n i 1 B(α, β)xα+i−1(1 −x)β+j−1 . Now let m(i) be the probability that we observe i successes not knowing the value of x. Then m(i) = Z 1 0 m(i|x)B(α, β, x) dx = n i 1 B(α, β) Z 1 0 xα+i−1(1 −x)β+j−1 dx = n i B(α + i, β + j) B(α, β) . Hence, the probability density f(x|i) for x, given that i successes were observed, is f(x|i) = f(x, i) m(i) | prob_Page_177_Chunk5016 |
170 CHAPTER 4. CONDITIONAL PROBABILITY = xα+i−1(1 −x)β+j−1 B(α + i, β + j) , (4.5) that is, f(x|i) is another beta density. This says that if we observe i successes and j failures in n subjects, then the new density for the probability that the drug is effective is again a beta density but with parameters α + i, β + j. Now we assume that before the experiment we choose a beta density with pa- rameters α and β, and that in the experiment we obtain i successes in n trials. We have just seen that in this case, the new density for x is a beta density with parameters α + i and β + j. Now we wish to calculate the probability that the drug is effective on the next subject. For any particular real number t between 0 and 1, the probability that x has the value t is given by the expression in Equation 4.5. Given that x has the value t, the probability that the drug is effective on the next subject is just t. Thus, to obtain the probability that the drug is effective on the next subject, we integrate the product of the expression in Equation 4.5 and t over all possible values of t. We obtain: 1 B(α + i, β + j) Z 1 0 t · tα+i−1(1 −t)β+j−1 dt = B(α + i + 1, β + j) B(α + i, β + j) = (α + i)! (β + j −1)! (α + β + i + j)! · (α + β + i + j −1)! (α + i −1)! (β + j −1)! = α + i α + β + n . If n is large, then our estimate for the probability of success after the experiment is approximately the proportion of successes observed in the experiment, which is certainly a reasonable conclusion. 2 The next example is another in which the true probabilities are unknown and must be estimated based upon experimental data. Example 4.24 (Two-armed bandit problem) You are in a casino and confronted by two slot machines. Each machine pays offeither 1 dollar or nothing. The probability that the first machine pays offa dollar is x and that the second machine pays off a dollar is y. We assume that x and y are random numbers chosen independently from the interval [0, 1] and unknown to you. You are permitted to make a series of ten plays, each time choosing one machine or the other. How should you choose to maximize the number of times that you win? One strategy that sounds reasonable is to calculate, at every stage, the prob- ability that each machine will pay offand choose the machine with the higher probability. Let win(i), for i = 1 or 2, be the number of times that you have won on the ith machine. Similarly, let lose(i) be the number of times you have lost on the ith machine. Then, from Example 4.23, the probability p(i) that you win if you | prob_Page_178_Chunk5017 |
4.2. CONTINUOUS CONDITIONAL PROBABILITY 171 0.2 0.4 0.6 0.8 1 0.5 1 1.5 2 2.5 Machine Result 1 W 1 L 2 L 1 L 1 W 1 L 1 L 1 L 2 W 2 L 0 0 Figure 4.10: Play the best machine. choose the ith machine is p(i) = win(i) + 1 win(i) + lose(i) + 2 . Thus, if p(1) > p(2) you would play machine 1 and otherwise you would play machine 2. We have written a program TwoArm to simulate this experiment. In the program, the user specifies the initial values for x and y (but these are unknown to the experimenter). The program calculates at each stage the two conditional densities for x and y, given the outcomes of the previous trials, and then computes p(i), for i = 1, 2. It then chooses the machine with the highest value for the probability of winning for the next play. The program prints the machine chosen on each play and the outcome of this play. It also plots the new densities for x (solid line) and y (dotted line), showing only the current densities. We have run the program for ten plays for the case x = .6 and y = .7. The result is shown in Figure 4.10. The run of the program shows the weakness of this strategy. Our initial proba- bility for winning on the better of the two machines is .7. We start with the poorer machine and our outcomes are such that we always have a probability greater than .6 of winning and so we just keep playing this machine even though the other ma- chine is better. If we had lost on the first play we would have switched machines. Our final density for y is the same as our initial density, namely, the uniform den- sity. Our final density for x is different and reflects a much more accurate knowledge about x. The computer did pretty well with this strategy, winning seven out of the ten trials, but ten trials are not enough to judge whether this is a good strategy in the long run. Another popular strategy is the play-the-winner strategy. As the name suggests, for this strategy we choose the same machine when we win and switch machines when we lose. The program TwoArm will simulate this strategy as well. In Figure 4.11, we show the results of running this program with the play-the-winner strategy and the same true probabilities of .6 and .7 for the two machines. After ten plays our densities for the unknown probabilities of winning suggest to us that the second machine is indeed the better of the two. We again won seven out of the ten trials. | prob_Page_179_Chunk5018 |
172 CHAPTER 4. CONDITIONAL PROBABILITY 0.2 0.4 0.6 0.8 1 0.5 1 1.5 2 Machine Result 1 W 1 W 1 L 2 L 1 W 1 W 1 L 2 L 1 L 2 W Figure 4.11: Play the winner. Neither of the strategies that we simulated is the best one in terms of maximizing our average winnings. This best strategy is very complicated but is reasonably ap- proximated by the play-the-winner strategy. Variations on this example have played an important role in the problem of clinical tests of drugs where experimenters face a similar situation. 2 Exercises 1 Pick a point x at random (with uniform density) in the interval [0, 1]. Find the probability that x > 1/2, given that (a) x > 1/4. (b) x < 3/4. (c) |x −1/2| < 1/4. (d) x2 −x + 2/9 < 0. 2 A radioactive material emits α-particles at a rate described by the density function f(t) = .1e−.1t . Find the probability that a particle is emitted in the first 10 seconds, given that (a) no particle is emitted in the first second. (b) no particle is emitted in the first 5 seconds. (c) a particle is emitted in the first 3 seconds. (d) a particle is emitted in the first 20 seconds. 3 The Acme Super light bulb is known to have a useful life described by the density function f(t) = .01e−.01t , where time t is measured in hours. | prob_Page_180_Chunk5019 |
4.2. CONTINUOUS CONDITIONAL PROBABILITY 173 (a) Find the failure rate of this bulb (see Exercise 2.2.6). (b) Find the reliability of this bulb after 20 hours. (c) Given that it lasts 20 hours, find the probability that the bulb lasts another 20 hours. (d) Find the probability that the bulb burns out in the forty-first hour, given that it lasts 40 hours. 4 Suppose you toss a dart at a circular target of radius 10 inches. Given that the dart lands in the upper half of the target, find the probability that (a) it lands in the right half of the target. (b) its distance from the center is less than 5 inches. (c) its distance from the center is greater than 5 inches. (d) it lands within 5 inches of the point (0, 5). 5 Suppose you choose two numbers x and y, independently at random from the interval [0, 1]. Given that their sum lies in the interval [0, 1], find the probability that (a) |x −y| < 1. (b) xy < 1/2. (c) max{x, y} < 1/2. (d) x2 + y2 < 1/4. (e) x > y. 6 Find the conditional density functions for the following experiments. (a) A number x is chosen at random in the interval [0, 1], given that x > 1/4. (b) A number t is chosen at random in the interval [0, ∞) with exponential density e−t, given that 1 < t < 10. (c) A dart is thrown at a circular target of radius 10 inches, given that it falls in the upper half of the target. (d) Two numbers x and y are chosen at random in the interval [0, 1], given that x > y. 7 Let x and y be chosen at random from the interval [0, 1]. Show that the events x > 1/3 and y > 2/3 are independent events. 8 Let x and y be chosen at random from the interval [0, 1]. Which pairs of the following events are independent? (a) x > 1/3. (b) y > 2/3. (c) x > y. | prob_Page_181_Chunk5020 |
174 CHAPTER 4. CONDITIONAL PROBABILITY (d) x + y < 1. 9 Suppose that X and Y are continuous random variables with density functions fX(x) and fY (y), respectively. Let f(x, y) denote the joint density function of (X, Y ). Show that Z ∞ −∞ f(x, y) dy = fX(x) , and Z ∞ −∞ f(x, y) dx = fY (y) . *10 In Exercise 2.2.12 you proved the following: If you take a stick of unit length and break it into three pieces, choosing the breaks at random (i.e., choosing two real numbers independently and uniformly from [0, 1]), then the prob- ability that the three pieces form a triangle is 1/4. Consider now a similar experiment: First break the stick at random, then break the longer piece at random. Show that the two experiments are actually quite different, as follows: (a) Write a program which simulates both cases for a run of 1000 trials, prints out the proportion of successes for each run, and repeats this process ten times. (Call a trial a success if the three pieces do form a triangle.) Have your program pick (x, y) at random in the unit square, and in each case use x and y to find the two breaks. For each experiment, have it plot (x, y) if (x, y) gives a success. (b) Show that in the second experiment the theoretical probability of success is actually 2 log 2 −1. 11 A coin has an unknown bias p that is assumed to be uniformly distributed between 0 and 1. The coin is tossed n times and heads turns up j times and tails turns up k times. We have seen that the probability that heads turns up next time is j + 1 n + 2 . Show that this is the same as the probability that the next ball is black for the Polya urn model of Exercise 4.1.20. Use this result to explain why, in the Polya urn model, the proportion of black balls does not tend to 0 or 1 as one might expect but rather to a uniform distribution on the interval [0, 1]. 12 Previous experience with a drug suggests that the probability p that the drug is effective is a random quantity having a beta density with parameters α = 2 and β = 3. The drug is used on ten subjects and found to be successful in four out of the ten patients. What density should we now assign to the probability p? What is the probability that the drug will be successful the next time it is used? | prob_Page_182_Chunk5021 |
4.3. PARADOXES 175 13 Write a program to allow you to compare the strategies play-the-winner and play-the-best-machine for the two-armed bandit problem of Example 4.24. Have your program determine the initial payoffprobabilities for each machine by choosing a pair of random numbers between 0 and 1. Have your program carry out 20 plays and keep track of the number of wins for each of the two strategies. Finally, have your program make 1000 repetitions of the 20 plays and compute the average winning per 20 plays. Which strategy seems to be the best? Repeat these simulations with 20 replaced by 100. Does your answer to the above question change? 14 Consider the two-armed bandit problem of Example 4.24. Bruce Barnes pro- posed the following strategy, which is a variation on the play-the-best-machine strategy. The machine with the greatest probability of winning is played un- less the following two conditions hold: (a) the difference in the probabilities for winning is less than .08, and (b) the ratio of the number of times played on the more often played machine to the number of times played on the less often played machine is greater than 1.4. If the above two conditions hold, then the machine with the smaller probability of winning is played. Write a program to simulate this strategy. Have your program choose the initial payoff probabilities at random from the unit interval [0, 1], make 20 plays, and keep track of the number of wins. Repeat this experiment 1000 times and obtain the average number of wins per 20 plays. Implement a second strategy—for example, play-the-best-machine or one of your own choice, and see how this second strategy compares with Bruce’s on average wins. 4.3 Paradoxes Much of this section is based on an article by Snell and Vanderbei.18 One must be very careful in dealing with problems involving conditional prob- ability. The reader will recall that in the Monty Hall problem (Example 4.6), if the contestant chooses the door with the car behind it, then Monty has a choice of doors to open. We made an assumption that in this case, he will choose each door with probability 1/2. We then noted that if this assumption is changed, the answer to the original question changes. In this section, we will study other examples of the same phenomenon. Example 4.25 Consider a family with two children. Given that one of the children is a boy, what is the probability that both children are boys? One way to approach this problem is to say that the other child is equally likely to be a boy or a girl, so the probability that both children are boys is 1/2. The “text- book” solution would be to draw the tree diagram and then form the conditional tree by deleting paths to leave only those paths that are consistent with the given 18J. L. Snell and R. Vanderbei, “Three Bewitching Paradoxes,” in Topics in Contemporary Probability and Its Applications, CRC Press, Boca Raton, 1995. | prob_Page_183_Chunk5022 |
176 CHAPTER 4. CONDITIONAL PROBABILITY First child Second child Conditional probability First child Second child Unconditional probability b g b g b g b 1/4 1/4 1/4 1/4 1/3 1/3 1/3 1/4 1/4 1/4 1/2 1/2 1/2 1/2 1/2 b g 1/2 1/2 1/2 g b Unconditional probability 1/2 1/2 1/2 Figure 4.12: Tree for Example 4.25. information. The result is shown in Figure 4.12. We see that the probability of two boys given a boy in the family is not 1/2 but rather 1/3. 2 This problem and others like it are discussed in Bar-Hillel and Falk.19 These authors stress that the answer to conditional probabilities of this kind can change depending upon how the information given was actually obtained. For example, they show that 1/2 is the correct answer for the following scenario. Example 4.26 Mr. Smith is the father of two. We meet him walking along the street with a young boy whom he proudly introduces as his son. What is the probability that Mr. Smith’s other child is also a boy? As usual we have to make some additional assumptions. For example, we will assume that if Mr. Smith has a boy and a girl, he is equally likely to choose either one to accompany him on his walk. In Figure 4.13 we show the tree analysis of this problem and we see that 1/2 is, indeed, the correct answer. 2 Example 4.27 It is not so easy to think of reasonable scenarios that would lead to the classical 1/3 answer. An attempt was made by Stephen Geller in proposing this problem to Marilyn vos Savant.20 Geller’s problem is as follows: A shopkeeper says she has two new baby beagles to show you, but she doesn’t know whether they’re both male, both female, or one of each sex. You tell her that you want only a male, and she telephones the fellow who’s giving them a bath. “Is at least one a male?” 19M. Bar-Hillel and R. Falk, “Some teasers concerning conditional probabilities,” Cognition, vol. 11 (1982), pgs. 109-122. 20M. vos Savant, “Ask Marilyn,” Parade Magazine, 9 September; 2 December; 17 February 1990, reprinted in Marilyn vos Savant, Ask Marilyn, St. Martins, New York, 1992. | prob_Page_184_Chunk5023 |
4.3. PARADOXES 177 Mr.Smith's children Walking with Mr.Smith Unconditional probability Mr.Smith's children Walking with Mr. Smith Unconditional probability b bb b g g g b 1/4 1/8 1/8 1/8 1/8 1/4 1/4 1/4 1/4 1/4 1 1/2 1/2 1/2 1/2 1 bg gb gg b bb b b 1/4 1/8 1/8 1/4 1/4 1/4 1 1/2 1/2 bg gb Conditional probability 1/2 1/4 1/4 Figure 4.13: Tree for Example 4.26. | prob_Page_185_Chunk5024 |
178 CHAPTER 4. CONDITIONAL PROBABILITY she asks. “Yes,” she informs you with a smile. What is the probability that the other one is male? The reader is asked to decide whether the model which gives an answer of 1/3 is a reasonable one to use in this case. 2 In the preceding examples, the apparent paradoxes could easily be resolved by clearly stating the model that is being used and the assumptions that are being made. We now turn to some examples in which the paradoxes are not so easily resolved. Example 4.28 Two envelopes each contain a certain amount of money. One en- velope is given to Ali and the other to Baba and they are told that one envelope contains twice as much money as the other. However, neither knows who has the larger prize. Before anyone has opened their envelope, Ali is asked if she would like to trade her envelope with Baba. She reasons as follows: Assume that the amount in my envelope is x. If I switch, I will end up with x/2 with probability 1/2, and 2x with probability 1/2. If I were given the opportunity to play this game many times, and if I were to switch each time, I would, on average, get 1 2 x 2 + 1 22x = 5 4x . This is greater than my average winnings if I didn’t switch. Of course, Baba is presented with the same opportunity and reasons in the same way to conclude that he too would like to switch. So they switch and each thinks that his/her net worth just went up by 25%. Since neither has yet opened any envelope, this process can be repeated and so again they switch. Now they are back with their original envelopes and yet they think that their fortune has increased 25% twice. By this reasoning, they could convince themselves that by repeatedly switching the envelopes, they could become arbitrarily wealthy. Clearly, something is wrong with the above reasoning, but where is the mistake? One of the tricks of making paradoxes is to make them slightly more difficult than is necessary to further befuddle us. As John Finn has suggested, in this paradox we could just have well started with a simpler problem. Suppose Ali and Baba know that I am going to give then either an envelope with $5 or one with $10 and I am going to toss a coin to decide which to give to Ali, and then give the other to Baba. Then Ali can argue that Baba has 2x with probability 1/2 and x/2 with probability 1/2. This leads Ali to the same conclusion as before. But now it is clear that this is nonsense, since if Ali has the envelope containing $5, Baba cannot possibly have half of this, namely $2.50, since that was not even one of the choices. Similarly, if Ali has $10, Baba cannot have twice as much, namely $20. In fact, in this simpler problem the possibly outcomes are given by the tree diagram in Figure 4.14. From the diagram, it is clear that neither is made better offby switching. 2 In the above example, Ali’s reasoning is incorrect because he infers that if the amount in his envelope is x, then the probability that his envelope contains the | prob_Page_186_Chunk5025 |
4.3. PARADOXES 179 $5 $10 $10 $5 1/2 1/2 1/2 1 1 1/2 In Ali's envelope In Baba's envelope Figure 4.14: John Finn’s version of Example 4.28. smaller amount is 1/2, and the probability that her envelope contains the larger amount is also 1/2. In fact, these conditional probabilities depend upon the distri- bution of the amounts that are placed in the envelopes. For definiteness, let X denote the positive integer-valued random variable which represents the smaller of the two amounts in the envelopes. Suppose, in addition, that we are given the distribution of X, i.e., for each positive integer x, we are given the value of px = P(X = x) . (In Finn’s example, p5 = 1, and pn = 0 for all other values of n.) Then it is easy to calculate the conditional probability that an envelope contains the smaller amount, given that it contains x dollars. The two possible sample points are (x, x/2) and (x, 2x). If x is odd, then the first sample point has probability 0, since x/2 is not an integer, so the desired conditional probability is 1 that x is the smaller amount. If x is even, then the two sample points have probabilities px/2 and px, respectively, so the conditional probability that x is the smaller amount is px px/2 + px , which is not necessarily equal to 1/2. Steven Brams and D. Marc Kilgour21 study the problem, for different distri- butions, of whether or not one should switch envelopes, if one’s objective is to maximize the long-term average winnings. Let x be the amount in your envelope. They show that for any distribution of X, there is at least one value of x such that you should switch. They give an example of a distribution for which there is exactly one value of x such that you should switch (see Exercise 5). Perhaps the most interesting case is a distribution in which you should always switch. We now give this example. Example 4.29 Suppose that we have two envelopes in front of us, and that one envelope contains twice the amount of money as the other (both amounts are pos- itive integers). We are given one of the envelopes, and asked if we would like to switch. 21S. J. Brams and D. M. Kilgour, “The Box Problem: To Switch or Not to Switch,” Mathematics Magazine, vol. 68, no. 1 (1995), p. 29. | prob_Page_187_Chunk5026 |
180 CHAPTER 4. CONDITIONAL PROBABILITY As above, we let X denote the smaller of the two amounts in the envelopes, and let px = P(X = x) . We are now in a position where we can calculate the long-term average winnings, if we switch. (This long-term average is an example of a probabilistic concept known as expectation, and will be discussed in Chapter 6.) Given that one of the two sample points has occurred, the probability that it is the point (x, x/2) is px/2 px/2 + px , and the probability that it is the point (x, 2x) is px px/2 + px . Thus, if we switch, our long-term average winnings are px/2 px/2 + px x 2 + px px/2 + px 2x . If this is greater than x, then it pays in the long run for us to switch. Some routine algebra shows that the above expression is greater than x if and only if px/2 px/2 + px < 2 3 . (4.6) It is interesting to consider whether there is a distribution on the positive integers such that the inequality 4.6 is true for all even values of x. Brams and Kilgour22 give the following example. We define px as follows: px = ( 1 3 2 3 k−1 , if x = 2k, 0, otherwise. It is easy to calculate (see Exercise 4) that for all relevant values of x, we have px/2 px/2 + px = 3 5 , which means that the inequality 4.6 is always true. 2 So far, we have been able to resolve paradoxes by clearly stating the assumptions being made and by precisely stating the models being used. We end this section by describing a paradox which we cannot resolve. Example 4.30 Suppose that we have two envelopes in front of us, and we are told that the envelopes contain X and Y dollars, respectively, where X and Y are different positive integers. We randomly choose one of the envelopes, and we open 22ibid. | prob_Page_188_Chunk5027 |
4.3. PARADOXES 181 it, revealing X, say. Is it possible to determine, with probability greater than 1/2, whether X is the smaller of the two dollar amounts? Even if we have no knowledge of the joint distribution of X and Y , the surprising answer is yes! Here’s how to do it. Toss a fair coin until the first time that heads turns up. Let Z denote the number of tosses required plus 1/2. If Z > X, then we say that X is the smaller of the two amounts, and if Z < X, then we say that X is the larger of the two amounts. First, if Z lies between X and Y , then we are sure to be correct. Since X and Y are unequal, Z lies between them with positive probability. Second, if Z is not between X and Y , then Z is either greater than both X and Y , or is less than both X and Y . In either case, X is the smaller of the two amounts with probability 1/2, by symmetry considerations (remember, we chose the envelope at random). Thus, the probability that we are correct is greater than 1/2. 2 Exercises 1 One of the first conditional probability paradoxes was provided by Bertrand.23 It is called the Box Paradox. A cabinet has three drawers. In the first drawer there are two gold balls, in the second drawer there are two silver balls, and in the third drawer there is one silver and one gold ball. A drawer is picked at random and a ball chosen at random from the two balls in the drawer. Given that a gold ball was drawn, what is the probability that the drawer with the two gold balls was chosen? 2 The following problem is called the two aces problem. This problem, dat- ing back to 1936, has been attributed to the English mathematician J. H. C. Whitehead (see Gridgeman24). This problem was also submitted to Mar- ilyn vos Savant by the master of mathematical puzzles Martin Gardner, who remarks that it is one of his favorites. A bridge hand has been dealt, i. e. thirteen cards are dealt to each player. Given that your partner has at least one ace, what is the probability that he has at least two aces? Given that your partner has the ace of hearts, what is the probability that he has at least two aces? Answer these questions for a version of bridge in which there are eight cards, namely four aces and four kings, and each player is dealt two cards. (The reader may wish to solve the problem with a 52-card deck.) 3 In the preceding exercise, it is natural to ask “How do we get the information that the given hand has an ace?” Gridgeman considers two different ways that we might get this information. (Again, assume the deck consists of eight cards.) (a) Assume that the person holding the hand is asked to “Name an ace in your hand” and answers “The ace of hearts.” What is the probability that he has a second ace? 23J. Bertrand, Calcul des Probabilit´es, Gauthier-Uillars, 1888. 24N. T. Gridgeman, Letter, American Statistician, 21 (1967), pgs. 38-39. | prob_Page_189_Chunk5028 |
182 CHAPTER 4. CONDITIONAL PROBABILITY (b) Suppose the person holding the hand is asked the more direct question “Do you have the ace of hearts?” and the answer is yes. What is the probability that he has a second ace? 4 Using the notation introduced in Example 4.29, show that in the example of Brams and Kilgour, if x is a positive power of 2, then px/2 px/2 + px = 3 5 . 5 Using the notation introduced in Example 4.29, let px = ( 2 3 1 3 k , if x = 2k, 0, otherwise. Show that there is exactly one value of x such that if your envelope contains x, then you should switch. *6 (For bridge players only. From Sutherland.25) Suppose that we are the de- clarer in a hand of bridge, and we have the king, 9, 8, 7, and 2 of a certain suit, while the dummy has the ace, 10, 5, and 4 of the same suit. Suppose that we want to play this suit in such a way as to maximize the probability of having no losers in the suit. We begin by leading the 2 to the ace, and we note that the queen drops on our left. We then lead the 10 from the dummy, and our right-hand opponent plays the six (after playing the three on the first round). Should we finesse or play for the drop? 25E. Sutherland, “Restricted Choice — Fact or Fiction?”, Canadian Master Point, November 1, 1993. | prob_Page_190_Chunk5029 |
Chapter 5 Important Distributions and Densities 5.1 Important Distributions In this chapter, we describe the discrete probability distributions and the continuous probability densities that occur most often in the analysis of experiments. We will also show how one simulates these distributions and densities on a computer. Discrete Uniform Distribution In Chapter 1, we saw that in many cases, we assume that all outcomes of an exper- iment are equally likely. If X is a random variable which represents the outcome of an experiment of this type, then we say that X is uniformly distributed. If the sample space S is of size n, where 0 < n < ∞, then the distribution function m(ω) is defined to be 1/n for all ω ∈S. As is the case with all of the discrete probabil- ity distributions discussed in this chapter, this experiment can be simulated on a computer using the program GeneralSimulation. However, in this case, a faster algorithm can be used instead. (This algorithm was described in Chapter 1; we repeat the description here for completeness.) The expression 1 + ⌊n (rnd)⌋ takes on as a value each integer between 1 and n with probability 1/n (the notation ⌊x⌋denotes the greatest integer not exceeding x). Thus, if the possible outcomes of the experiment are labelled ω1 ω2, . . . , ωn, then we use the above expression to represent the subscript of the output of the experiment. If the sample space is a countably infinite set, such as the set of positive integers, then it is not possible to have an experiment which is uniform on this set (see Exercise 3). If the sample space is an uncountable set, with positive, finite length, such as the interval [0, 1], then we use continuous density functions (see Section 5.2). 183 | prob_Page_191_Chunk5030 |
184 CHAPTER 5. DISTRIBUTIONS AND DENSITIES Binomial Distribution The binomial distribution with parameters n, p, and k was defined in Chapter 3. It is the distribution of the random variable which counts the number of heads which occur when a coin is tossed n times, assuming that on any one toss, the probability that a head occurs is p. The distribution function is given by the formula b(n, p, k) = n k pkqn−k , where q = 1 −p. One straightforward way to simulate a binomial random variable X is to compute the sum of n independent 0−1 random variables, each of which take on the value 1 with probability p. This method requires n calls to a random number generator to obtain one value of the random variable. When n is relatively large (say at least 30), the Central Limit Theorem (see Chapter 9) implies that the binomial distribution is well-approximated by the corresponding normal density function (which is defined in Section 5.2) with parameters µ = np and σ = √npq. Thus, in this case we can compute a value Y of a normal random variable with these parameters, and if −1/2 ≤Y < n + 1/2, we can use the value ⌊Y + 1/2⌋ to represent the random variable X. If Y < −1/2 or Y > n + 1/2, we reject Y and compute another value. We will see in the next section how we can quickly simulate normal random variables. Geometric Distribution Consider a Bernoulli trials process continued for an infinite number of trials; for example, a coin tossed an infinite sequence of times. We showed in Section 2.2 how to assign a probability distribution to the infinite tree. Thus, we can determine the distribution for any random variable X relating to the experiment provided P(X = a) can be computed in terms of a finite number of trials. For example, let T be the number of trials up to and including the first success. Then P(T = 1) = p , P(T = 2) = qp , P(T = 3) = q2p , and in general, P(T = n) = qn−1p . To show that this is a distribution, we must show that p + qp + q2p + · · · = 1 . | prob_Page_192_Chunk5031 |
5.1. IMPORTANT DISTRIBUTIONS 185 5 10 15 20 0 0.2 0.4 p = .5 5 10 15 20 0 0.05 0.1 0.15 0.2 p = .2 Figure 5.1: Geometric distributions. The left-hand expression is just a geometric series with first term p and common ratio q, so its sum is p 1 −q which equals 1. In Figure 5.1 we have plotted this distribution using the program Geometric- Plot for the cases p = .5 and p = .2. We see that as p decreases we are more likely to get large values for T, as would be expected. In both cases, the most probable value for T is 1. This will always be true since P(T = j + 1) P(T = j) = q < 1 . In general, if 0 < p < 1, and q = 1 −p, then we say that the random variable T has a geometric distribution if P(T = j) = qj−1p , for j = 1, 2, 3, . . . . To simulate the geometric distribution with parameter p, we can simply compute a sequence of random numbers in [0, 1), stopping when an entry does not exceed p. However, for small values of p, this is time-consuming (taking, on the average, 1/p steps). We now describe a method whose running time does not depend upon the size of p. Define Y to be the smallest integer satisfying the inequality 1 −qY ≥rnd . (5.1) Then we have P(Y = j) = P 1 −qj ≥rnd > 1 −qj−1 = qj−1 −qj = qj−1(1 −q) = qj−1p . | prob_Page_193_Chunk5032 |
186 CHAPTER 5. DISTRIBUTIONS AND DENSITIES Thus, Y is geometrically distributed with parameter p. To generate Y , all we have to do is solve Equation 5.1 for Y . We obtain Y = & log(1 −rnd) log q ' , where the notation ⌈x⌉means the least integer which is greater than or equal to x. Since log(1−rnd) and log(rnd) are identically distributed, Y can also be generated using the equation Y = & log rnd log q ' . Example 5.1 The geometric distribution plays an important role in the theory of queues, or waiting lines. For example, suppose a line of customers waits for service at a counter. It is often assumed that, in each small time unit, either 0 or 1 new customers arrive at the counter. The probability that a customer arrives is p and that no customer arrives is q = 1 −p. Then the time T until the next arrival has a geometric distribution. It is natural to ask for the probability that no customer arrives in the next k time units, that is, for P(T > k). This is given by P(T > k) = ∞ X j=k+1 qj−1p = qk(p + qp + q2p + · · ·) = qk . This probability can also be found by noting that we are asking for no successes (i.e., arrivals) in a sequence of k consecutive time units, where the probability of a success in any one time unit is p. Thus, the probability is just qk, since arrivals in any two time units are independent events. It is often assumed that the length of time required to service a customer also has a geometric distribution but with a different value for p. This implies a rather special property of the service time. To see this, let us compute the conditional probability P(T > r + s | T > r) = P(T > r + s) P(T > r) = qr+s qr = qs . Thus, the probability that the customer’s service takes s more time units is inde- pendent of the length of time r that the customer has already been served. Because of this interpretation, this property is called the “memoryless” property, and is also obeyed by the exponential distribution. (Fortunately, not too many service stations have this property.) 2 Negative Binomial Distribution Suppose we are given a coin which has probability p of coming up heads when it is tossed. We fix a positive integer k, and toss the coin until the kth head appears. We | prob_Page_194_Chunk5033 |
5.1. IMPORTANT DISTRIBUTIONS 187 let X represent the number of tosses. When k = 1, X is geometrically distributed. For a general k, we say that X has a negative binomial distribution. We now calculate the probability distribution of X. If X = x, then it must be true that there were exactly k −1 heads thrown in the first x −1 tosses, and a head must have been thrown on the xth toss. There are x −1 k −1 sequences of length x with these properties, and each of them is assigned the same probability, namely pk−1qx−k . Therefore, if we define u(x, k, p) = P(X = x) , then u(x, k, p) = x −1 k −1 pkqx−k . One can simulate this on a computer by simulating the tossing of a coin. The following algorithm is, in general, much faster. We note that X can be understood as the sum of k outcomes of a geometrically distributed experiment with parameter p. Thus, we can use the following sum as a means of generating X: k X j=1 & log rndj log q ' . Example 5.2 A fair coin is tossed until the second time a head turns up. The distribution for the number of tosses is u(x, 2, p). Thus the probability that x tosses are needed to obtain two heads is found by letting k = 2 in the above formula. We obtain u(x, 2, 1/2) = x −1 1 1 2x , for x = 2, 3, . . . . In Figure 5.2 we give a graph of the distribution for k = 2 and p = .25. Note that the distribution is quite asymmetric, with a long tail reflecting the fact that large values of x are possible. 2 Poisson Distribution The Poisson distribution arises in many situations. It is safe to say that it is one of the three most important discrete probability distributions (the other two being the uniform and the binomial distributions). The Poisson distribution can be viewed as arising from the binomial distribution or from the exponential density. We shall now explain its connection with the former; its connection with the latter will be explained in the next section. | prob_Page_195_Chunk5034 |
188 CHAPTER 5. DISTRIBUTIONS AND DENSITIES 5 10 15 20 25 30 0 0.02 0.04 0.06 0.08 0.1 Figure 5.2: Negative binomial distribution with k = 2 and p = .25. Suppose that we have a situation in which a certain kind of occurrence happens at random over a period of time. For example, the occurrences that we are interested in might be incoming telephone calls to a police station in a large city. We want to model this situation so that we can consider the probabilities of events such as more than 10 phone calls occurring in a 5-minute time interval. Presumably, in our example, there would be more incoming calls between 6:00 and 7:00 P.M. than between 4:00 and 5:00 A.M., and this fact would certainly affect the above probability. Thus, to have a hope of computing such probabilities, we must assume that the average rate, i.e., the average number of occurrences per minute, is a constant. This rate we will denote by λ. (Thus, in a given 5-minute time interval, we would expect about 5λ occurrences.) This means that if we were to apply our model to the two time periods given above, we would simply use different rates for the two time periods, thereby obtaining two different probabilities for the given event. Our next assumption is that the number of occurrences in two non-overlapping time intervals are independent. In our example, this means that the events that there are j calls between 5:00 and 5:15 P.M. and k calls between 6:00 and 6:15 P.M. on the same day are independent. We can use the binomial distribution to model this situation. We imagine that a given time interval is broken up into n subintervals of equal length. If the subin- tervals are sufficiently short, we can assume that two or more occurrences happen in one subinterval with a probability which is negligible in comparison with the probability of at most one occurrence. Thus, in each subinterval, we are assuming that there is either 0 or 1 occurrence. This means that the sequence of subintervals can be thought of as a sequence of Bernoulli trials, with a success corresponding to an occurrence in the subinterval. | prob_Page_196_Chunk5035 |
5.1. IMPORTANT DISTRIBUTIONS 189 To decide upon the proper value of p, the probability of an occurrence in a given subinterval, we reason as follows. On the average, there are λt occurrences in a time interval of length t. If this time interval is divided into n subintervals, then we would expect, using the Bernoulli trials interpretation, that there should be np occurrences. Thus, we want λt = np , so p = λt n . We now wish to consider the random variable X, which counts the number of occurrences in a given time interval. We want to calculate the distribution of X. For ease of calculation, we will assume that the time interval is of length 1; for time intervals of arbitrary length t, see Exercise 11. We know that P(X = 0) = b(n, p, 0) = (1 −p)n = 1 −λ n n . For large n, this is approximately e−λ. It is easy to calculate that for any fixed k, we have b(n, p, k) b(n, p, k −1) = λ −(k −1)p kq which, for large n (and therefore small p) is approximately λ/k. Thus, we have P(X = 1) ≈λe−λ , and in general, P(X = k) ≈λk k! e−λ . (5.2) The above distribution is the Poisson distribution. We note that it must be checked that the distribution given in Equation 5.2 really is a distribution, i.e., that its values are non-negative and sum to 1. (See Exercise 12.) The Poisson distribution is used as an approximation to the binomial distribu- tion when the parameters n and p are large and small, respectively (see Examples 5.3 and 5.4). However, the Poisson distribution also arises in situations where it may not be easy to interpret or measure the parameters n and p (see Example 5.5). Example 5.3 A typesetter makes, on the average, one mistake per 1000 words. Assume that he is setting a book with 100 words to a page. Let S100 be the number of mistakes that he makes on a single page. Then the exact probability distribution for S100 would be obtained by considering S100 as a result of 100 Bernoulli trials with p = 1/1000. The expected value of S100 is λ = 100(1/1000) = .1. The exact probability that S100 = j is b(100, 1/1000, j), and the Poisson approximation is e−.1(.1)j j! . In Table 5.1 we give, for various values of n and p, the exact values computed by the binomial distribution and the Poisson approximation. 2 | prob_Page_197_Chunk5036 |
190 CHAPTER 5. DISTRIBUTIONS AND DENSITIES Poisson Binomial Poisson Binomial Poisson Binomial n = 100 n = 100 n = 1000 j λ = .1 p = .001 λ = 1 p = .01 λ = 10 p = .01 0 .9048 .9048 .3679 .3660 .0000 .0000 1 .0905 .0905 .3679 .3697 .0005 .0004 2 .0045 .0045 .1839 .1849 .0023 .0022 3 .0002 .0002 .0613 .0610 .0076 .0074 4 .0000 .0000 .0153 .0149 .0189 .0186 5 .0031 .0029 .0378 .0374 6 .0005 .0005 .0631 .0627 7 .0001 .0001 .0901 .0900 8 .0000 .0000 .1126 .1128 9 .1251 .1256 10 .1251 .1257 11 .1137 .1143 12 .0948 .0952 13 .0729 .0731 14 .0521 .0520 15 .0347 .0345 16 .0217 .0215 17 .0128 .0126 18 .0071 .0069 19 .0037 .0036 20 .0019 .0018 21 .0009 .0009 22 .0004 .0004 23 .0002 .0002 24 .0001 .0001 25 .0000 .0000 Table 5.1: Poisson approximation to the binomial distribution. | prob_Page_198_Chunk5037 |
5.1. IMPORTANT DISTRIBUTIONS 191 Example 5.4 In his book,1 Feller discusses the statistics of flying bomb hits in the south of London during the Second World War. Assume that you live in a district of size 10 blocks by 10 blocks so that the total district is divided into 100 small squares. How likely is it that the square in which you live will receive no hits if the total area is hit by 400 bombs? We assume that a particular bomb will hit your square with probability 1/100. Since there are 400 bombs, we can regard the number of hits that your square receives as the number of successes in a Bernoulli trials process with n = 400 and p = 1/100. Thus we can use the Poisson distribution with λ = 400 · 1/100 = 4 to approximate the probability that your square will receive j hits. This probability is p(j) = e−44j/j!. The expected number of squares that receive exactly j hits is then 100 · p(j). It is easy to write a program LondonBombs to simulate this situation and compare the expected number of squares with j hits with the observed number. In Exercise 26 you are asked to compare the actual observed data with that predicted by the Poisson distribution. In Figure 5.3, we have shown the simulated hits, together with a spike graph showing both the observed and predicted frequencies. The observed frequencies are shown as squares, and the predicted frequencies are shown as dots. 2 If the reader would rather not consider flying bombs, he is invited to instead consider an analogous situation involving cookies and raisins. We assume that we have made enough cookie dough for 500 cookies. We put 600 raisins in the dough, and mix it thoroughly. One way to look at this situation is that we have 500 cookies, and after placing the cookies in a grid on the table, we throw 600 raisins at the cookies. (See Exercise 22.) Example 5.5 Suppose that in a certain fixed amount A of blood, the average human has 40 white blood cells. Let X be the random variable which gives the number of white blood cells in a random sample of size A from a random individual. We can think of X as binomially distributed with each white blood cell in the body representing a trial. If a given white blood cell turns up in the sample, then the trial corresponding to that blood cell was a success. Then p should be taken as the ratio of A to the total amount of blood in the individual, and n will be the number of white blood cells in the individual. Of course, in practice, neither of these parameters is very easy to measure accurately, but presumably the number 40 is easy to measure. But for the average human, we then have 40 = np, so we can think of X as being Poisson distributed, with parameter λ = 40. In this case, it is easier to model the situation using the Poisson distribution than the binomial distribution. 2 To simulate a Poisson random variable on a computer, a good way is to take advantage of the relationship between the Poisson distribution and the exponential density. This relationship and the resulting simulation algorithm will be described in the next section. 1ibid., p. 161. | prob_Page_199_Chunk5038 |
192 CHAPTER 5. DISTRIBUTIONS AND DENSITIES 0 2 4 6 8 10 0 0.05 0.1 0.15 0.2 Figure 5.3: Flying bomb hits. | prob_Page_200_Chunk5039 |
5.1. IMPORTANT DISTRIBUTIONS 193 Hypergeometric Distribution Suppose that we have a set of N balls, of which k are red and N −k are blue. We choose n of these balls, without replacement, and define X to be the number of red balls in our sample. The distribution of X is called the hypergeometric distribution. We note that this distribution depends upon three parameters, namely N, k, and n. There does not seem to be a standard notation for this distribution; we will use the notation h(N, k, n, x) to denote P(X = x). This probability can be found by noting that there are N n different samples of size n, and the number of such samples with exactly x red balls is obtained by multiplying the number of ways of choosing x red balls from the set of k red balls and the number of ways of choosing n −x blue balls from the set of N −k blue balls. Hence, we have h(N, k, n, x) = | prob_Page_201_Chunk5040 |
194 CHAPTER 5. DISTRIBUTIONS AND DENSITIES Democrat Republican Female 24 4 28 Male 8 14 22 32 18 50 Table 5.2: Observed data. Democrat Republican Female s11 s12 t11 Male s21 s22 t12 t21 t22 n Table 5.3: General data table. nail down what is meant by “quite a bit,” we decide which possible data sets differ from the expected data set by at least as much as ours does, and then we compute the probability that any of these data sets would occur under the assumption of independence of traits. If this probability is small, then it is unlikely that the difference between our collected data set and the expected data set is due entirely to chance. Suppose that we have collected the data shown in Table 5.2. The row and column sums are called marginal totals, or marginals. In what follows, we will denote the row sums by t11 and t12, and the column sums by t21 and t22. The ijth entry in the table will be denoted by sij. Finally, the size of the data set will be denoted by n. Thus, a general data table will look as shown in Table 5.3. We now explain the model which will be used to construct the “expected” data set. In the model, we assume that the two traits are independent. We then put t21 yellow balls and t22 green balls, corresponding to the Democratic and Republican marginals, into an urn. We draw t11 balls, without replacement, from the urn, and call these balls females. The t12 balls remaining in the urn are called males. In the specific case under consideration, the probability of getting the actual data under this model is given by the expression | prob_Page_202_Chunk5041 |
5.1. IMPORTANT DISTRIBUTIONS 195 Democrat Republican Female 18 10 28 Male 14 8 22 32 18 50 Table 5.4: Expected data. of drawing exactly a yellow balls, i.e., what is the probability that s11 = a? It is | prob_Page_203_Chunk5042 |
196 CHAPTER 5. DISTRIBUTIONS AND DENSITIES 2 4 6 8 0 0.05 0.1 0.15 0.2 0.25 0.3 Figure 5.4: Leading digits in President Clinton’s tax returns. Theodore Hill2 gives a general description of the Benford distribution, when one considers the first d digits of integers in a data set. We will restrict our attention to the first digit. In this case, the Benford distribution has distribution function f(k) = log10(k + 1) −log10(k) , for 1 ≤k ≤9. Mark Nigrini3 has advocated the use of the Benford distribution as a means of testing suspicious financial records such as bookkeeping entries, checks, and tax returns. His idea is that if someone were to “make up” numbers in these cases, the person would probably produce numbers that are fairly uniformly distributed, while if one were to use the actual numbers, the leading digits would roughly follow the Benford distribution. As an example, Nigrini analyzed President Clinton’s tax returns for a 13-year period. In Figure 5.4, the Benford distribution values are shown as squares, and the President’s tax return data are shown as circles. One sees that in this example, the Benford distribution fits the data very well. This distribution was discovered by the astronomer Simon Newcomb who stated the following in his paper on the subject: “That the ten digits do not occur with equal frequency must be evident to anyone making use of logarithm tables, and noticing how much faster the first pages wear out than the last ones. The first significant figure is oftener 1 than any other digit, and the frequency diminishes up to 9.”4 2T. P. Hill, “The Significant Digit Phenomenon,” American Mathematical Monthly, vol. 102, no. 4 (April 1995), pgs. 322-327. 3M. Nigrini, “Detecting Biases and Irregularities in Tabulated Data,” working paper 4S. Newcomb, “Note on the frequency of use of the different digits in natural numbers,” Amer- ican Journal of Mathematics, vol. 4 (1881), pgs. 39-40. | prob_Page_204_Chunk5043 |
5.1. IMPORTANT DISTRIBUTIONS 197 Exercises 1 For which of the following random variables would it be appropriate to assign a uniform distribution? (a) Let X represent the roll of one die. (b) Let X represent the number of heads obtained in three tosses of a coin. (c) A roulette wheel has 38 possible outcomes: 0, 00, and 1 through 36. Let X represent the outcome when a roulette wheel is spun. (d) Let X represent the birthday of a randomly chosen person. (e) Let X represent the number of tosses of a coin necessary to achieve a head for the first time. 2 Let n be a positive integer. Let S be the set of integers between 1 and n. Consider the following process: We remove a number from S at random and write it down. We repeat this until S is empty. The result is a permutation of the integers from 1 to n. Let X denote this permutation. Is X uniformly distributed? 3 Let X be a random variable which can take on countably many values. Show that X cannot be uniformly distributed. 4 Suppose we are attending a college which has 3000 students. We wish to choose a subset of size 100 from the student body. Let X represent the subset, chosen using the following possible strategies. For which strategies would it be appropriate to assign the uniform distribution to X? If it is appropriate, what probability should we assign to each outcome? (a) Take the first 100 students who enter the cafeteria to eat lunch. (b) Ask the Registrar to sort the students by their Social Security number, and then take the first 100 in the resulting list. (c) Ask the Registrar for a set of cards, with each card containing the name of exactly one student, and with each student appearing on exactly one card. Throw the cards out of a third-story window, then walk outside and pick up the first 100 cards that you find. 5 Under the same conditions as in the preceding exercise, can you describe a procedure which, if used, would produce each possible outcome with the same probability? Can you describe such a procedure that does not rely on a computer or a calculator? 6 Let X1, X2, . . . , Xn be n mutually independent random variables, each of which is uniformly distributed on the integers from 1 to k. Let Y denote the minimum of the Xi’s. Find the distribution of Y . 7 A die is rolled until the first time T that a six turns up. (a) What is the probability distribution for T? | prob_Page_205_Chunk5044 |
198 CHAPTER 5. DISTRIBUTIONS AND DENSITIES (b) Find P(T > 3). (c) Find P(T > 6|T > 3). 8 If a coin is tossed a sequence of times, what is the probability that the first head will occur after the fifth toss, given that it has not occurred in the first two tosses? 9 A worker for the Department of Fish and Game is assigned the job of esti- mating the number of trout in a certain lake of modest size. She proceeds as follows: She catches 100 trout, tags each of them, and puts them back in the lake. One month later, she catches 100 more trout, and notes that 10 of them have tags. (a) Without doing any fancy calculations, give a rough estimate of the num- ber of trout in the lake. (b) Let N be the number of trout in the lake. Find an expression, in terms of N, for the probability that the worker would catch 10 tagged trout out of the 100 trout that she caught the second time. (c) Find the value of N which maximizes the expression in part (b). This value is called the maximum likelihood estimate for the unknown quantity N. Hint: Consider the ratio of the expressions for successive values of N. 10 A census in the United States is an attempt to count everyone in the country. It is inevitable that many people are not counted. The U. S. Census Bureau proposed a way to estimate the number of people who were not counted by the latest census. Their proposal was as follows: In a given locality, let N denote the actual number of people who live there. Assume that the census counted n1 people living in this area. Now, another census was taken in the locality, and n2 people were counted. In addition, n12 people were counted both times. (a) Given N, n1, and n2, let X denote the number of people counted both times. Find the probability that X = k, where k is a fixed positive integer between 0 and n2. (b) Now assume that X = n12. Find the value of N which maximizes the expression in part (a). Hint: Consider the ratio of the expressions for successive values of N. 11 Suppose that X is a random variable which represents the number of calls coming in to a police station in a one-minute interval. In the text, we showed that X could be modelled using a Poisson distribution with parameter λ, where this parameter represents the average number of incoming calls per minute. Now suppose that Y is a random variable which represents the num- ber of incoming calls in an interval of length t. Show that the distribution of Y is given by P(Y = k) = e−λt (λt)k k! , | prob_Page_206_Chunk5045 |
5.1. IMPORTANT DISTRIBUTIONS 199 i.e., Y is Poisson with parameter λt. Hint: Suppose a Martian were to observe the police station. Let us also assume that the basic time interval used on Mars is exactly t Earth minutes. Finally, we will assume that the Martian understands the derivation of the Poisson distribution in the text. What would she write down for the distribution of Y ? 12 Show that the values of the Poisson distribution given in Equation 5.2 sum to 1. 13 The Poisson distribution with parameter λ = .3 has been assigned for the outcome of an experiment. Let X be the outcome function. Find P(X = 0), P(X = 1), and P(X > 1). 14 On the average, only 1 person in 1000 has a particular rare blood type. (a) Find the probability that, in a city of 10,000 people, no one has this blood type. (b) How many people would have to be tested to give a probability greater than 1/2 of finding at least one person with this blood type? 15 Write a program for the user to input n, p, j and have the program print out the exact value of b(n, p, k) and the Poisson approximation to this value. 16 Assume that, during each second, a Dartmouth switchboard receives one call with probability .01 and no calls with probability .99. Use the Poisson ap- proximation to estimate the probability that the operator will miss at most one call if she takes a 5-minute coffee break. 17 The probability of a royal flush in a poker hand is p = 1/649,740. How large must n be to render the probability of having no royal flush in n hands smaller than 1/e? 18 A baker blends 600 raisins and 400 chocolate chips into a dough mix and, from this, makes 500 cookies. (a) Find the probability that a randomly picked cookie will have no raisins. (b) Find the probability that a randomly picked cookie will have exactly two chocolate chips. (c) Find the probability that a randomly chosen cookie will have at least two bits (raisins or chips) in it. 19 The probability that, in a bridge deal, one of the four hands has all hearts is approximately 6.3 × 10−12. In a city with about 50,000 bridge players the resident probability expert is called on the average once a year (usually late at night) and told that the caller has just been dealt a hand of all hearts. Should she suspect that some of these callers are the victims of practical jokes? | prob_Page_207_Chunk5046 |
200 CHAPTER 5. DISTRIBUTIONS AND DENSITIES 20 An advertiser drops 10,000 leaflets on a city which has 2000 blocks. Assume that each leaflet has an equal chance of landing on each block. What is the probability that a particular block will receive no leaflets? 21 In a class of 80 students, the professor calls on 1 student chosen at random for a recitation in each class period. There are 32 class periods in a term. (a) Write a formula for the exact probability that a given student is called upon j times during the term. (b) Write a formula for the Poisson approximation for this probability. Using your formula estimate the probability that a given student is called upon more than twice. 22 Assume that we are making raisin cookies. We put a box of 600 raisins into our dough mix, mix up the dough, then make from the dough 500 cookies. We then ask for the probability that a randomly chosen cookie will have 0, 1, 2, . . . raisins. Consider the cookies as trials in an experiment, and let X be the random variable which gives the number of raisins in a given cookie. Then we can regard the number of raisins in a cookie as the result of n = 600 independent trials with probability p = 1/500 for success on each trial. Since n is large and p is small, we can use the Poisson approximation with λ = 600(1/500) = 1.2. Determine the probability that a given cookie will have at least five raisins. 23 For a certain experiment, the Poisson distribution with parameter λ = m has been assigned. Show that a most probable outcome for the experiment is the integer value k such that m −1 ≤k ≤m. Under what conditions will there be two most probable values? Hint: Consider the ratio of successive probabilities. 24 When John Kemeny was chair of the Mathematics Department at Dartmouth College, he received an average of ten letters each day. On a certain weekday he received no mail and wondered if it was a holiday. To decide this he computed the probability that, in ten years, he would have at least 1 day without any mail. He assumed that the number of letters he received on a given day has a Poisson distribution. What probability did he find? Hint: Apply the Poisson distribution twice. First, to find the probability that, in 3000 days, he will have at least 1 day without mail, assuming each year has about 300 days on which mail is delivered. 25 Reese Prosser never puts money in a 10-cent parking meter in Hanover. He assumes that there is a probability of .05 that he will be caught. The first offense costs nothing, the second costs 2 dollars, and subsequent offenses cost 5 dollars each. Under his assumptions, how does the expected cost of parking 100 times without paying the meter compare with the cost of paying the meter each time? | prob_Page_208_Chunk5047 |
5.1. IMPORTANT DISTRIBUTIONS 201 Number of deaths Number of corps with x deaths in a given year 0 144 1 91 2 32 3 11 4 2 Table 5.5: Mule kicks. 26 Feller5 discusses the statistics of flying bomb hits in an area in the south of London during the Second World War. The area in question was divided into 24 × 24 = 576 small areas. The total number of hits was 537. There were 229 squares with 0 hits, 211 with 1 hit, 93 with 2 hits, 35 with 3 hits, 7 with 4 hits, and 1 with 5 or more. Assuming the hits were purely random, use the Poisson approximation to find the probability that a particular square would have exactly k hits. Compute the expected number of squares that would have 0, 1, 2, 3, 4, and 5 or more hits and compare this with the observed results. 27 Assume that the probability that there is a significant accident in a nuclear power plant during one year’s time is .001. If a country has 100 nuclear plants, estimate the probability that there is at least one such accident during a given year. 28 An airline finds that 4 percent of the passengers that make reservations on a particular flight will not show up. Consequently, their policy is to sell 100 reserved seats on a plane that has only 98 seats. Find the probability that every person who shows up for the flight will find a seat available. 29 The king’s coinmaster boxes his coins 500 to a box and puts 1 counterfeit coin in each box. The king is suspicious, but, instead of testing all the coins in 1 box, he tests 1 coin chosen at random out of each of 500 boxes. What is the probability that he finds at least one fake? What is it if the king tests 2 coins from each of 250 boxes? 30 (From Kemeny6) Show that, if you make 100 bets on the number 17 at roulette at Monte Carlo (see Example 6.13), you will have a probability greater than 1/2 of coming out ahead. What is your expected winning? 31 In one of the first studies of the Poisson distribution, von Bortkiewicz7 con- sidered the frequency of deaths from kicks in the Prussian army corps. From the study of 14 corps over a 20-year period, he obtained the data shown in Table 5.5. Fit a Poisson distribution to this data and see if you think that the Poisson distribution is appropriate. 5ibid., p. 161. 6Private communication. 7L. von Bortkiewicz, Das Gesetz der Kleinen Zahlen (Leipzig: Teubner, 1898), p. 24. | prob_Page_209_Chunk5048 |
202 CHAPTER 5. DISTRIBUTIONS AND DENSITIES 32 It is often assumed that the auto traffic that arrives at the intersection during a unit time period has a Poisson distribution with expected value m. Assume that the number of cars X that arrive at an intersection from the north in unit time has a Poisson distribution with parameter λ = m and the number Y that arrive from the west in unit time has a Poisson distribution with parameter λ = ¯m. If X and Y are independent, show that the total number X + Y that arrive at the intersection in unit time has a Poisson distribution with parameter λ = m + ¯m. 33 Cars coming along Magnolia Street come to a fork in the road and have to choose either Willow Street or Main Street to continue. Assume that the number of cars that arrive at the fork in unit time has a Poisson distribution with parameter λ = 4. A car arriving at the fork chooses Main Street with probability 3/4 and Willow Street with probability 1/4. Let X be the random variable which counts the number of cars that, in a given unit of time, pass by Joe’s Barber Shop on Main Street. What is the distribution of X? 34 In the appeal of the People v. Collins case (see Exercise 4.1.28), the counsel for the defense argued as follows: Suppose, for example, there are 5,000,000 couples in the Los Angeles area and the probability that a randomly chosen couple fits the witnesses’ description is 1/12,000,000. Then the probability that there are two such couples given that there is at least one is not at all small. Find this probability. (The California Supreme Court overturned the initial guilty verdict.) 35 A manufactured lot of brass turnbuckles has S items of which D are defective. A sample of s items is drawn without replacement. Let X be a random variable that gives the number of defective items in the sample. Let p(d) = P(X = d). (a) Show that p(d) = | prob_Page_210_Chunk5049 |
5.1. IMPORTANT DISTRIBUTIONS 203 tagged. Six months later 200 moose are captured and it is found that 8 of these were tagged. Estimate the number of moose on Isle Royale from these data, and then verify your guess by computer program (see Exercise 36). 38 A manufactured lot of buggy whips has 20 items, of which 5 are defective. A random sample of 5 items is chosen to be inspected. Find the probability that the sample contains exactly one defective item (a) if the sampling is done with replacement. (b) if the sampling is done without replacement. 39 Suppose that N and k tend to ∞in such a way that k/N remains fixed. Show that h(N, k, n, x) →b(n, k/N, x) . 40 A bridge deck has 52 cards with 13 cards in each of four suits: spades, hearts, diamonds, and clubs. A hand of 13 cards is dealt from a shuffled deck. Find the probability that the hand has (a) a distribution of suits 4, 4, 3, 2 (for example, four spades, four hearts, three diamonds, two clubs). (b) a distribution of suits 5, 3, 3, 2. 41 Write a computer algorithm that simulates a hypergeometric random variable with parameters N, k, and n. 42 You are presented with four different dice. The first one has two sides marked 0 and four sides marked 4. The second one has a 3 on every side. The third one has a 2 on four sides and a 6 on two sides, and the fourth one has a 1 on three sides and a 5 on three sides. You allow your friend to pick any of the four dice he wishes. Then you pick one of the remaining three and you each roll your die. The person with the largest number showing wins a dollar. Show that you can choose your die so that you have probability 2/3 of winning no matter which die your friend picks. (See Tenney and Foster.8) 43 The students in a certain class were classified by hair color and eye color. The conventions used were: Brown and black hair were considered dark, and red and blonde hair were considered light; black and brown eyes were considered dark, and blue and green eyes were considered light. They collected the data shown in Table 5.6. Are these traits independent? (See Example 5.6.) 44 Suppose that in the hypergeometric distribution, we let N and k tend to ∞in such a way that the ratio k/N approaches a real number p between 0 and 1. Show that the hypergeometric distribution tends to the binomial distribution with parameters n and p. 8R. L. Tenney and C. C. Foster, Non-transitive Dominance, Math. Mag. 49 (1976) no. 3, pgs. 115-120. | prob_Page_211_Chunk5050 |
204 CHAPTER 5. DISTRIBUTIONS AND DENSITIES Dark Eyes Light Eyes Dark Hair 28 15 43 Light Hair 9 23 32 37 38 75 Table 5.6: Observed data. 0 10 20 30 40 0 500 1000 1500 2000 2500 3000 3500 Figure 5.5: Distribution of choices in the Powerball lottery. 45 (a) Compute the leading digits of the first 100 powers of 2, and see how well these data fit the Benford distribution. (b) Multiply each number in the data set of part (a) by 3, and compare the distribution of the leading digits with the Benford distribution. 46 In the Powerball lottery, contestants pick 5 different integers between 1 and 45, and in addition, pick a bonus integer from the same range (the bonus integer can equal one of the first five integers chosen). Some contestants choose the numbers themselves, and others let the computer choose the numbers. The data shown in Table 5.7 are the contestant-chosen numbers in a certain state on May 3, 1996. A spike graph of the data is shown in Figure 5.5. The goal of this problem is to check the hypothesis that the chosen numbers are uniformly distributed. To do this, compute the value v of the random variable χ2 given in Example 5.6. In the present case, this random variable has 44 degrees of freedom. One can find, in a χ2 table, the value v0 = 59.43 , which represents a number with the property that a χ2-distributed random variable takes on values that exceed v0 only 5% of the time. Does your computed value of v exceed v0? If so, you should reject the hypothesis that the contestants’ choices are uniformly distributed. | prob_Page_212_Chunk5051 |
5.2. IMPORTANT DENSITIES 205 Integer Times Integer Times Integer Times Chosen Chosen Chosen 1 2646 2 2934 3 3352 4 3000 5 3357 6 2892 7 3657 8 3025 9 3362 10 2985 11 3138 12 3043 13 2690 14 2423 15 2556 16 2456 17 2479 18 2276 19 2304 20 1971 21 2543 22 2678 23 2729 24 2414 25 2616 26 2426 27 2381 28 2059 29 2039 30 2298 31 2081 32 1508 33 1887 34 1463 35 1594 36 1354 37 1049 38 1165 39 1248 40 1493 41 1322 42 1423 43 1207 44 1259 45 1224 Table 5.7: Numbers chosen by contestants in the Powerball lottery. 5.2 Important Densities In this section, we will introduce some important probability density functions and give some examples of their use. We will also consider the question of how one simulates a given density using a computer. Continuous Uniform Density The simplest density function corresponds to the random variable U whose value represents the outcome of the experiment consisting of choosing a real number at random from the interval [a, b]. f(ω) = 1/(b −a), if a ≤ω ≤b, 0, otherwise. It is easy to simulate this density on a computer. We simply calculate the expression (b −a)rnd + a . Exponential and Gamma Densities The exponential density function is defined by f(x) = λe−λx, if 0 ≤x < ∞, 0, otherwise. Here λ is any positive constant, depending on the experiment. The reader has seen this density in Example 2.17. In Figure 5.6 we show graphs of several exponen- tial densities for different choices of λ. The exponential density is often used to | prob_Page_213_Chunk5052 |
206 CHAPTER 5. DISTRIBUTIONS AND DENSITIES 0 2 4 6 8 10 λ=1 λ=2 λ=1/2 Figure 5.6: Exponential densities. describe experiments involving a question of the form: How long until something happens? For example, the exponential density is often used to study the time between emissions of particles from a radioactive source. The cumulative distribution function of the exponential density is easy to com- pute. Let T be an exponentially distributed random variable with parameter λ. If x ≥0, then we have F(x) = P(T ≤x) = Z x 0 λe−λt dt = 1 −e−λx . Both the exponential density and the geometric distribution share a property known as the “memoryless” property. This property was introduced in Example 5.1; it says that P(T > r + s | T > r) = P(T > s) . This can be demonstrated to hold for the exponential density by computing both sides of this equation. The right-hand side is just 1 −F(s) = e−λs , while the left-hand side is P(T > r + s) P(T > r) = 1 −F(r + s) 1 −F(r) | prob_Page_214_Chunk5053 |
5.2. IMPORTANT DENSITIES 207 = e−λ(r+s) e−λr = e−λs . There is a very important relationship between the exponential density and the Poisson distribution. We begin by defining X1, X2, . . . to be a sequence of independent exponentially distributed random variables with parameter λ. We might think of Xi as denoting the amount of time between the ith and (i + 1)st emissions of a particle by a radioactive source. (As we shall see in Chapter 6, we can think of the parameter λ as representing the reciprocal of the average length of time between emissions. This parameter is a quantity that might be measured in an actual experiment of this type.) We now consider a time interval of length t, and we let Y denote the random variable which counts the number of emissions that occur in the time interval. We would like to calculate the distribution function of Y (clearly, Y is a discrete random variable). If we let Sn denote the sum X1 + X2 + · · · + Xn, then it is easy to see that P(Y = n) = P(Sn ≤t and Sn+1 > t) . Since the event Sn+1 ≤t is a subset of the event Sn ≤t, the above probability is seen to be equal to P(Sn ≤t) −P(Sn+1 ≤t) . (5.4) We will show in Chapter 7 that the density of Sn is given by the following formula: gn(x) = ( λ (λx)n−1 (n−1)! e−λx, if x > 0, 0, otherwise. This density is an example of a gamma density with parameters λ and n. The general gamma density allows n to be any positive real number. We shall not discuss this general density. It is easy to show by induction on n that the cumulative distribution function of Sn is given by: Gn(x) = 1 −e−λx 1 + λx 1! + · · · + (λx)n−1 (n−1)! , if x > 0, 0, otherwise. Using this expression, the quantity in (5.4) is easy to compute; we obtain e−λt (λt)n n! , which the reader will recognize as the probability that a Poisson-distributed random variable, with parameter λt, takes on the value n. The above relationship will allow us to simulate a Poisson distribution, once we have found a way to simulate an exponential density. The following random variable does the job: Y = −1 λ log(rnd) . (5.5) | prob_Page_215_Chunk5054 |
208 CHAPTER 5. DISTRIBUTIONS AND DENSITIES Using Corollary 5.2 (below), one can derive the above expression (see Exercise 3). We content ourselves for now with a short calculation that should convince the reader that the random variable Y has the required property. We have P(Y ≤y) = P −1 λ log(rnd) ≤y = P(log(rnd) ≥−λy) = P(rnd ≥e−λy) = 1 −e−λy . This last expression is seen to be the cumulative distribution function of an expo- nentially distributed random variable with parameter λ. To simulate a Poisson random variable W with parameter λ, we simply generate a sequence of values of an exponentially distributed random variable with the same parameter, and keep track of the subtotals Sk of these values. We stop generating the sequence when the subtotal first exceeds λ. Assume that we find that Sn ≤λ < Sn+1 . Then the value n is returned as a simulated value for W. Example 5.7 (Queues) Suppose that customers arrive at random times at a service station with one server, and suppose that each customer is served immediately if no one is ahead of him, but must wait his turn in line otherwise. How long should each customer expect to wait? (We define the waiting time of a customer to be the length of time between the time that he arrives and the time that he begins to be served.) Let us assume that the interarrival times between successive customers are given by random variables X1, X2, . . . , Xn that are mutually independent and identically distributed with an exponential cumulative distribution function given by FX(t) = 1 −e−λt. Let us assume, too, that the service times for successive customers are given by random variables Y1, Y2, . . . , Yn that again are mutually independent and identically distributed with another exponential cumulative distribution function given by FY (t) = 1 −e−µt. The parameters λ and µ represent, respectively, the reciprocals of the average time between arrivals of customers and the average service time of the customers. Thus, for example, the larger the value of λ, the smaller the average time between arrivals of customers. We can guess that the length of time a customer will spend in the queue depends on the relative sizes of the average interarrival time and the average service time. It is easy to verify this conjecture by simulation. The program Queue simulates this queueing process. Let N(t) be the number of customers in the queue at time t. | prob_Page_216_Chunk5055 |
5.2. IMPORTANT DENSITIES 209 2000 4000 6000 8000 10000 10 20 30 40 50 60 2000 4000 6000 8000 10000 200 400 600 800 1000 1200 λ = 1 λ = 1 µ = .9 µ = 1.1 Figure 5.7: Queue sizes. 0 10 20 30 40 50 0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 Figure 5.8: Waiting times. Then we plot N(t) as a function of t for different choices of the parameters λ and µ (see Figure 5.7). We note that when λ < µ, then 1/λ > 1/µ, so the average interarrival time is greater than the average service time, i.e., customers are served more quickly, on average, than new ones arrive. Thus, in this case, it is reasonable to expect that N(t) remains small. However, if λ > µ then customers arrive more quickly than they are served, and, as expected, N(t) appears to grow without limit. We can now ask: How long will a customer have to wait in the queue for service? To examine this question, we let Wi be the length of time that the ith customer has to remain in the system (waiting in line and being served). Then we can present these data in a bar graph, using the program Queue, to give some idea of how the Wi are distributed (see Figure 5.8). (Here λ = 1 and µ = 1.1.) We see that these waiting times appear to be distributed exponentially. This is always the case when λ < µ. The proof of this fact is too complicated to give here, but we can verify it by simulation for different choices of λ and µ, as above. 2 | prob_Page_217_Chunk5056 |
210 CHAPTER 5. DISTRIBUTIONS AND DENSITIES Functions of a Random Variable Before continuing our list of important densities, we pause to consider random variables which are functions of other random variables. We will prove a general theorem that will allow us to derive expressions such as Equation 5.5. Theorem 5.1 Let X be a continuous random variable, and suppose that φ(x) is a strictly increasing function on the range of X. Define Y = φ(X). Suppose that X and Y have cumulative distribution functions FX and FY respectively. Then these functions are related by FY (y) = FX(φ−1(y)). If φ(x) is strictly decreasing on the range of X, then FY (y) = 1 −FX(φ−1(y)) . Proof. Since φ is a strictly increasing function on the range of X, the events (X ≤φ−1(y)) and (φ(X) ≤y) are equal. Thus, we have FY (y) = P(Y ≤y) = P(φ(X) ≤y) = P(X ≤φ−1(y)) = FX(φ−1(y)) . If φ(x) is strictly decreasing on the range of X, then we have FY (y) = P(Y ≤y) = P(φ(X) ≤y) = P(X ≥φ−1(y)) = 1 −P(X < φ−1(y)) = 1 −FX(φ−1(y)) . This completes the proof. 2 Corollary 5.1 Let X be a continuous random variable, and suppose that φ(x) is a strictly increasing function on the range of X. Define Y = φ(X). Suppose that the density functions of X and Y are fX and fY , respectively. Then these functions are related by fY (y) = fX(φ−1(y)) d dy φ−1(y) . If φ(x) is strictly decreasing on the range of X, then fY (y) = −fX(φ−1(y)) d dy φ−1(y) . | prob_Page_218_Chunk5057 |
5.2. IMPORTANT DENSITIES 211 Proof. This result follows from Theorem 5.1 by using the Chain Rule. 2 If the function φ is neither strictly increasing nor strictly decreasing, then the situation is somewhat more complicated but can be treated by the same methods. For example, suppose that Y = X2, Then φ(x) = x2, and FY (y) = P(Y ≤y) = P(−√y ≤X ≤+√y) = P(X ≤+√y) −P(X ≤−√y) = FX(√y) −FX(−√y) . Moreover, fY (y) = d dy FY (y) = d dy (FX(√y) −FX(−√y)) = fX(√y) + fX(−√y) 1 2√y . We see that in order to express FY in terms of FX when Y = φ(X), we have to express P(Y ≤y) in terms of P(X ≤x), and this process will depend in general upon the structure of φ. Simulation Theorem 5.1 tells us, among other things, how to simulate on the computer a random variable Y with a prescribed cumulative distribution function F. We assume that F(y) is strictly increasing for those values of y where 0 < F(y) < 1. For this purpose, let U be a random variable which is uniformly distributed on [0, 1]. Then U has cumulative distribution function FU(u) = u. Now, if F is the prescribed cumulative distribution function for Y , then to write Y in terms of U we first solve the equation F(y) = u for y in terms of u. We obtain y = F −1(u). Note that since F is an increasing function this equation always has a unique solution (see Figure 5.9). Then we set Z = F −1(U) and obtain, by Theorem 5.1, FZ(y) = FU(F(y)) = F(y) , since FU(u) = u. Therefore, Z and Y have the same cumulative distribution func- tion. Summarizing, we have the following. | prob_Page_219_Chunk5058 |
212 CHAPTER 5. DISTRIBUTIONS AND DENSITIES y = φ(x) x = FY (y) Y (y) Graph of F x y 1 0 Figure 5.9: Converting a uniform distribution FU into a prescribed distribution FY . Corollary 5.2 If F(y) is a given cumulative distribution function that is strictly increasing when 0 < F(y) < 1 and if U is a random variable with uniform distribu- tion on [0, 1], then Y = F −1(U) has the cumulative distribution F(y). 2 Thus, to simulate a random variable with a given cumulative distribution F we need only set Y = F −1(rnd). Normal Density We now come to the most important density function, the normal density function. We have seen in Chapter 3 that the binomial distribution functions are bell-shaped, even for moderate size values of n. We recall that a binomially-distributed random variable with parameters n and p can be considered to be the sum of n mutually independent 0-1 random variables. A very important theorem in probability theory, called the Central Limit Theorem, states that under very general conditions, if we sum a large number of mutually independent random variables, then the distribution of the sum can be closely approximated by a certain specific continuous density, called the normal density. This theorem will be discussed in Chapter 9. The normal density function with parameters µ and σ is defined as follows: fX(x) = 1 √ 2πσ e−(x−µ)2/2σ2 . The parameter µ represents the “center” of the density (and in Chapter 6, we will show that it is the average, or expected, value of the density). The parameter σ is a measure of the “spread” of the density, and thus it is assumed to be positive. (In Chapter 6, we will show that σ is the standard deviation of the density.) We note that it is not at all obvious that the above function is a density, i.e., that its | prob_Page_220_Chunk5059 |
5.2. IMPORTANT DENSITIES 213 -4 -2 2 4 0.1 0.2 0.3 0.4 σ = 1 σ = 2 Figure 5.10: Normal density for two sets of parameter values. integral over the real line equals 1. The cumulative distribution function is given by the formula FX(x) = Z x −∞ 1 √ 2πσ e−(u−µ)2/2σ2 du . In Figure 5.10 we have included for comparison a plot of the normal density for the cases µ = 0 and σ = 1, and µ = 0 and σ = 2. One cannot write FX in terms of simple functions. This leads to several prob- lems. First of all, values of FX must be computed using numerical integration. Extensive tables exist containing values of this function (see Appendix A). Sec- ondly, we cannot write F −1 X in closed form, so we cannot use Corollary 5.2 to help us simulate a normal random variable. For this reason, special methods have been developed for simulating a normal distribution. One such method relies on the fact that if U and V are independent random variables with uniform densities on [0, 1], then the random variables X = p −2 log U cos 2πV and Y = p −2 log U sin 2πV are independent, and have normal density functions with parameters µ = 0 and σ = 1. (This is not obvious, nor shall we prove it here. See Box and Muller.9) Let Z be a normal random variable with parameters µ = 0 and σ = 1. A normal random variable with these parameters is said to be a standard normal random variable. It is an important and useful fact that if we write X = σZ + µ , then X is a normal random variable with parameters µ and σ. To show this, we will use Theorem 5.1. We have φ(z) = σz + µ, φ−1(x) = (x −µ)/σ, and FX(x) = FZ x −µ σ , 9G. E. P. Box and M. E. Muller, A Note on the Generation of Random Normal Deviates, Ann. of Math. Stat. 29 (1958), pgs. 610-611. | prob_Page_221_Chunk5060 |
214 CHAPTER 5. DISTRIBUTIONS AND DENSITIES fX(x) = fZ x −µ σ · 1 σ = 1 √ 2πσ e−(x−µ)2/2σ2 . The reader will note that this last expression is the density function with parameters µ and σ, as claimed. We have seen above that it is possible to simulate a standard normal random variable Z. If we wish to simulate a normal random variable X with parameters µ and σ, then we need only transform the simulated values for Z using the equation X = σZ + µ. Suppose that we wish to calculate the value of a cumulative distribution function for the normal random variable X, with parameters µ and σ. We can reduce this calculation to one concerning the standard normal random variable Z as follows: FX(x) = P(X ≤x) = P Z ≤x −µ σ = FZ x −µ σ . This last expression can be found in a table of values of the cumulative distribution function for a standard normal random variable. Thus, we see that it is unnecessary to make tables of normal distribution functions with arbitrary µ and σ. The process of changing a normal random variable to a standard normal ran- dom variable is known as standardization. If X has a normal distribution with parameters µ and σ and if Z = X −µ σ , then Z is said to be the standardized version of X. The following example shows how we use the standardized version of a normal random variable X to compute specific probabilities relating to X. Example 5.8 Suppose that X is a normally distributed random variable with pa- rameters µ = 10 and σ = 3. Find the probability that X is between 4 and 16. To solve this problem, we note that Z = (X −10)/3 is the standardized version of X. So, we have P(4 ≤X ≤16) = P(X ≤16) −P(X ≤4) = FX(16) −FX(4) = FZ 16 −10 3 −FZ 4 −10 3 = FZ(2) −FZ(−2) . | prob_Page_222_Chunk5061 |
5.2. IMPORTANT DENSITIES 215 0 1 2 3 4 5 0 0.1 0.2 0.3 0.4 0.5 0.6 Figure 5.11: Distribution of dart distances in 1000 drops. This last expression can be evaluated by using tabulated values of the standard normal distribution function (see 11.5); when we use this table, we find that FZ(2) = .9772 and FZ(−2) = .0228. Thus, the answer is .9544. In Chapter 6, we will see that the parameter µ is the mean, or average value, of the random variable X. The parameter σ is a measure of the spread of the random variable, and is called the standard deviation. Thus, the question asked in this example is of a typical type, namely, what is the probability that a random variable has a value within two standard deviations of its average value. 2 Maxwell and Rayleigh Densities Example 5.9 Suppose that we drop a dart on a large table top, which we consider as the xy-plane, and suppose that the x and y coordinates of the dart point are independent and have a normal distribution with parameters µ = 0 and σ = 1. How is the distance of the point from the origin distributed? This problem arises in physics when it is assumed that a moving particle in Rn has components of the velocity that are mutually independent and normally distributed and it is desired to find the density of the speed of the particle. The density in the case n = 3 is called the Maxwell density. The density in the case n = 2 (i.e. the dart board experiment described above) is called the Rayleigh density. We can simulate this case by picking independently a pair of coordinates (x, y), each from a normal distribution with µ = 0 and σ = 1 on (−∞, ∞), calculating the distance r = p x2 + y2 of the point (x, y) from the origin, repeating this process a large number of times, and then presenting the results in a bar graph. The results are shown in Figure 5.11. | prob_Page_223_Chunk5062 |
216 CHAPTER 5. DISTRIBUTIONS AND DENSITIES Female Male A 37 56 93 B 63 60 123 C 47 43 90 Below C 5 8 13 152 167 319 Table 5.8: Calculus class data. Female Male A 44.3 48.7 93 B 58.6 64.4 123 C 42.9 47.1 90 Below C 6.2 6.8 13 152 167 319 Table 5.9: Expected data. We have also plotted the theoretical density f(r) = re−r2/2 . This will be derived in Chapter 7; see Example 7.7. 2 Chi-Squared Density We return to the problem of independence of traits discussed in Example 5.6. It is frequently the case that we have two traits, each of which have several different values. As was seen in the example, quite a lot of calculation was needed even in the case of two values for each trait. We now give another method for testing independence of traits, which involves much less calculation. Example 5.10 Suppose that we have the data shown in Table 5.8 concerning grades and gender of students in a Calculus class. We can use the same sort of model in this situation as was used in Example 5.6. We imagine that we have an urn with 319 balls of two colors, say blue and red, corresponding to females and males, respectively. We now draw 93 balls, without replacement, from the urn. These balls correspond to the grade of A. We continue by drawing 123 balls, which correspond to the grade of B. When we finish, we have four sets of balls, with each ball belonging to exactly one set. (We could have stipulated that the balls were of four colors, corresponding to the four possible grades. In this case, we would draw a subset of size 152, which would correspond to the females. The balls re- maining in the urn would correspond to the males. The choice does not affect the final determination of whether we should reject the hypothesis of independence of traits.) The expected data set can be determined in exactly the same way as in Exam- ple 5.6. If we do this, we obtain the expected values shown in Table 5.9. Even if | prob_Page_224_Chunk5063 |
5.2. IMPORTANT DENSITIES 217 the traits are independent, we would still expect to see some differences between the numbers in corresponding boxes in the two tables. However, if the differences are large, then we might suspect that the two traits are not independent. In Ex- ample 5.6, we used the probability distribution of the various possible data sets to compute the probability of finding a data set that differs from the expected data set by at least as much as the actual data set does. We could do the same in this case, but the amount of computation is enormous. Instead, we will describe a single number which does a good job of measuring how far a given data set is from the expected one. To quantify how far apart the two sets of numbers are, we could sum the squares of the differences of the corresponding numbers. (We could also sum the absolute values of the differences, but we would not want to sum the differences.) Suppose that we have data in which we expect to see 10 objects of a certain type, but instead we see 18, while in another case we expect to see 50 objects of a certain type, but instead we see 58. Even though the two differences are about the same, the first difference is more surprising than the second, since the expected number of outcomes in the second case is quite a bit larger than the expected number in the first case. One way to correct for this is to divide the individual squares of the differences by the expected number for that box. Thus, if we label the values in the eight boxes in the first table by Oi (for observed values) and the values in the eight boxes in the second table by Ei (for expected values), then the following expression might be a reasonable one to use to measure how far the observed data is from what is expected: 8 X i=1 (Oi −Ei)2 Ei . This expression is a random variable, which is usually denoted by the symbol χ2, pronounced “ki-squared.” It is called this because, under the assumption of inde- pendence of the two traits, the density of this random variable can be computed and is approximately equal to a density called the chi-squared density. We choose not to give the explicit expression for this density, since it involves the gamma function, which we have not discussed. The chi-squared density is, in fact, a special case of the general gamma density. In applying the chi-squared density, tables of values of this density are used, as in the case of the normal density. The chi-squared density has one parameter n, which is called the number of degrees of freedom. The number n is usually easy to determine from the problem at hand. For example, if we are checking two traits for independence, and the two traits have a and b values, respectively, then the number of degrees of freedom of the random variable χ2 is (a−1)(b−1). So, in the example at hand, the number of degrees of freedom is 3. We recall that in this example, we are trying to test for independence of the two traits of gender and grades. If we assume these traits are independent, then the ball-and-urn model given above gives us a way to simulate the experiment. Using a computer, we have performed 1000 experiments, and for each one, we have calculated a value of the random variable χ2. The results are shown in Figure 5.12, together with the chi-squared density function with three degrees of freedom. | prob_Page_225_Chunk5064 |
218 CHAPTER 5. DISTRIBUTIONS AND DENSITIES 0 2 4 6 8 10 12 0 0.05 0.1 0.15 0.2 Figure 5.12: Chi-squared density with three degrees of freedom. As we stated above, if the value of the random variable χ2 is large, then we would tend not to believe that the two traits are independent. But how large is large? The actual value of this random variable for the data above is 4.13. In Figure 5.12, we have shown the chi-squared density with 3 degrees of freedom. It can be seen that the value 4.13 is larger than most of the values taken on by this random variable. Typically, a statistician will compute the value v of the random variable χ2, just as we have done. Then, by looking in a table of values of the chi-squared density, a value v0 is determined which is only exceeded 5% of the time. If v ≥v0, the statistician rejects the hypothesis that the two traits are independent. In the present case, v0 = 7.815, so we would not reject the hypothesis that the two traits are independent. 2 Cauchy Density The following example is from Feller.10 Example 5.11 Suppose that a mirror is mounted on a vertical axis, and is free to revolve about that axis. The axis of the mirror is 1 foot from a straight wall of infinite length. A pulse of light is shown onto the mirror, and the reflected ray hits the wall. Let φ be the angle between the reflected ray and the line that is perpendicular to the wall and that runs through the axis of the mirror. We assume that φ is uniformly distributed between −π/2 and π/2. Let X represent the distance between the point on the wall that is hit by the reflected ray and the point on the wall that is closest to the axis of the mirror. We now determine the density of X. Let B be a fixed positive quantity. Then X ≥B if and only if tan(φ) ≥B, which happens if and only if φ ≥arctan(B). This happens with probability π/2 −arctan(B) π . 10W. Feller, An Introduction to Probability Theory and Its Applications,, vol. 2, (New York: Wiley, 1966) | prob_Page_226_Chunk5065 |
5.2. IMPORTANT DENSITIES 219 Thus, for positive B, the cumulative distribution function of X is F(B) = 1 −π/2 −arctan(B) π . Therefore, the density function for positive B is f(B) = 1 π(1 + B2) . Since the physical situation is symmetric with respect to φ = 0, it is easy to see that the above expression for the density is correct for negative values of B as well. The Law of Large Numbers, which we will discuss in Chapter 8, states that in many cases, if we take the average of independent values of a random variable, then the average approaches a specific number as the number of values increases. It turns out that if one does this with a Cauchy-distributed random variable, the average does not approach any specific number. 2 Exercises 1 Choose a number U from the unit interval [0, 1] with uniform distribution. Find the cumulative distribution and density for the random variables (a) Y = U + 2. (b) Y = U 3. 2 Choose a number U from the interval [0, 1] with uniform distribution. Find the cumulative distribution and density for the random variables (a) Y = 1/(U + 1). (b) Y = log(U + 1). 3 Use Corollary 5.2 to derive the expression for the random variable given in Equation 5.5. Hint: The random variables 1 −rnd and rnd are identically distributed. 4 Suppose we know a random variable Y as a function of the uniform random variable U: Y = φ(U), and suppose we have calculated the cumulative dis- tribution function FY (y) and thence the density fY (y). How can we check whether our answer is correct? An easy simulation provides the answer: Make a bar graph of Y = φ(rnd) and compare the result with the graph of fY (y). These graphs should look similar. Check your answers to Exercises 1 and 2 by this method. 5 Choose a number U from the interval [0, 1] with uniform distribution. Find the cumulative distribution and density for the random variables (a) Y = |U −1/2|. (b) Y = (U −1/2)2. | prob_Page_227_Chunk5066 |
220 CHAPTER 5. DISTRIBUTIONS AND DENSITIES 6 Check your results for Exercise 5 by simulation as described in Exercise 4. 7 Explain how you can generate a random variable whose cumulative distribu- tion function is F(x) = 0, if x < 0, x2, if 0 ≤x ≤1, 1, if x > 1. 8 Write a program to generate a sample of 1000 random outcomes each of which is chosen from the distribution given in Exercise 7. Plot a bar graph of your results and compare this empirical density with the density for the cumulative distribution given in Exercise 7. 9 Let U, V be random numbers chosen independently from the interval [0, 1] with uniform distribution. Find the cumulative distribution and density of each of the variables (a) Y = U + V . (b) Y = |U −V |. 10 Let U, V be random numbers chosen independently from the interval [0, 1]. Find the cumulative distribution and density for the random variables (a) Y = max(U, V ). (b) Y = min(U, V ). 11 Write a program to simulate the random variables of Exercises 9 and 10 and plot a bar graph of the results. Compare the resulting empirical density with the density found in Exercises 9 and 10. 12 A number U is chosen at random in the interval [0, 1]. Find the probability that (a) R = U 2 < 1/4. (b) S = U(1 −U) < 1/4. (c) T = U/(1 −U) < 1/4. 13 Find the cumulative distribution function F and the density function f for each of the random variables R, S, and T in Exercise 12. 14 A point P in the unit square has coordinates X and Y chosen at random in the interval [0, 1]. Let D be the distance from P to the nearest edge of the square, and E the distance to the nearest corner. What is the probability that (a) D < 1/4? (b) E < 1/4? 15 In Exercise 14 find the cumulative distribution F and density f for the random variable D. | prob_Page_228_Chunk5067 |
5.2. IMPORTANT DENSITIES 221 16 Let X be a random variable with density function fX(x) = cx(1 −x), if 0 < x < 1, 0, otherwise. (a) What is the value of c? (b) What is the cumulative distribution function FX for X? (c) What is the probability that X < 1/4? 17 Let X be a random variable with cumulative distribution function F(x) = 0, if x < 0, sin2(πx/2), if 0 ≤x ≤1, 1, if 1 < x. (a) What is the density function fX for X? (b) What is the probability that X < 1/4? 18 Let X be a random variable with cumulative distribution function FX, and let Y = X + b, Z = aX, and W = aX + b, where a and b are any constants. Find the cumulative distribution functions FY , FZ, and FW . Hint: The cases a > 0, a = 0, and a < 0 require different arguments. 19 Let X be a random variable with density function fX, and let Y = X + b, Z = aX, and W = aX + b, where a ̸= 0. Find the density functions fY , fZ, and fW . (See Exercise 18.) 20 Let X be a random variable uniformly distributed over [c, d], and let Y = aX + b. For what choice of a and b is Y uniformly distributed over [0, 1]? 21 Let X be a random variable with cumulative distribution function F strictly increasing on the range of X. Let Y = F(X). Show that Y is uniformly distributed in the interval [0, 1]. (The formula X = F −1(Y ) then tells us how to construct X from a uniform random variable Y .) 22 Let X be a random variable with cumulative distribution function F. The median of X is the value m for which F(m) = 1/2. Then X < m with probability 1/2 and X > m with probability 1/2. Find m if X is (a) uniformly distributed over the interval [a, b]. (b) normally distributed with parameters µ and σ. (c) exponentially distributed with parameter λ. 23 Let X be a random variable with density function fX. The mean of X is the value µ = R xfx(x) dx. Then µ gives an average value for X (see Sec- tion 6.3). Find µ if X is distributed uniformly, normally, or exponentially, as in Exercise 22. | prob_Page_229_Chunk5068 |
222 CHAPTER 5. DISTRIBUTIONS AND DENSITIES Test Score Letter grade µ + σ < x A µ < x < µ + σ B µ −σ < x < µ C µ −2σ < x < µ −σ D x < µ −2σ F Table 5.10: Grading on the curve. 24 Let X be a random variable with density function fX. The mode of X is the value M for which f(M) is maximum. Then values of X near M are most likely to occur. Find M if X is distributed normally or exponentially, as in Exercise 22. What happens if X is distributed uniformly? 25 Let X be a random variable normally distributed with parameters µ = 70, σ = 10. Estimate (a) P(X > 50). (b) P(X < 60). (c) P(X > 90). (d) P(60 < X < 80). 26 Bridies’ Bearing Works manufactures bearing shafts whose diameters are nor- mally distributed with parameters µ = 1, σ = .002. The buyer’s specifications require these diameters to be 1.000 ± .003 cm. What fraction of the manu- facturer’s shafts are likely to be rejected? If the manufacturer improves her quality control, she can reduce the value of σ. What value of σ will ensure that no more than 1 percent of her shafts are likely to be rejected? 27 A final examination at Podunk University is constructed so that the test scores are approximately normally distributed, with parameters µ and σ. The instructor assigns letter grades to the test scores as shown in Table 5.10 (this is the process of “grading on the curve”). What fraction of the class gets A, B, C, D, F? 28 (Ross11) An expert witness in a paternity suit testifies that the length (in days) of a pregnancy, from conception to delivery, is approximately normally distributed, with parameters µ = 270, σ = 10. The defendant in the suit is able to prove that he was out of the country during the period from 290 to 240 days before the birth of the child. What is the probability that the defendant was in the country when the child was conceived? 29 Suppose that the time (in hours) required to repair a car is an exponentially distributed random variable with parameter λ = 1/2. What is the probabil- ity that the repair time exceeds 4 hours? If it exceeds 4 hours what is the probability that it exceeds 8 hours? 11S. Ross, A First Course in Probability Theory, 2d ed. (New York: Macmillan, 1984). | prob_Page_230_Chunk5069 |
5.2. IMPORTANT DENSITIES 223 30 Suppose that the number of years a car will run is exponentially distributed with parameter µ = 1/4. If Prosser buys a used car today, what is the probability that it will still run after 4 years? 31 Let U be a uniformly distributed random variable on [0, 1]. What is the probability that the equation x2 + 4Ux + 1 = 0 has two distinct real roots x1 and x2? 32 Write a program to simulate the random variables whose densities are given by the following, making a suitable bar graph of each and comparing the exact density with the bar graph. (a) fX(x) = e−x on [0, ∞) (but just do it on [0, 10]). (b) fX(x) = 2x on [0, 1]. (c) fX(x) = 3x2 on [0, 1]. (d) fX(x) = 4|x −1/2| on [0, 1]. 33 Suppose we are observing a process such that the time between occurrences is exponentially distributed with λ = 1/30 (i.e., the average time between occurrences is 30 minutes). Suppose that the process starts at a certain time and we start observing the process 3 hours later. Write a program to simulate this process. Let T denote the length of time that we have to wait, after we start our observation, for an occurrence. Have your program keep track of T. What is an estimate for the average value of T? 34 Jones puts in two new lightbulbs: a 60 watt bulb and a 100 watt bulb. It is claimed that the lifetime of the 60 watt bulb has an exponential density with average lifetime 200 hours (λ = 1/200). The 100 watt bulb also has an exponential density but with average lifetime of only 100 hours (λ = 1/100). Jones wonders what is the probability that the 100 watt bulb will outlast the 60 watt bulb. If X and Y are two independent random variables with exponential densities f(x) = λe−λx and g(x) = µe−µx, respectively, then the probability that X is less than Y is given by P(X < Y ) = Z ∞ 0 f(x)(1 −G(x)) dx, where G(x) is the cumulative distribution function for g(x). Explain why this is the case. Use this to show that P(X < Y ) = λ λ + µ and to answer Jones’s question. | prob_Page_231_Chunk5070 |
224 CHAPTER 5. DISTRIBUTIONS AND DENSITIES 35 Consider the simple queueing process of Example 5.7. Suppose that you watch the size of the queue. If there are j people in the queue the next time the queue size changes it will either decrease to j −1 or increase to j + 1. Use the result of Exercise 34 to show that the probability that the queue size decreases to j −1 is µ/(µ + λ) and the probability that it increases to j + 1 is λ/(µ + λ). When the queue size is 0 it can only increase to 1. Write a program to simulate the queue size. Use this simulation to help formulate a conjecture containing conditions on µ and λ that will ensure that the queue will have times when it is empty. 36 Let X be a random variable having an exponential density with parameter λ. Find the density for the random variable Y = rX, where r is a positive real number. 37 Let X be a random variable having a normal density and consider the random variable Y = eX. Then Y has a log normal density. Find this density of Y . 38 Let X1 and X2 be independent random variables and for i = 1, 2, let Yi = φi(Xi), where φi is strictly increasing on the range of Xi. Show that Y1 and Y2 are independent. Note that the same result is true without the assumption that the φi’s are strictly increasing, but the proof is more difficult. | prob_Page_232_Chunk5071 |
Chapter 6 Expected Value and Variance 6.1 Expected Value of Discrete Random Variables When a large collection of numbers is assembled, as in a census, we are usually interested not in the individual numbers, but rather in certain descriptive quantities such as the average or the median. In general, the same is true for the probability distribution of a numerically-valued random variable. In this and in the next section, we shall discuss two such descriptive quantities: the expected value and the variance. Both of these quantities apply only to numerically-valued random variables, and so we assume, in these sections, that all random variables have numerical values. To give some intuitive justification for our definition, we consider the following game. Average Value A die is rolled. If an odd number turns up, we win an amount equal to this number; if an even number turns up, we lose an amount equal to this number. For example, if a two turns up we lose 2, and if a three comes up we win 3. We want to decide if this is a reasonable game to play. We first try simulation. The program Die carries out this simulation. The program prints the frequency and the relative frequency with which each outcome occurs. It also calculates the average winnings. We have run the program twice. The results are shown in Table 6.1. In the first run we have played the game 100 times. In this run our average gain is −.57. It looks as if the game is unfavorable, and we wonder how unfavorable it really is. To get a better idea, we have played the game 10,000 times. In this case our average gain is −.4949. We note that the relative frequency of each of the six possible outcomes is quite close to the probability 1/6 for this outcome. This corresponds to our frequency interpretation of probability. It also suggests that for very large numbers of plays, our average gain should be µ = 1 1 6 −2 1 6 + 3 1 6 −4 1 6 + 5 1 6 −6 1 6 225 | prob_Page_233_Chunk5072 |
226 CHAPTER 6. EXPECTED VALUE AND VARIANCE n = 100 n = 10000 Winning Frequency Relative Frequency Relative Frequency Frequency 1 17 .17 1681 .1681 -2 17 .17 1678 .1678 3 16 .16 1626 .1626 -4 18 .18 1696 .1696 5 16 .16 1686 .1686 -6 16 .16 1633 .1633 Table 6.1: Frequencies for dice game. = 9 6 −12 6 = −3 6 = −.5 . This agrees quite well with our average gain for 10,000 plays. We note that the value we have chosen for the average gain is obtained by taking the possible outcomes, multiplying by the probability, and adding the results. This suggests the following definition for the expected outcome of an experiment. Expected Value Definition 6.1 Let X be a numerically-valued discrete random variable with sam- ple space Ωand distribution function m(x). The expected value E(X) is defined by E(X) = X x∈Ω xm(x) , provided this sum converges absolutely. We often refer to the expected value as the mean, and denote E(X) by µ for short. If the above sum does not converge absolutely, then we say that X does not have an expected value. 2 Example 6.1 Let an experiment consist of tossing a fair coin three times. Let X denote the number of heads which appear. Then the possible values of X are 0, 1, 2 and 3. The corresponding probabilities are 1/8, 3/8, 3/8, and 1/8. Thus, the expected value of X equals 0 1 8 + 1 3 8 + 2 3 8 + 3 1 8 = 3 2 . Later in this section we shall see a quicker way to compute this expected value, based on the fact that X can be written as a sum of simpler random variables. 2 Example 6.2 Suppose that we toss a fair coin until a head first comes up, and let X represent the number of tosses which were made. Then the possible values of X are 1, 2, . . ., and the distribution function of X is defined by m(i) = 1 2i . | prob_Page_234_Chunk5073 |
6.1. EXPECTED VALUE 227 (This is just the geometric distribution with parameter 1/2.) Thus, we have E(X) = ∞ X i=1 i 1 2i = ∞ X i=1 1 2i + ∞ X i=2 1 2i + · · · = 1 + 1 2 + 1 22 + · · · = 2 . 2 Example 6.3 (Example 6.2 continued) Suppose that we flip a coin until a head first appears, and if the number of tosses equals n, then we are paid 2n dollars. What is the expected value of the payment? We let Y represent the payment. Then, P(Y = 2n) = 1 2n , for n ≥1. Thus, E(Y ) = ∞ X n=1 2n 1 2n , which is a divergent sum. Thus, Y has no expectation. This example is called the St. Petersburg Paradox. The fact that the above sum is infinite suggests that a player should be willing to pay any fixed amount per game for the privilege of playing this game. The reader is asked to consider how much he or she would be willing to pay for this privilege. It is unlikely that the reader’s answer is more than 10 dollars; therein lies the paradox. In the early history of probability, various mathematicians gave ways to resolve this paradox. One idea (due to G. Cramer) consists of assuming that the amount of money in the world is finite. He thus assumes that there is some fixed value of n such that if the number of tosses equals or exceeds n, the payment is 2n dollars. The reader is asked to show in Exercise 20 that the expected value of the payment is now finite. Daniel Bernoulli and Cramer also considered another way to assign value to the payment. Their idea was that the value of a payment is some function of the payment; such a function is now called a utility function. Examples of reasonable utility functions might include the square-root function or the logarithm function. In both cases, the value of 2n dollars is less than twice the value of n dollars. It can easily be shown that in both cases, the expected utility of the payment is finite (see Exercise 20). 2 | prob_Page_235_Chunk5074 |
228 CHAPTER 6. EXPECTED VALUE AND VARIANCE Example 6.4 Let T be the time for the first success in a Bernoulli trials process. Then we take as sample space Ωthe integers 1, 2, . . . and assign the geometric distribution m(j) = P(T = j) = qj−1p . Thus, E(T) = 1 · p + 2qp + 3q2p + · · · = p(1 + 2q + 3q2 + · · ·) . Now if |x| < 1, then 1 + x + x2 + x3 + · · · = 1 1 −x . Differentiating this formula, we get 1 + 2x + 3x2 + · · · = 1 (1 −x)2 , so E(T) = p (1 −q)2 = p p2 = 1 p . In particular, we see that if we toss a fair coin a sequence of times, the expected time until the first heads is 1/(1/2) = 2. If we roll a die a sequence of times, the expected number of rolls until the first six is 1/(1/6) = 6. 2 Interpretation of Expected Value In statistics, one is frequently concerned with the average value of a set of data. The following example shows that the ideas of average value and expected value are very closely related. Example 6.5 The heights, in inches, of the women on the Swarthmore basketball team are 5’ 9”, 5’ 9”, 5’ 6”, 5’ 8”, 5’ 11”, 5’ 5”, 5’ 7”, 5’ 6”, 5’ 6”, 5’ 7”, 5’ 10”, and 6’ 0”. A statistician would compute the average height (in inches) as follows: 69 + 69 + 66 + 68 + 71 + 65 + 67 + 66 + 66 + 67 + 70 + 72 12 = 67.9 . One can also interpret this number as the expected value of a random variable. To see this, let an experiment consist of choosing one of the women at random, and let X denote her height. Then the expected value of X equals 67.9. 2 Of course, just as with the frequency interpretation of probability, to interpret expected value as an average outcome requires further justification. We know that for any finite experiment the average of the outcomes is not predictable. However, we shall eventually prove that the average will usually be close to E(X) if we repeat the experiment a large number of times. We first need to develop some properties of the expected value. Using these properties, and those of the concept of the variance | prob_Page_236_Chunk5075 |
6.1. EXPECTED VALUE 229 X Y HHH 1 HHT 2 HTH 3 HTT 2 THH 2 THT 3 TTH 2 TTT 1 Table 6.2: Tossing a coin three times. to be introduced in the next section, we shall be able to prove the Law of Large Numbers. This theorem will justify mathematically both our frequency concept of probability and the interpretation of expected value as the average value to be expected in a large number of experiments. Expectation of a Function of a Random Variable Suppose that X is a discrete random variable with sample space Ω, and φ(x) is a real-valued function with domain Ω. Then φ(X) is a real-valued random vari- able. One way to determine the expected value of φ(X) is to first determine the distribution function of this random variable, and then use the definition of expec- tation. However, there is a better way to compute the expected value of φ(X), as demonstrated in the next example. Example 6.6 Suppose a coin is tossed 9 times, with the result HHHTTTTHT . The first set of three heads is called a run. There are three more runs in this sequence, namely the next four tails, the next head, and the next tail. We do not consider the first two tosses to constitute a run, since the third toss has the same value as the first two. Now suppose an experiment consists of tossing a fair coin three times. Find the expected number of runs. It will be helpful to think of two random variables, X and Y , associated with this experiment. We let X denote the sequence of heads and tails that results when the experiment is performed, and Y denote the number of runs in the outcome X. The possible outcomes of X and the corresponding values of Y are shown in Table 6.2. To calculate E(Y ) using the definition of expectation, we first must find the distribution function m(y) of Y i.e., we group together those values of X with a common value of Y and add their probabilities. In this case, we calculate that the distribution function of Y is: m(1) = 1/4, m(2) = 1/2, and m(3) = 1/4. One easily finds that E(Y ) = 2. | prob_Page_237_Chunk5076 |
230 CHAPTER 6. EXPECTED VALUE AND VARIANCE Now suppose we didn’t group the values of X with a common Y -value, but instead, for each X-value x, we multiply the probability of x and the corresponding value of Y , and add the results. We obtain 1 1 8 + 2 1 8 + 3 1 8 + 2 1 8 + 2 1 8 + 3 1 8 + 2 1 8 + 1 1 8 , which equals 2. This illustrates the following general principle. If X and Y are two random variables, and Y can be written as a function of X, then one can compute the expected value of Y using the distribution function of X. 2 Theorem 6.1 If X is a discrete random variable with sample space Ωand distri- bution function m(x), and if φ : Ω→R is a function, then E(φ(X)) = X x∈Ω φ(x)m(x) , provided the series converges absolutely. 2 The proof of this theorem is straightforward, involving nothing more than group- ing values of X with a common Y -value, as in Example 6.6. The Sum of Two Random Variables Many important results in probability theory concern sums of random variables. We first consider what it means to add two random variables. Example 6.7 We flip a coin and let X have the value 1 if the coin comes up heads and 0 if the coin comes up tails. Then, we roll a die and let Y denote the face that comes up. What does X + Y mean, and what is its distribution? This question is easily answered in this case, by considering, as we did in Chapter 4, the joint random variable Z = (X, Y ), whose outcomes are ordered pairs of the form (x, y), where 0 ≤x ≤1 and 1 ≤y ≤6. The description of the experiment makes it reasonable to assume that X and Y are independent, so the distribution function of Z is uniform, with 1/12 assigned to each outcome. Now it is an easy matter to find the set of outcomes of X + Y , and its distribution function. 2 In Example 6.1, the random variable X denoted the number of heads which occur when a fair coin is tossed three times. It is natural to think of X as the sum of the random variables X1, X2, X3, where Xi is defined to be 1 if the ith toss comes up heads, and 0 if the ith toss comes up tails. The expected values of the Xi’s are extremely easy to compute. It turns out that the expected value of X can be obtained by simply adding the expected values of the Xi’s. This fact is stated in the following theorem. | prob_Page_238_Chunk5077 |
6.1. EXPECTED VALUE 231 Theorem 6.2 Let X and Y be random variables with finite expected values. Then E(X + Y ) = E(X) + E(Y ) , and if c is any constant, then E(cX) = cE(X) . Proof. Let the sample spaces of X and Y be denoted by ΩX and ΩY , and suppose that ΩX = {x1, x2, . . .} and ΩY = {y1, y2, . . .} . Then we can consider the random variable X + Y to be the result of applying the function φ(x, y) = x+y to the joint random variable (X, Y ). Then, by Theorem 6.1, we have E(X + Y ) = X j X k (xj + yk)P(X = xj, Y = yk) = X j X k xjP(X = xj, Y = yk) + X j X k ykP(X = xj, Y = yk) = X j xjP(X = xj) + X k ykP(Y = yk) . The last equality follows from the fact that X k P(X = xj, Y = yk) = P(X = xj) and X j P(X = xj, Y = yk) = P(Y = yk) . Thus, E(X + Y ) = E(X) + E(Y ) . If c is any constant, E(cX) = X j cxjP(X = xj) = c X j xjP(X = xj) = cE(X) . 2 | prob_Page_239_Chunk5078 |
232 CHAPTER 6. EXPECTED VALUE AND VARIANCE X Y a b c 3 a c b 1 b a c 1 b c a 0 c a b 0 c b a 1 Table 6.3: Number of fixed points. It is easy to prove by mathematical induction that the expected value of the sum of any finite number of random variables is the sum of the expected values of the individual random variables. It is important to note that mutual independence of the summands was not needed as a hypothesis in the Theorem 6.2 and its generalization. The fact that expectations add, whether or not the summands are mutually independent, is some- times referred to as the First Fundamental Mystery of Probability. Example 6.8 Let Y be the number of fixed points in a random permutation of the set {a, b, c}. To find the expected value of Y , it is helpful to consider the basic random variable associated with this experiment, namely the random variable X which represents the random permutation. There are six possible outcomes of X, and we assign to each of them the probability 1/6 see Table 6.3. Then we can calculate E(Y ) using Theorem 6.1, as 3 1 6 + 1 1 6 + 1 1 6 + 0 1 6 + 0 1 6 + 1 1 6 = 1 . We now give a very quick way to calculate the average number of fixed points in a random permutation of the set {1, 2, 3, . . ., n}. Let Z denote the random permutation. For each i, 1 ≤i ≤n, let Xi equal 1 if Z fixes i, and 0 otherwise. So if we let F denote the number of fixed points in Z, then F = X1 + X2 + · · · + Xn . Therefore, Theorem 6.2 implies that E(F) = E(X1) + E(X2) + · · · + E(Xn) . But it is easy to see that for each i, E(Xi) = 1 n , so E(F) = 1 . This method of calculation of the expected value is frequently very useful. It applies whenever the random variable in question can be written as a sum of simpler random variables. We emphasize again that it is not necessary that the summands be mutually independent. 2 | prob_Page_240_Chunk5079 |
6.1. EXPECTED VALUE 233 Bernoulli Trials Theorem 6.3 Let Sn be the number of successes in n Bernoulli trials with prob- ability p for success on each trial. Then the expected number of successes is np. That is, E(Sn) = np . Proof. Let Xj be a random variable which has the value 1 if the jth outcome is a success and 0 if it is a failure. Then, for each Xj, E(Xj) = 0 · (1 −p) + 1 · p = p . Since Sn = X1 + X2 + · · · + Xn , and the expected value of the sum is the sum of the expected values, we have E(Sn) = E(X1) + E(X2) + · · · + E(Xn) = np . 2 Poisson Distribution Recall that the Poisson distribution with parameter λ was obtained as a limit of binomial distributions with parameters n and p, where it was assumed that np = λ, and n →∞. Since for each n, the corresponding binomial distribution has expected value λ, it is reasonable to guess that the expected value of a Poisson distribution with parameter λ also has expectation equal to λ. This is in fact the case, and the reader is invited to show this (see Exercise 21). Independence If X and Y are two random variables, it is not true in general that E(X · Y ) = E(X)E(Y ). However, this is true if X and Y are independent. Theorem 6.4 If X and Y are independent random variables, then E(X · Y ) = E(X)E(Y ) . Proof. Suppose that ΩX = {x1, x2, . . .} and ΩY = {y1, y2, . . .} | prob_Page_241_Chunk5080 |
234 CHAPTER 6. EXPECTED VALUE AND VARIANCE are the sample spaces of X and Y , respectively. Using Theorem 6.1, we have E(X · Y ) = X j X k xjykP(X = xj, Y = yk) . But if X and Y are independent, P(X = xj, Y = yk) = P(X = xj)P(Y = yk) . Thus, E(X · Y ) = X j X k xjykP(X = xj)P(Y = yk) = X j xjP(X = xj) X k ykP(Y = yk) ! = E(X)E(Y ) . 2 Example 6.9 A coin is tossed twice. Xi = 1 if the ith toss is heads and 0 otherwise. We know that X1 and X2 are independent. They each have expected value 1/2. Thus E(X1 · X2) = E(X1)E(X2) = (1/2)(1/2) = 1/4. 2 We next give a simple example to show that the expected values need not mul- tiply if the random variables are not independent. Example 6.10 Consider a single toss of a coin. We define the random variable X to be 1 if heads turns up and 0 if tails turns up, and we set Y = 1 −X. Then E(X) = E(Y ) = 1/2. But X · Y = 0 for either outcome. Hence, E(X · Y ) = 0 ̸= E(X)E(Y ). 2 We return to our records example of Section 3.1 for another application of the result that the expected value of the sum of random variables is the sum of the expected values of the individual random variables. Records Example 6.11 We start keeping snowfall records this year and want to find the expected number of records that will occur in the next n years. The first year is necessarily a record. The second year will be a record if the snowfall in the second year is greater than that in the first year. By symmetry, this probability is 1/2. More generally, let Xj be 1 if the jth year is a record and 0 otherwise. To find E(Xj), we need only find the probability that the jth year is a record. But the record snowfall for the first j years is equally likely to fall in any one of these years, | prob_Page_242_Chunk5081 |
6.1. EXPECTED VALUE 235 so E(Xj) = 1/j. Therefore, if Sn is the total number of records observed in the first n years, E(Sn) = 1 + 1 2 + 1 3 + · · · + 1 n . This is the famous divergent harmonic series. It is easy to show that E(Sn) ∼log n as n →∞. A more accurate approximation to E(Sn) is given by the expression log n + γ + 1 2n , where γ denotes Euler’s constant, and is approximately equal to .5772. Therefore, in ten years the expected number of records is approximately 2.9298; the exact value is the sum of the first ten terms of the harmonic series which is 2.9290. 2 Craps Example 6.12 In the game of craps, the player makes a bet and rolls a pair of dice. If the sum of the numbers is 7 or 11 the player wins, if it is 2, 3, or 12 the player loses. If any other number results, say r, then r becomes the player’s point and he continues to roll until either r or 7 occurs. If r comes up first he wins, and if 7 comes up first he loses. The program Craps simulates playing this game a number of times. We have run the program for 1000 plays in which the player bets 1 dollar each time. The player’s average winnings were −.006. The game of craps would seem to be only slightly unfavorable. Let us calculate the expected winnings on a single play and see if this is the case. We construct a two-stage tree measure as shown in Figure 6.1. The first stage represents the possible sums for his first roll. The second stage represents the possible outcomes for the game if it has not ended on the first roll. In this stage we are representing the possible outcomes of a sequence of rolls required to determine the final outcome. The branch probabilities for the first stage are computed in the usual way assuming all 36 possibilites for outcomes for the pair of dice are equally likely. For the second stage we assume that the game will eventually end, and we compute the conditional probabilities for obtaining either the point or a 7. For example, assume that the player’s point is 6. Then the game will end when one of the eleven pairs, (1, 5), (2, 4), (3, 3), (4, 2), (5, 1), (1, 6), (2, 5), (3, 4), (4, 3), (5, 2), (6, 1), occurs. We assume that each of these possible pairs has the same probability. Then the player wins in the first five cases and loses in the last six. Thus the probability of winning is 5/11 and the probability of losing is 6/11. From the path probabilities, we can find the probability that the player wins 1 dollar; it is 244/495. The probability of losing is then 251/495. Thus if X is his winning for | prob_Page_243_Chunk5082 |
236 CHAPTER 6. EXPECTED VALUE AND VARIANCE W L W L W L W L W L W L (2,3,12) L 10 9 8 6 5 4 (7,11) W 1/3 2/3 2/5 3/5 5/11 6/11 5/11 6/11 2/5 3/5 1/3 2/3 2/9 1/12 1/9 5/36 5/36 1/9 1/12 1/9 1/36 2/36 2/45 3/45 25/396 30/396 25/396 30/396 2/45 3/45 1/36 2/36 Figure 6.1: Tree measure for craps. | prob_Page_244_Chunk5083 |
6.1. EXPECTED VALUE 237 a dollar bet, E(X) = 1 244 495 + (−1) 251 495 = −7 495 ≈−.0141 . The game is unfavorable, but only slightly. The player’s expected gain in n plays is −n(.0141). If n is not large, this is a small expected loss for the player. The casino makes a large number of plays and so can afford a small average gain per play and still expect a large profit. 2 Roulette Example 6.13 In Las Vegas, a roulette wheel has 38 slots numbered 0, 00, 1, 2, . . . , 36. The 0 and 00 slots are green, and half of the remaining 36 slots are red and half are black. A croupier spins the wheel and throws an ivory ball. If you bet 1 dollar on red, you win 1 dollar if the ball stops in a red slot, and otherwise you lose a dollar. We wish to calculate the expected value of your winnings, if you bet 1 dollar on red. Let X be the random variable which denotes your winnings in a 1 dollar bet on red in Las Vegas roulette. Then the distribution of X is given by mX = −1 1 20/38 18/38 , and one can easily calculate (see Exercise 5) that E(X) ≈−.0526 . We now consider the roulette game in Monte Carlo, and follow the treatment of Sagan.1 In the roulette game in Monte Carlo there is only one 0. If you bet 1 franc on red and a 0 turns up, then, depending upon the casino, one or more of the following options may be offered: (a) You get 1/2 of your bet back, and the casino gets the other half of your bet. (b) Your bet is put “in prison,” which we will denote by P1. If red comes up on the next turn, you get your bet back (but you don’t win any money). If black or 0 comes up, you lose your bet. (c) Your bet is put in prison P1, as before. If red comes up on the next turn, you get your bet back, and if black comes up on the next turn, then you lose your bet. If a 0 comes up on the next turn, then your bet is put into double prison, which we will denote by P2. If your bet is in double prison, and if red comes up on the next turn, then your bet is moved back to prison P1 and the game proceeds as before. If your bet is in double prison, and if black or 0 come up on the next turn, then you lose your bet. We refer the reader to Figure 6.2, where a tree for this option is shown. In this figure, S is the starting position, W means that you win your bet, L means that you lose your bet, and E means that you break even. 1H. Sagan, Markov Chains in Monte Carlo, Math. Mag., vol. 54, no. 1 (1981), pp. 3-10. | prob_Page_245_Chunk5084 |
238 CHAPTER 6. EXPECTED VALUE AND VARIANCE S W L E L L L L L L E P1 P1 P1 P2 P2 P2 Figure 6.2: Tree for 2-prison Monte Carlo roulette. It is interesting to compare the expected winnings of a 1 franc bet on red, under each of these three options. We leave the first two calculations as an exercise (see Exercise 37). Suppose that you choose to play alternative (c). The calculation for this case illustrates the way that the early French probabilists worked problems like this. Suppose you bet on red, you choose alternative (c), and a 0 comes up. Your possible future outcomes are shown in the tree diagram in Figure 6.3. Assume that your money is in the first prison and let x be the probability that you lose your franc. From the tree diagram we see that x = 18 37 + 1 37P(you lose your franc | your franc is in P2) . Also, P(you lose your franc | your franc is in P2) = 19 37 + 18 37x . So, we have x = 18 37 + 1 37 19 37 + 18 37x . Solving for x, we obtain x = 685/1351. Thus, starting at S, the probability that you lose your bet equals 18 37 + 1 37x = 25003 49987 . To find the probability that you win when you bet on red, note that you can only win if red comes up on the first turn, and this happens with probability 18/37. Thus your expected winnings are 1 · 18 37 −1 · 25003 49987 = −687 49987 ≈−.0137 . | prob_Page_246_Chunk5085 |
6.1. EXPECTED VALUE 239 P W L P P L 18/37 18/37 1/37 19/37 18/37 1 1 2 Figure 6.3: Your money is put in prison. It is interesting to note that the more romantic option (c) is less favorable than option (a) (see Exercise 37). If you bet 1 dollar on the number 17, then the distribution function for your winnings X is PX = −1 35 36/37 1/37 , and the expected winnings are −1 · 36 37 + 35 · 1 37 = −1 37 ≈−.027 . Thus, at Monte Carlo different bets have different expected values. In Las Vegas almost all bets have the same expected value of −2/38 = −.0526 (see Exercises 4 and 5). 2 Conditional Expectation Definition 6.2 If F is any event and X is a random variable with sample space Ω= {x1, x2, . . .}, then the conditional expectation given F is defined by E(X|F) = X j xjP(X = xj|F) . Conditional expectation is used most often in the form provided by the following theorem. 2 Theorem 6.5 Let X be a random variable with sample space Ω. If F1, F2, . . . , Fr are events such that Fi ∩Fj = ∅for i ̸= j and Ω= ∪jFj, then E(X) = X j E(X|Fj)P(Fj) . | prob_Page_247_Chunk5086 |
240 CHAPTER 6. EXPECTED VALUE AND VARIANCE Proof. We have X j E(X|Fj)P(Fj) = X j X k xkP(X = xk|Fj)P(Fj) = X j X k xkP(X = xk and Fj occurs) = X k X j xkP(X = xk and Fj occurs) = X k xkP(X = xk) = E(X) . 2 Example 6.14 (Example 6.12 continued) Let T be the number of rolls in a single play of craps. We can think of a single play as a two-stage process. The first stage consists of a single roll of a pair of dice. The play is over if this roll is a 2, 3, 7, 11, or 12. Otherwise, the player’s point is established, and the second stage begins. This second stage consists of a sequence of rolls which ends when either the player’s point or a 7 is rolled. We record the outcomes of this two-stage experiment using the random variables X and S, where X denotes the first roll, and S denotes the number of rolls in the second stage of the experiment (of course, S is sometimes equal to 0). Note that T = S + 1. Then by Theorem 6.5 E(T) = 12 X j=2 E(T|X = j)P(X = j) . If j = 7, 11 or 2, 3, 12, then E(T|X = j) = 1. If j = 4, 5, 6, 8, 9, or 10, we can use Example 6.4 to calculate the expected value of S. In each of these cases, we continue rolling until we get either a j or a 7. Thus, S is geometrically distributed with parameter p, which depends upon j. If j = 4, for example, the value of p is 3/36 + 6/36 = 1/4. Thus, in this case, the expected number of additional rolls is 1/p = 4, so E(T|X = 4) = 1 + 4 = 5. Carrying out the corresponding calculations for the other possible values of j and using Theorem 6.5 gives E(T) = 1 12 36 + 1 + 36 3 + 6 3 36 + 1 + 36 4 + 6 4 36 + 1 + 36 5 + 6 5 36 + 1 + 36 5 + 6 5 36 + 1 + 36 4 + 6 4 36 + 1 + 36 3 + 6 3 36 = 557 165 ≈ 3.375 . . . . 2 | prob_Page_248_Chunk5087 |
6.1. EXPECTED VALUE 241 Martingales We can extend the notion of fairness to a player playing a sequence of games by using the concept of conditional expectation. Example 6.15 Let S1, S2, . . . , Sn be Peter’s accumulated fortune in playing heads or tails (see Example 1.4). Then E(Sn|Sn−1 = a, . . . , S1 = r) = 1 2(a + 1) + 1 2(a −1) = a . We note that Peter’s expected fortune after the next play is equal to his present fortune. When this occurs, we say the game is fair. A fair game is also called a martingale. If the coin is biased and comes up heads with probability p and tails with probability q = 1 −p, then E(Sn|Sn−1 = a, . . . , S1 = r) = p(a + 1) + q(a −1) = a + p −q . Thus, if p < q, this game is unfavorable, and if p > q, it is favorable. 2 If you are in a casino, you will see players adopting elaborate systems of play to try to make unfavorable games favorable. Two such systems, the martingale doubling system and the more conservative Labouchere system, were described in Exercises 1.1.9 and 1.1.10. Unfortunately, such systems cannot change even a fair game into a favorable game. Even so, it is a favorite pastime of many people to develop systems of play for gambling games and for other games such as the stock market. We close this section with a simple illustration of such a system. Stock Prices Example 6.16 Let us assume that a stock increases or decreases in value each day by 1 dollar, each with probability 1/2. Then we can identify this simplified model with our familiar game of heads or tails. We assume that a buyer, Mr. Ace, adopts the following strategy. He buys the stock on the first day at its price V . He then waits until the price of the stock increases by one to V + 1 and sells. He then continues to watch the stock until its price falls back to V . He buys again and waits until it goes up to V +1 and sells. Thus he holds the stock in intervals during which it increases by 1 dollar. In each such interval, he makes a profit of 1 dollar. However, we assume that he can do this only for a finite number of trading days. Thus he can lose if, in the last interval that he holds the stock, it does not get back up to V + 1; and this is the only way he can lose. In Figure 6.4 we illustrate a typical history if Mr. Ace must stop in twenty days. Mr. Ace holds the stock under his system during the days indicated by broken lines. We note that for the history shown in Figure 6.4, his system nets him a gain of 4 dollars. We have written a program StockSystem to simulate the fortune of Mr. Ace if he uses his sytem over an n-day period. If one runs this program a large number | prob_Page_249_Chunk5088 |
242 CHAPTER 6. EXPECTED VALUE AND VARIANCE 5 10 15 20 -1 -0.5 0.5 1 1.5 2 Figure 6.4: Mr. Ace’s system. of times, for n = 20, say, one finds that his expected winnings are very close to 0, but the probability that he is ahead after 20 days is significantly greater than 1/2. For small values of n, the exact distribution of winnings can be calculated. The distribution for the case n = 20 is shown in Figure 6.5. Using this distribution, it is easy to calculate that the expected value of his winnings is exactly 0. This is another instance of the fact that a fair game (a martingale) remains fair under quite general systems of play. Although the expected value of his winnings is 0, the probability that Mr. Ace is ahead after 20 days is about .610. Thus, he would be able to tell his friends that his system gives him a better chance of being ahead than that of someone who simply buys the stock and holds it, if our simple random model is correct. There have been a number of studies to determine how random the stock market is. 2 Historical Remarks With the Law of Large Numbers to bolster the frequency interpretation of proba- bility, we find it natural to justify the definition of expected value in terms of the average outcome over a large number of repetitions of the experiment. The concept of expected value was used before it was formally defined; and when it was used, it was considered not as an average value but rather as the appropriate value for a gamble. For example recall, from the Historical Remarks section of Chapter 1, Section 1.2, Pascal’s way of finding the value of a three-game series that had to be called offbefore it is finished. Pascal first observed that if each player has only one game to win, then the stake of 64 pistoles should be divided evenly. Then he considered the case where one player has won two games and the other one. Then consider, Sir, if the first man wins, he gets 64 pistoles, if he loses he gets 32. Thus if they do not wish to risk this last game, but wish | prob_Page_250_Chunk5089 |
6.1. EXPECTED VALUE 243 -20 -15 -10 -5 0 5 10 0 0.05 0.1 0.15 0.2 Figure 6.5: Winnings distribution for n = 20. to separate without playing it, the first man must say: “I am certain to get 32 pistoles, even if I lose I still get them; but as for the other 32 pistoles, perhaps I will get them, perhaps you will get them, the chances are equal. Let us then divide these 32 pistoles in half and give one half to me as well as my 32 which are mine for sure.” He will then have 48 pistoles and the other 16.2 Note that Pascal reduced the problem to a symmetric bet in which each player gets the same amount and takes it as obvious that in this case the stakes should be divided equally. The first systematic study of expected value appears in Huygens’ book. Like Pascal, Huygens find the value of a gamble by assuming that the answer is obvious for certain symmetric situations and uses this to deduce the expected for the general situation. He does this in steps. His first proposition is Prop. I. If I expect a or b, either of which, with equal probability, may fall to me, then my Expectation is worth (a+b)/2, that is, the half Sum of a and b.3 Huygens proved this as follows: Assume that two player A and B play a game in which each player puts up a stake of (a + b)/2 with an equal chance of winning the total stake. Then the value of the game to each player is (a + b)/2. For example, if the game had to be called offclearly each player should just get back his original stake. Now, by symmetry, this value is not changed if we add the condition that the winner of the game has to pay the loser an amount b as a consolation prize. Then for player A the value is still (a + b)/2. But what are his possible outcomes 2Quoted in F. N. David, Games, Gods and Gambling (London: Griffin, 1962), p. 231. 3C. Huygens, Calculating in Games of Chance, translation attributed to John Arbuthnot (Lon- don, 1692), p. 34. | prob_Page_251_Chunk5090 |
244 CHAPTER 6. EXPECTED VALUE AND VARIANCE for the modified game? If he wins he gets the total stake a + b and must pay B an amount b so ends up with a. If he loses he gets an amount b from player B. Thus player A wins a or b with equal chances and the value to him is (a + b)/2. Huygens illustrated this proof in terms of an example. If you are offered a game in which you have an equal chance of winning 2 or 8, the expected value is 5, since this game is equivalent to the game in which each player stakes 5 and agrees to pay the loser 3 — a game in which the value is obviously 5. Huygens’ second proposition is Prop. II. If I expect a, b, or c, either of which, with equal facility, may happen, then the Value of my Expectation is (a + b + c)/3, or the third of the Sum of a, b, and c.4 His argument here is similar. Three players, A, B, and C, each stake (a + b + c)/3 in a game they have an equal chance of winning. The value of this game to player A is clearly the amount he has staked. Further, this value is not changed if A enters into an agreement with B that if one of them wins he pays the other a consolation prize of b and with C that if one of them wins he pays the other a consolation prize of c. By symmetry these agreements do not change the value of the game. In this modified game, if A wins he wins the total stake a + b + c minus the consolation prizes b + c giving him a final winning of a. If B wins, A wins b and if C wins, A wins c. Thus A finds himself in a game with value (a + b + c)/3 and with outcomes a, b, and c occurring with equal chance. This proves Proposition II. More generally, this reasoning shows that if there are n outcomes a1, a2, . . . , an , all occurring with the same probability, the expected value is a1 + a2 + · · · + an n . In his third proposition Huygens considered the case where you win a or b but with unequal probabilities. He assumed there are p chances of winning a, and q chances of winning b, all having the same probability. He then showed that the expected value is E = p p + q · a + q p + q · b . This follows by considering an equivalent gamble with p + q outcomes all occurring with the same probability and with a payoffof a in p of the outcomes and b in q of the outcomes. This allowed Huygens to compute the expected value for experiments with unequal probabilities, at least when these probablities are rational numbers. Thus, instead of defining the expected value as a weighted average, Huygens assumed that the expected value of certain symmetric gambles are known and de- duced the other values from these. Although this requires a good deal of clever 4ibid., p. 35. | prob_Page_252_Chunk5091 |
6.1. EXPECTED VALUE 245 manipulation, Huygens ended up with values that agree with those given by our modern definition of expected value. One advantage of this method is that it gives a justification for the expected value in cases where it is not reasonable to assume that you can repeat the experiment a large number of times, as for example, in betting that at least two presidents died on the same day of the year. (In fact, three did; all were signers of the Declaration of Independence, and all three died on July 4.) In his book, Huygens calculated the expected value of games using techniques similar to those which we used in computing the expected value for roulette at Monte Carlo. For example, his proposition XIV is: Prop. XIV. If I were playing with another by turns, with two Dice, on this Condition, that if I throw 7 I gain, and if he throws 6 he gains allowing him the first Throw: To find the proportion of my Hazard to his.5 A modern description of this game is as follows. Huygens and his opponent take turns rolling a die. The game is over if Huygens rolls a 7 or his opponent rolls a 6. His opponent rolls first. What is the probability that Huygens wins the game? To solve this problem Huygens let x be his chance of winning when his opponent threw first and y his chance of winning when he threw first. Then on the first roll his opponent wins on 5 out of the 36 possibilities. Thus, x = 31 36 · y . But when Huygens rolls he wins on 6 out of the 36 possible outcomes, and in the other 30, he is led back to where his chances are x. Thus y = 6 36 + 30 36 · x . From these two equations Huygens found that x = 31/61. Another early use of expected value appeared in Pascal’s argument to show that a rational person should believe in the existence of God.6 Pascal said that we have to make a wager whether to believe or not to believe. Let p denote the probability that God does not exist. His discussion suggests that we are playing a game with two strategies, believe and not believe, with payoffs as shown in Table 6.4. Here −u represents the cost to you of passing up some worldly pleasures as a consequence of believing that God exists. If you do not believe, and God is a vengeful God, you will lose x. If God exists and you do believe you will gain v. Now to determine which strategy is best you should compare the two expected values p(−u) + (1 −p)v and p0 + (1 −p)(−x), 5ibid., p. 47. 6Quoted in I. Hacking, The Emergence of Probability (Cambridge: Cambridge Univ. Press, 1975). | prob_Page_253_Chunk5092 |
246 CHAPTER 6. EXPECTED VALUE AND VARIANCE God does not exist God exists p 1 −p believe −u v not believe 0 −x Table 6.4: Payoffs. Age Survivors 0 100 6 64 16 40 26 25 36 16 46 10 56 6 66 3 76 1 Table 6.5: Graunt’s mortality data. and choose the larger of the two. In general, the choice will depend upon the value of p. But Pascal assumed that the value of v is infinite and so the strategy of believing is best no matter what probability you assign for the existence of God. This example is considered by some to be the beginning of decision theory. Decision analyses of this kind appear today in many fields, and, in particular, are an important part of medical diagnostics and corporate business decisions. Another early use of expected value was to decide the price of annuities. The study of statistics has its origins in the use of the bills of mortality kept in the parishes in London from 1603. These records kept a weekly tally of christenings and burials. From these John Graunt made estimates for the population of London and also provided the first mortality data,7 shown in Table 6.5. As Hacking observes, Graunt apparently constructed this table by assuming that after the age of 6 there is a constant probability of about 5/8 of surviving for another decade.8 For example, of the 64 people who survive to age 6, 5/8 of 64 or 40 survive to 16, 5/8 of these 40 or 25 survive to 26, and so forth. Of course, he rounded offhis figures to the nearest whole person. Clearly, a constant mortality rate cannot be correct throughout the whole range, and later tables provided by Halley were more realistic in this respect.9 7ibid., p. 108. 8ibid., p. 109. 9E. Halley, “An Estimate of The Degrees of Mortality of Mankind,” Phil. Trans. Royal. Soc., | prob_Page_254_Chunk5093 |
6.1. EXPECTED VALUE 247 A terminal annuity provides a fixed amount of money during a period of n years. To determine the price of a terminal annuity one needs only to know the appropriate interest rate. A life annuity provides a fixed amount during each year of the buyer’s life. The appropriate price for a life annuity is the expected value of the terminal annuity evaluated for the random lifetime of the buyer. Thus, the work of Huygens in introducing expected value and the work of Graunt and Halley in determining mortality tables led to a more rational method for pricing annuities. This was one of the first serious uses of probability theory outside the gambling houses. Although expected value plays a role now in every branch of science, it retains its importance in the casino. In 1962, Edward Thorp’s book Beat the Dealer 10 provided the reader with a strategy for playing the popular casino game of blackjack that would assure the player a positive expected winning. This book forevermore changed the belief of the casinos that they could not be beat. Exercises 1 A card is drawn at random from a deck consisting of cards numbered 2 through 10. A player wins 1 dollar if the number on the card is odd and loses 1 dollar if the number if even. What is the expected value of his win- nings? 2 A card is drawn at random from a deck of playing cards. If it is red, the player wins 1 dollar; if it is black, the player loses 2 dollars. Find the expected value of the game. 3 In a class there are 20 students: 3 are 5’ 6”, 5 are 5’8”, 4 are 5’10”, 4 are 6’, and 4 are 6’ 2”. A student is chosen at random. What is the student’s expected height? 4 In Las Vegas the roulette wheel has a 0 and a 00 and then the numbers 1 to 36 marked on equal slots; the wheel is spun and a ball stops randomly in one slot. When a player bets 1 dollar on a number, he receives 36 dollars if the ball stops on this number, for a net gain of 35 dollars; otherwise, he loses his dollar bet. Find the expected value for his winnings. 5 In a second version of roulette in Las Vegas, a player bets on red or black. Half of the numbers from 1 to 36 are red, and half are black. If a player bets a dollar on black, and if the ball stops on a black number, he gets his dollar back and another dollar. If the ball stops on a red number or on 0 or 00 he loses his dollar. Find the expected winnings for this bet. 6 A die is rolled twice. Let X denote the sum of the two numbers that turn up, and Y the difference of the numbers (specifically, the number on the first roll minus the number on the second). Show that E(XY ) = E(X)E(Y ). Are X and Y independent? vol. 17 (1693), pp. 596–610; 654–656. 10E. Thorp, Beat the Dealer (New York: Random House, 1962). | prob_Page_255_Chunk5094 |
248 CHAPTER 6. EXPECTED VALUE AND VARIANCE *7 Show that, if X and Y are random variables taking on only two values each, and if E(XY ) = E(X)E(Y ), then X and Y are independent. 8 A royal family has children until it has a boy or until it has three children, whichever comes first. Assume that each child is a boy with probability 1/2. Find the expected number of boys in this royal family and the expected num- ber of girls. 9 If the first roll in a game of craps is neither a natural nor craps, the player can make an additional bet, equal to his original one, that he will make his point before a seven turns up. If his point is four or ten he is paid offat 2 : 1 odds; if it is a five or nine he is paid offat odds 3 : 2; and if it is a six or eight he is paid offat odds 6 : 5. Find the player’s expected winnings if he makes this additional bet when he has the opportunity. 10 In Example 6.16 assume that Mr. Ace decides to buy the stock and hold it until it goes up 1 dollar and then sell and not buy again. Modify the program StockSystem to find the distribution of his profit under this system after a twenty-day period. Find the expected profit and the probability that he comes out ahead. 11 On September 26, 1980, the New York Times reported that a mysterious stranger strode into a Las Vegas casino, placed a single bet of 777,000 dollars on the “don’t pass” line at the crap table, and walked away with more than 1.5 million dollars. In the “don’t pass” bet, the bettor is essentially betting with the house. An exception occurs if the roller rolls a 12 on the first roll. In this case, the roller loses and the “don’t pass” better just gets back the money bet instead of winning. Show that the “don’t pass” bettor has a more favorable bet than the roller. 12 Recall that in the martingale doubling system (see Exercise 1.1.10), the player doubles his bet each time he loses. Suppose that you are playing roulette in a fair casino where there are no 0’s, and you bet on red each time. You then win with probability 1/2 each time. Assume that you enter the casino with 100 dollars, start with a 1-dollar bet and employ the martingale system. You stop as soon as you have won one bet, or in the unlikely event that black turns up six times in a row so that you are down 63 dollars and cannot make the required 64-dollar bet. Find your expected winnings under this system of play. 13 You have 80 dollars and play the following game. An urn contains two white balls and two black balls. You draw the balls out one at a time without replacement until all the balls are gone. On each draw, you bet half of your present fortune that you will draw a white ball. What is your expected final fortune? 14 In the hat check problem (see Example 3.12), it was assumed that N people check their hats and the hats are handed back at random. Let Xj = 1 if the | prob_Page_256_Chunk5095 |
6.1. EXPECTED VALUE 249 jth person gets his or her hat and 0 otherwise. Find E(Xj) and E(Xj · Xk) for j not equal to k. Are Xj and Xk independent? 15 A box contains two gold balls and three silver balls. You are allowed to choose successively balls from the box at random. You win 1 dollar each time you draw a gold ball and lose 1 dollar each time you draw a silver ball. After a draw, the ball is not replaced. Show that, if you draw until you are ahead by 1 dollar or until there are no more gold balls, this is a favorable game. 16 Gerolamo Cardano in his book, The Gambling Scholar, written in the early 1500s, considers the following carnival game. There are six dice. Each of the dice has five blank sides. The sixth side has a number between 1 and 6—a different number on each die. The six dice are rolled and the player wins a prize depending on the total of the numbers which turn up. (a) Find, as Cardano did, the expected total without finding its distribution. (b) Large prizes were given for large totals with a modest fee to play the game. Explain why this could be done. 17 Let X be the first time that a failure occurs in an infinite sequence of Bernoulli trials with probability p for success. Let pk = P(X = k) for k = 1, 2, . . . . Show that pk = pk−1q where q = 1 −p. Show that P k pk = 1. Show that E(X) = 1/q. What is the expected number of tosses of a coin required to obtain the first tail? 18 Exactly one of six similar keys opens a certain door. If you try the keys, one after another, what is the expected number of keys that you will have to try before success? 19 A multiple choice exam is given. A problem has four possible answers, and exactly one answer is correct. The student is allowed to choose a subset of the four possible answers as his answer. If his chosen subset contains the correct answer, the student receives three points, but he loses one point for each wrong answer in his chosen subset. Show that if he just guesses a subset uniformly and randomly his expected score is zero. 20 You are offered the following game to play: a fair coin is tossed until heads turns up for the first time (see Example 6.3). If this occurs on the first toss you receive 2 dollars, if it occurs on the second toss you receive 22 = 4 dollars and, in general, if heads turns up for the first time on the nth toss you receive 2n dollars. (a) Show that the expected value of your winnings does not exist (i.e., is given by a divergent sum) for this game. Does this mean that this game is favorable no matter how much you pay to play it? (b) Assume that you only receive 210 dollars if any number greater than or equal to ten tosses are required to obtain the first head. Show that your expected value for this modified game is finite and find its value. | prob_Page_257_Chunk5096 |
250 CHAPTER 6. EXPECTED VALUE AND VARIANCE (c) Assume that you pay 10 dollars for each play of the original game. Write a program to simulate 100 plays of the game and see how you do. (d) Now assume that the utility of n dollars is √n. Write an expression for the expected utility of the payment, and show that this expression has a finite value. Estimate this value. Repeat this exercise for the case that the utility function is log(n). 21 Let X be a random variable which is Poisson distributed with parameter λ. Show that E(X) = λ. Hint: Recall that ex = 1 + x + x2 2! + x3 3! + · · · . 22 Recall that in Exercise 1.1.14, we considered a town with two hospitals. In the large hospital about 45 babies are born each day, and in the smaller hospital about 15 babies are born each day. We were interested in guessing which hospital would have on the average the largest number of days with the property that more than 60 percent of the children born on that day are boys. For each hospital find the expected number of days in a year that have the property that more than 60 percent of the children born on that day were boys. 23 An insurance company has 1,000 policies on men of age 50. The company estimates that the probability that a man of age 50 dies within a year is .01. Estimate the number of claims that the company can expect from beneficiaries of these men within a year. 24 Using the life table for 1981 in Appendix C, write a program to compute the expected lifetime for males and females of each possible age from 1 to 85. Compare the results for males and females. Comment on whether life insur- ance should be priced differently for males and females. *25 A deck of ESP cards consists of 20 cards each of two types: say ten stars, ten circles (normally there are five types). The deck is shuffled and the cards turned up one at a time. You, the alleged percipient, are to name the symbol on each card before it is turned up. Suppose that you are really just guessing at the cards. If you do not get to see each card after you have made your guess, then it is easy to calculate the expected number of correct guesses, namely ten. If, on the other hand, you are guessing with information, that is, if you see each card after your guess, then, of course, you might expect to get a higher score. This is indeed the case, but calculating the correct expectation is no longer easy. But it is easy to do a computer simulation of this guessing with information, so we can get a good idea of the expectation by simulation. (This is similar to the way that skilled blackjack players make blackjack into a favorable game by observing the cards that have already been played. See Exercise 29.) | prob_Page_258_Chunk5097 |
6.1. EXPECTED VALUE 251 (a) First, do a simulation of guessing without information, repeating the experiment at least 1000 times. Estimate the expected number of correct answers and compare your result with the theoretical expectation. (b) What is the best strategy for guessing with information? (c) Do a simulation of guessing with information, using the strategy in (b). Repeat the experiment at least 1000 times, and estimate the expectation in this case. (d) Let S be the number of stars and C the number of circles in the deck. Let h(S, C) be the expected winnings using the optimal guessing strategy in (b). Show that h(S, C) satisfies the recursion relation h(S, C) = S S + C h(S −1, C) + C S + C h(S, C −1) + max(S, C) S + C , and h(0, 0) = h(−1, 0) = h(0, −1) = 0. Using this relation, write a program to compute h(S, C) and find h(10, 10). Compare the computed value of h(10, 10) with the result of your simulation in (c). For more about this exercise and Exercise 26 see Diaconis and Graham.11 *26 Consider the ESP problem as described in Exercise 25. You are again guessing with information, and you are using the optimal guessing strategy of guessing star if the remaining deck has more stars, circle if more circles, and tossing a coin if the number of stars and circles are equal. Assume that S ≥C, where S is the number of stars and C the number of circles. We can plot the results of a typical game on a graph, where the horizontal axis represents the number of steps and the vertical axis represents the difference between the number of stars and the number of circles that have been turned up. A typical game is shown in Figure 6.6. In this particular game, the order in which the cards were turned up is (C, S, S, S, S, C, C, S, S, C). Thus, in this particular game, there were six stars and four circles in the deck. This means, in particular, that every game played with this deck would have a graph which ends at the point (10, 2). We define the line L to be the horizontal line which goes through the ending point on the graph (so its vertical coordinate is just the difference between the number of stars and circles in the deck). (a) Show that, when the random walk is below the line L, the player guesses right when the graph goes up (star is turned up) and, when the walk is above the line, the player guesses right when the walk goes down (circle turned up). Show from this property that the subject is sure to have at least S correct guesses. (b) When the walk is at a point (x, x) on the line L the number of stars and circles remaining is the same, and so the subject tosses a coin. Show that 11P. Diaconis and R. Graham, “The Analysis of Sequential Experiments with Feedback to Sub- jects,” Annals of Statistics, vol. 9 (1981), pp. 3–23. | prob_Page_259_Chunk5098 |
252 CHAPTER 6. EXPECTED VALUE AND VARIANCE 2 1 1 2 3 4 5 6 7 8 9 10 (10,2) L Figure 6.6: Random walk for ESP. the probability that the walk reaches (x, x) is | prob_Page_260_Chunk5099 |
6.1. EXPECTED VALUE 253 (a) Show that if n ≤2k −1, then there is a strategy that guarantees you will correctly guess the number in k tries. (b) Show that if n ≥2k −1, there is a strategy that assures you of identifying one of 2k −1 numbers and hence gives a probability of (2k −1)/n of winning. Why is this an optimal strategy? Illustrate your result in terms of the case n = 9 and k = 3. 29 In the casino game of blackjack the dealer is dealt two cards, one face up and one face down, and each player is dealt two cards, both face down. If the dealer is showing an ace the player can look at his down cards and then make a bet called an insurance bet. (Expert players will recognize why it is called insurance.) If you make this bet you will win the bet if the dealer’s second card is a ten card: namely, a ten, jack, queen, or king. If you win, you are paid twice your insurance bet; otherwise you lose this bet. Show that, if the only cards you can see are the dealer’s ace and your two cards and if your cards are not ten cards, then the insurance bet is an unfavorable bet. Show, however, that if you are playing two hands simultaneously, and you have no ten cards, then it is a favorable bet. (Thorp13 has shown that the game of blackjack is favorable to the player if he or she can keep good enough track of the cards that have been played.) 30 Assume that, every time you buy a box of Wheaties, you receive a picture of one of the n players for the New York Yankees (see Exercise 3.2.34). Let Xk be the number of additional boxes you have to buy, after you have obtained k−1 different pictures, in order to obtain the next new picture. Thus X1 = 1, X2 is the number of boxes bought after this to obtain a picture different from the first pictured obtained, and so forth. (a) Show that Xk has a geometric distribution with p = (n −k + 1)/n. (b) Simulate the experiment for a team with 26 players (25 would be more accurate but we want an even number). Carry out a number of simula- tions and estimate the expected time required to get the first 13 players and the expected time to get the second 13. How do these expectations compare? (c) Show that, if there are 2n players, the expected time to get the first half of the players is 2n 1 2n + 1 2n −1 + · · · + 1 n + 1 , and the expected time to get the second half is 2n 1 n + 1 n −1 + · · · + 1 . 13E. Thorp, Beat the Dealer (New York: Random House, 1962). | prob_Page_261_Chunk5100 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.