text
stringlengths
1
7.76k
source
stringlengths
17
81
54 CHAPTER 2. CONTINUOUS PROBABILITY DENSITIES a car to pass on a highway, or the times between emissions of particles from a radioactive source, are simulated by a sequence of random numbers, each of which is chosen by computing (−1/λ) log(rnd), where 1/λ is the average time between cars or emissions. Write a program ...
prob_Page_62_Chunk4901
2.2. CONTINUOUS DENSITY FUNCTIONS 55 This describes an experiment of dropping a long straw at random on a table on which a circle is drawn. Write a program to simulate this experiment 10000 times and estimate the probability that the length of the chord is greater than √ 3. How does your estimate compare with the resul...
prob_Page_63_Chunk4902
56 CHAPTER 2. CONTINUOUS PROBABILITY DENSITIES 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 Figure 2.11: Spinner experiment. The difference is that in the continuous case, the quantity being integrated, f(x), is not the probability of the outcome x. (However, if one uses infinitesimals, one can consider f(x) dx as the probabi...
prob_Page_64_Chunk4903
2.2. CONTINUOUS DENSITY FUNCTIONS 57 game there may well be!), it is natural to assume that the coordinates are chosen at random. (When doing this with a computer, each coordinate is chosen uniformly from the interval [−1, 1]. If the resulting point does not lie inside the unit circle, the point is not counted.) Then t...
prob_Page_65_Chunk4904
58 CHAPTER 2. CONTINUOUS PROBABILITY DENSITIES 0 0.2 0.4 0.6 0.8 1 0 0.5 1 1.5 2 0 0.2 0.4 0.6 0.8 1 2 1.5 1 0.5 0 Figure 2.12: Distribution of dart distances in 400 throws. Thus, P(E) =2(length of E)(midpoint of E). Here we see that the probability assigned to the interval E depends not only on its length but also on ...
prob_Page_66_Chunk4905
2.2. CONTINUOUS DENSITY FUNCTIONS 59 Density Functions of Continuous Random Variables Definition 2.1 Let X be a continuous real-valued random variable. A density function for X is a real-valued function f which satisfies P(a ≤X ≤b) = Z b a f(x) dx for all a, b ∈R. 2 We note that it is not the case that all continuous rea...
prob_Page_67_Chunk4906
60 CHAPTER 2. CONTINUOUS PROBABILITY DENSITIES In these two examples, the density function is constant and does not depend on the particular outcome. It is often the case that experiments in which the coordinates are chosen at random can be described by constant density functions, and, as in Section 1.2, we call such d...
prob_Page_68_Chunk4907
2.2. CONTINUOUS DENSITY FUNCTIONS 61 A glance at the graph of a density function tells us immediately which events of an experiment are more likely. Roughly speaking, we can say that where the density is large the events are more likely, and where it is small the events are less likely. In Example 2.4 the density funct...
prob_Page_69_Chunk4908
62 CHAPTER 2. CONTINUOUS PROBABILITY DENSITIES -1 -0.5 0 0.5 1 1.5 2 0.25 0.5 0.75 1 1.25 1.5 1.75 2 f (x) F (x) X X Figure 2.13: Distribution and density for X = U 2. In many experiments, the density function of the relevant random variable is easy to write down. However, it is quite often the case that the cumulative...
prob_Page_70_Chunk4909
2.2. CONTINUOUS DENSITY FUNCTIONS 63 0.2 0.4 0.6 0.8 1 0.2 0.4 0.6 0.8 1 E.8 Figure 2.14: Calculation of distribution function for Example 2.14. When referring to a continuous random variable X (say with a uniform density function), it is customary to say that “X is uniformly distributed on the interval [a, b].” It is ...
prob_Page_71_Chunk4910
64 CHAPTER 2. CONTINUOUS PROBABILITY DENSITIES -1 1 2 3 0.2 0.4 0.6 0.8 1 -1 1 2 3 0.2 0.4 0.6 0.8 1 FZ (z) f (z) Z Figure 2.15: Distribution and density functions for Example 2.14. 1 E Z Figure 2.16: Calculation of Fz for Example 2.15. =        0, if z < 0, (1/2)z2, if 0 ≤z ≤1, 1 −(1/2)(2 −z)2, if 1 ≤z ≤2, 1, i...
prob_Page_72_Chunk4911
2.2. CONTINUOUS DENSITY FUNCTIONS 65 -1 -0.5 0.5 1 1.5 2 0.2 0.4 0.6 0.8 1 -1 -0.5 0 0.5 1 1.5 2 0.25 0.5 0.75 1 1.25 1.5 1.75 2 F (z) Z f (z) Z Figure 2.17: Distribution and density for Z = √ X2 + Y 2. E be the event {Z ≤z}. Then the distribution function FZ of Z (see Figure 2.16) is given by FZ(z) = P(Z ≤z) = Area of...
prob_Page_73_Chunk4912
66 CHAPTER 2. CONTINUOUS PROBABILITY DENSITIES 0 0.2 0.4 0.6 0.8 1 0 0.5 1 1.5 2 Figure 2.18: Simulation results for Example 2.15. Thus, we have FZ(z) =    0, if z ≤0, 1 −(1 −z)2, if 0 ≤z ≤1, 1, if z > 1. The density fZ(z) is again obtained by differentiation: fZ(z) =    0, if z ≤0, 2(1 −z), if 0 ≤z ≤1, 0, if z > ...
prob_Page_74_Chunk4913
2.2. CONTINUOUS DENSITY FUNCTIONS 67 E 1 - z 1 - z 1 - z 1 - z E Figure 2.19: Calculation of FZ. 20 40 60 80 100 120 0.005 0.01 0.015 0.02 0.025 0.03 f (t) = (1/30) e - (1/30) t Figure 2.20: Exponential density with λ = 1/30.
prob_Page_75_Chunk4914
68 CHAPTER 2. CONTINUOUS PROBABILITY DENSITIES 0 20 40 60 80 100 0 0.005 0.01 0.015 0.02 0.025 0.03 Figure 2.21: Residual lifespan of a hard drive. is distributed according to the exponential density. We will assume that this model applies here, with λ = 1/30. Now suppose that we have been operating our computer for 15...
prob_Page_76_Chunk4915
2.2. CONTINUOUS DENSITY FUNCTIONS 69 Assignment of Probabilities A fundamental question in practice is: How shall we choose the probability density function in describing any given experiment? The answer depends to a great extent on the amount and kind of information available to us about the experiment. In some cases,...
prob_Page_77_Chunk4916
70 CHAPTER 2. CONTINUOUS PROBABILITY DENSITIES 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 (start) 1 1 1 1 1 1 1 0 0 0 0 0 0 0 Figure 2.22: Tree for infinite number of tosses of a coin. form .10 ∗∗∗∗· · ·. This means that ω ∈E if and only if 1/2 ≤x < 3/4, and in this way we see that we can describe E by the interval [1/2, 3/4)....
prob_Page_78_Chunk4917
2.2. CONTINUOUS DENSITY FUNCTIONS 71 Exercises 1 Suppose you choose at random a real number X from the interval [2, 10]. (a) Find the density function f(x) and the probability of an event E for this experiment, where E is a subinterval [a, b] of [2, 10]. (b) From (a), find the probability that X > 5, that 5 < X < 7, and...
prob_Page_79_Chunk4918
72 CHAPTER 2. CONTINUOUS PROBABILITY DENSITIES 6 Assume that a new light bulb will burn out after t hours, where t is chosen from [0, ∞) with an exponential density f(t) = λe−λt . In this context, λ is often called the failure rate of the bulb. (a) Assume that λ = 0.01, and find the probability that the bulb will not bu...
prob_Page_80_Chunk4919
2.2. CONTINUOUS DENSITY FUNCTIONS 73 11 For examples such as those in Exercises 9 and 10, it might seem that at least you should not have to wait on average more than 10 minutes if the average time between occurrences is 10 minutes. Alas, even this is not true. To see why, consider the following assumption about the ti...
prob_Page_81_Chunk4920
74 CHAPTER 2. CONTINUOUS PROBABILITY DENSITIES 18 Write a program to choose a point (X, Y ) at random in a square of side 20 inches, doing this 10,000 times, and recording what fraction of the outcomes fall within 19 inches of the center; of these, what fraction fall between 8 and 10 inches of the center; and, of these...
prob_Page_82_Chunk4921
Chapter 3 Combinatorics 3.1 Permutations Many problems in probability theory require that we count the number of ways that a particular event can occur. For this, we study the topics of permutations and combinations. We consider permutations in this section and combinations in the next section. Before discussing permut...
prob_Page_83_Chunk4922
76 CHAPTER 3. COMBINATORICS ice cream cake ice cream cake ice cream cake ice cream cake ice cream cake ice cream cake (start) soup meat fish vegetable juice meat fish vegetable Figure 3.1: Tree for your menu. A Counting Technique A task is to be carried out in a sequence of r stages. There are n1 ways to carry out the ...
prob_Page_84_Chunk4923
3.1. PERMUTATIONS 77 (start) soup meat fish vegetable juice .8 .2 .2 .3 .3 .4 .5 .3 meat fish vegetable ω (ω) ω ω ω ω ω ω .4 .24 .16 .06 .08 .06 m 1 2 3 4 5 6 Figure 3.2: Two-stage probability assignment. that a customer chooses meat is m(ω1) + m(ω4) = .46. We shall say more about these tree measures when we discuss th...
prob_Page_85_Chunk4924
78 CHAPTER 3. COMBINATORICS Number of people Probability that all birthdays are different 20 .5885616 21 .5563117 22 .5243047 23 .4927028 24 .4616557 25 .4313003 Table 3.1: Birthday problem. Assume that there are 365 possible birthdays for each person (we ignore leap years). Order the people from 1 to r. For a sample po...
prob_Page_86_Chunk4925
3.1. PERMUTATIONS 79 Number of people Probability that all birthdays are different 10 .8830518 20 .5885616 30 .2936838 40 .1087682 50 .0296264 60 .0058773 70 .0008404 80 .0000857 90 .0000062 100 .0000003 Table 3.2: Birthday problem. We now turn to the topic of permutations. Permutations Definition 3.1 Let A be any finite ...
prob_Page_87_Chunk4926
80 CHAPTER 3. COMBINATORICS n n! 0 1 1 1 2 2 3 6 4 24 5 120 6 720 7 5040 8 40320 9 362880 10 3628800 Table 3.3: Values of the factorial function. each of these we have n −1 ways to assign the second object, n −2 for the third, and so forth. This proves the following theorem. Theorem 3.1 The total number of permutations...
prob_Page_88_Chunk4927
3.1. PERMUTATIONS 81 n n! Approximation Ratio 1 1 .922 1.084 2 2 1.919 1.042 3 6 5.836 1.028 4 24 23.506 1.021 5 120 118.019 1.016 6 720 710.078 1.013 7 5040 4980.396 1.011 8 40320 39902.395 1.010 9 362880 359536.873 1.009 10 3628800 3598696.619 1.008 Table 3.4: Stirling approximations to the factorial function. Definit...
prob_Page_89_Chunk4928
82 CHAPTER 3. COMBINATORICS Number of fixed points Fraction of permutations n = 10 n = 20 n = 30 0 .362 .370 .358 1 .368 .396 .358 2 .202 .164 .192 3 .052 .060 .070 4 .012 .008 .020 5 .004 .002 .002 Average number of fixed points .996 .948 1.042 Table 3.5: Fixed point distributions. of labels in this experiment, and that...
prob_Page_90_Chunk4929
3.1. PERMUTATIONS 83 Date Snowfall in inches 1974 75 1975 88 1976 72 1977 110 1978 85 1979 30 1980 55 1981 86 1982 51 1983 64 Table 3.6: Snowfall in Hanover. Year 1 2 3 4 5 6 7 8 9 10 Ranking 6 9 5 10 7 1 3 8 2 4 Table 3.7: Ranking of total snowfall. method is given in Example 3.12. Records Here is another interesting ...
prob_Page_91_Chunk4930
84 CHAPTER 3. COMBINATORICS We have written a program Records that counts the number of records in ran- domly chosen permutations. We have run this program for the cases n = 10, 20, 30. For n = 10 the average number of records is 2.968, for 20 it is 3.656, and for 30 it is 3.960. We see now that the averages increase, ...
prob_Page_92_Chunk4931
3.1. PERMUTATIONS 85 Houses 7 Cats 49 Mice 343 Wheat 2401 Hekat 16807 19607 The following interpretation has been suggested: there are seven houses, each with seven cats; each cat kills seven mice; each mouse would have eaten seven heads of wheat, each of which would have produced seven hekat measures of grain. With th...
prob_Page_93_Chunk4932
86 CHAPTER 3. COMBINATORICS also so that 1 is not in position k. The number of ways of achieving this kind of arrangement is just wn−1. Since there are n −1 possible values of k, we see that wn = (n −1)wn−1 + (n −1)wn−2 for n ≥3. One might conjecture from this last equation that the sequence {wn} grows like the sequenc...
prob_Page_94_Chunk4933
3.1. PERMUTATIONS 87 king,” just as in frustration solitaire. If the dealer goes through the 13 cards without a match he pays the players an amount equal to their stake, and the deal passes to someone else. If there is a match the dealer collects the players’ stakes; the players put up new stakes, and the dealer contin...
prob_Page_95_Chunk4934
88 CHAPTER 3. COMBINATORICS Stirling presented his formula n! ∼ √ 2πn n e n in his work Methodus Differentialis published in 1730.10 This approximation was used by de Moivre in establishing his celebrated central limit theorem that we will study in Chapter 9. De Moivre himself had independently established this approx...
prob_Page_96_Chunk4935
3.1. PERMUTATIONS 89 7 Five people get on an elevator that stops at five floors. Assuming that each has an equal probability of going to any one floor, find the probability that they all get offat different floors. 8 A finite set Ωhas n elements. Show that if we count the empty set and Ωas subsets, there are 2n subsets of Ω. 9...
prob_Page_97_Chunk4936
90 CHAPTER 3. COMBINATORICS (b) Assume that the lock can also have combinations that require you to push two buttons simultaneously and then the other three one at a time. How many more combinations does this permit? 15 A computing center has 3 processors that receive n jobs, with the jobs assigned to the processors pu...
prob_Page_98_Chunk4937
3.1. PERMUTATIONS 91 (d) Set the expression found in part (c) equal to −log(2), and solve for d as a function of n, thereby showing that d ∼ p 2(log 2) n . Hint: If all three summands in the expression found in part (b) are used, one obtains a cubic equation in d. If the smallest of the three terms is thrown away, one ...
prob_Page_99_Chunk4938
92 CHAPTER 3. COMBINATORICS (b) Write a computer program to compare Holmes’s and Watson’s guessing strategies as follows: fix a total N and choose 16 integers randomly between 1 and N. Let m denote the largest of these. Then Watson’s guess for N is m, while Holmes’s is 2m. See which of these is closer to N. Repeat this ...
prob_Page_100_Chunk4939
3.2. COMBINATIONS 93 Example 3.5 Let U = {a, b, c}. The subsets of U are φ, {a}, {b}, {c}, {a, b}, {a, c}, {b, c}, {a, b, c} . 2 Binomial Coefficients The number of distinct subsets with j elements that can be chosen from a set with n elements is denoted by
prob_Page_101_Chunk4940
94 CHAPTER 3. COMBINATORICS n = 0 1 10 1 10 45 120 210 252 210 120 45 10 1 9 1 9 36 84 126 126 84 36 9 1 8 1 8 28 56 70 56 28 8 1 7 1 7 21 35 35 21 7 1 6 1 6 15 20 15 6 1 5 1 5 10 10 5 1 4 1 4 6 4 1 3 1 3 3 1 2 1 2 1 1 1 1 j = 0 1 2 3 4 5 6 7 8 9 10 Figure 3.3: Pascal’s triangle. Pascal’s Triangle The relation 3.1, tog...
prob_Page_102_Chunk4941
3.2. COMBINATIONS 95 The above formula can be rewritten in the form n j  = n! j!(n −j)! . This immediately shows that n j  =  n n −j  . When using Equation 3.2 in the calculation of
prob_Page_103_Chunk4942
96 CHAPTER 3. COMBINATORICS (start) S F F F F S S S S S S F F F p q p p q p q q p q p q q q q q q p p p p p p q q p p q m (ω) ω ω ω ω ω ω ω ω ω 2 3 3 2 2 2 2 2 1 2 3 4 5 6 7 8 Figure 3.4: Tree diagram of three Bernoulli trials. Bernoulli Trials Our principal use of the binomial coefficients will occur in the study of one...
prob_Page_104_Chunk4943
3.2. COMBINATIONS 97 1 dollar. Since in American roulette the gambler wins if the ball stops on one of 18 out of 38 positions and loses otherwise, the probability of winning is p = 18/38 = .474. 2 To analyze a Bernoulli trials process, we choose as our sample space a binary tree and assign a probability distribution to...
prob_Page_105_Chunk4944
98 CHAPTER 3. COMBINATORICS Theorem 3.6 Given n Bernoulli trials with probability p of success on each exper- iment, the probability of exactly j successes is b(n, p, j) = n j  pjqn−j where q = 1 −p. Proof. We construct a tree measure as described above. We want to find the sum of the probabilities for all paths which...
prob_Page_106_Chunk4945
3.2. COMBINATIONS 99 k b(n, p, k) 45 .0485 46 .0580 47 .0666 48 .0735 49 .0780 50 .0796 51 .0780 52 .0735 53 .0666 54 .0580 55 .0485 Table 3.8: Binomial probabilities for n = 100, p = 1/2. Binomial Distributions Definition 3.6 Let n be a positive integer, and let p be a real number between 0 and 1. Let B be the random v...
prob_Page_107_Chunk4946
100 CHAPTER 3. COMBINATORICS 0 20 40 60 80 100 120 0 0.025 0.05 0.075 0.1 0.125 0.15 0 20 40 60 80 100 0.02 0.04 0.06 0.08 0.1 0.12 p = .5 n = 40 n = 80 n = 160 n = 30 n = 120 n = 270 p = .3 0 Figure 3.5: Binomial distributions.
prob_Page_108_Chunk4947
3.2. COMBINATIONS 101 Figure 3.6: Simulation of the Galton board. this empirical distribution resembles the corresponding binomial distribution with parameters n = 20 and p = 1/2. 2 Hypothesis Testing Example 3.11 Suppose that ordinary aspirin has been found effective against headaches 60 percent of the time, and that a...
prob_Page_109_Chunk4948
102 CHAPTER 3. COMBINATORICS Note that α(.6) is the probability of a type 1 error, since this is the probability of a high number of successes for an ineffective additive. So for a given n we want to choose m so as to make α(.6) quite small, to reduce the likelihood of a type 1 error. But as m increases above the most p...
prob_Page_110_Chunk4949
3.2. COMBINATIONS 103 .4 1 .5 .6 .7 .8 .9 1 .0 1.0 .1 .2 .3 .4 .5 .6 .7 .8 .9 1.0 .4 1 .5 .6 .7 .8 .9 1 .0 1.0 .1 .2 .3 .4 .5 .6 .7 .8 .9 1.0 Figure 3.7: The power curve. Theorem 3.7 (Binomial Theorem) The quantity (a + b)n can be expressed in the form (a + b)n = n X j=0 n j  ajbn−j . Proof. To see that this expansio...
prob_Page_111_Chunk4950
104 CHAPTER 3. COMBINATORICS Proof. The first statement in the corollary follows from the fact that 2n = (1 + 1)n = n 0  + n 1  + n 2  + · · · + n n  , and the second from the fact that 0 = (1 −1)n = n 0  − n 1  + n 2  −· · · + (−1)n n n  . 2 The first statement of the corollary tells us that the number o...
prob_Page_112_Chunk4951
3.2. COMBINATIONS 105 Hence, 1 = k 0  = k X j=1 k j  (−1)j−1 . If the outcome ω is not in any of the events Ai, then it is not counted on either side of the equation. 2 Hat Check Problem Example 3.12 We return to the hat check problem discussed in Section 3.1, that is, the problem of finding the probability that a r...
prob_Page_113_Chunk4952
106 CHAPTER 3. COMBINATORICS Probability that no one n gets his own hat back 3 .333333 4 .375 5 .366667 6 .368056 7 .367857 8 .367882 9 .367879 10 .367879 Table 3.9: Hat check problem. From calculus we learn that ex = 1 + x + 1 2!x2 + 1 3!x3 + · · · + 1 n!xn + · · · . Thus, if x = −1, we have e−1 = 1 2! −1 3! + · · · +...
prob_Page_114_Chunk4953
3.2. COMBINATIONS 107 which is accurately described by one model, called “Bose-Einstein statistics,” while other types of elementary particles can be modelled using “Fermi-Dirac statistics.” Feller says: We have here an instructive example of the impossibility of selecting or justifying probability models by a priori a...
prob_Page_115_Chunk4954
108 CHAPTER 3. COMBINATORICS 1 1 1 1 1 1 1 1 1 1 1 2 3 4 5 6 7 8 9 1 3 6 10 15 21 28 36 1 4 10 20 35 56 84 1 5 15 35 70 126 1 6 21 56 126 1 7 28 84 1 8 36 1 9 1 Table 3.10: Pascal’s triangle. natural numbers 1 2 3 4 5 6 7 8 9 triangular numbers 1 3 6 10 15 21 28 36 45 tetrahedral numbers 1 4 10 20 35 56 84 120 165 Tabl...
prob_Page_116_Chunk4955
3.2. COMBINATIONS 109 1 3 6 10 Figure 3.8: Pythagorean triangular patterns. Figure 3.9: Geometric representation of the tetrahedral number 10.
prob_Page_117_Chunk4956
110 CHAPTER 3. COMBINATORICS 11 12 22 13 23 33 14 24 34 44 15 25 35 45 55 16 26 36 46 56 66 Table 3.12: Outcomes for the roll of two dice. number of medicinal preparations using 1, 2, 3, 4, 5, or 6 possible ingredients.17 His rule is equivalent to our formula n r  = (n)r r! . The binomial numbers as coefficients of (a+...
prob_Page_118_Chunk4957
3.2. COMBINATIONS 111 Figure 3.10: Chu Shih-chieh’s triangle. [From J. Needham, Science and Civilization in China, vol. 3 (New York: Cambridge University Press, 1959), p. 135. Reprinted with permission.]
prob_Page_119_Chunk4958
112 CHAPTER 3. COMBINATORICS Cardano was interested in the problem of finding the number of ways to choose r objects out of n. Thus by the time of Pascal’s work, his triangle had appeared as a result of looking at the figurate numbers, the combinatorial numbers, and the binomial numbers, and the fact that all three were ...
prob_Page_120_Chunk4959
3.2. COMBINATIONS 113 if each one staken 256 in From my opponent’s 256 6 5 4 3 2 1 positions I get, for the games games games games games games 1st game 63 70 80 96 128 256 2nd game 63 70 80 96 128 3rd game 56 60 64 64 4th game 42 40 32 5th game 24 16 6th game 8 Table 3.13: Pascal’s solution for the problem of points. ...
prob_Page_121_Chunk4960
114 CHAPTER 3. COMBINATORICS 5 Use the program BinomialProbabilities to find the probability that, in 100 tosses of a fair coin, the number of heads that turns up lies between 35 and 65, between 40 and 60, and between 45 and 55. 6 Charles claims that he can distinguish between beer and ale 75 percent of the time. Ruth b...
prob_Page_122_Chunk4961
3.2. COMBINATIONS 115 14 Let b(2n, .5, n) be the probability that in 2n tosses of a fair coin exactly n heads turn up. Using Stirling’s formula (Theorem 3.3), show that b(2n, .5, n) ∼ 1/√πn. Use the program BinomialProbabilities to compare this with the exact value for n = 10 to 25. 15 A baseball player, Smith, has a b...
prob_Page_123_Chunk4962
116 CHAPTER 3. COMBINATORICS 22 How many ways can six indistinguishable letters be put in three mail boxes? Hint: One representation of this is given by a sequence |LL|L|LLL| where the |’s represent the partitions for the boxes and the L’s the letters. Any possible way can be so described. Note that we need two bars at...
prob_Page_124_Chunk4963
3.2. COMBINATIONS 117 28 In Example 3.11 assume the alternative hypothesis is that p = .8 and that it is desired to have the probability of each type of error less than .01. Use the program PowerCurve to determine values of n and m that will achieve this. Choose n as small as possible. 29 A drug is assumed to be effecti...
prob_Page_125_Chunk4964
118 CHAPTER 3. COMBINATORICS Using BinomialProbabilities, compare the exact value with Stirling’s ap- proximation for n = 20. 34 Assume that every time you buy a box of Wheaties, you receive one of the pictures of the n players on the New York Yankees. Over a period of time, you buy m ≥n boxes of Wheaties. (a) Use Theo...
prob_Page_126_Chunk4965
3.2. COMBINATIONS 119 arithmetic using the basic function mod(n, m). Try to write your program to make as large a table as possible. Run your program for the cases m = 2 to 7. Do you see any patterns? In particular, for the case m = 2 and n a power of 2, verify that all the entries in the (n −1)st row are 1. (The corre...
prob_Page_127_Chunk4966
120 CHAPTER 3. COMBINATORICS 3.3 Card Shuffling Much of this section is based upon an article by Brad Mann,28 which is an exposition of an article by David Bayer and Persi Diaconis.29 Riffle Shuffles Given a deck of n cards, how many times must we shuffle it to make it “random”? Of course, the answer depends upon the method of...
prob_Page_128_Chunk4967
3.3. CARD SHUFFLING 121 there are 4 rising sequences; they are (1), (2, 3, 4), (5, 6), and (7). It is easy to see that an ordering is the result of a riffle shuffle applied to the identity ordering if and only if it has no more than two rising sequences. (If the ordering has two rising sequences, then these rising sequence...
prob_Page_129_Chunk4968
122 CHAPTER 3. COMBINATORICS corresponding factor in the probability is i, and the number of cards in this stack decreases by 1. Thus, the numerator is seen to be k!(n −k)!, since all cards in both stacks are eventually chosen. Therefore, this process assigns the probability 1
prob_Page_130_Chunk4969
3.3. CARD SHUFFLING 123 to obtain the deck in the order that it was in before the unshuffle was performed. Thus, this a-unshuffle corresponds to a unique a-shuffle, and this a-shuffle is the inverse of the original a-unshuffle. If we apply an ab-unshuffle U3 to a deck, we obtain a set of ab stacks, which are then combined, in orde...
prob_Page_131_Chunk4970
124 CHAPTER 3. COMBINATORICS Figure 3.11: Before a 2-unshuffle. Figure 3.12: Before a 4-unshuffle.
prob_Page_132_Chunk4971
3.3. CARD SHUFFLING 125 Theorem 3.10 If D is any ordering that is the result of applying an a-shuffle and then a b-shuffle to the identity ordering, then the probability assigned to D by this pair of operations is the same as the probability assigned to D by the process of applying an ab-shuffle to the identity ordering. Pro...
prob_Page_133_Chunk4972
126 CHAPTER 3. COMBINATORICS that we have n people and there are 2s possible birthdays. Using our formula from Example 3.3, we find that P(T > s) = 1 − 2s n  n! 2sn . (3.4) In Chapter 6, we will define the average value of a random variable. Using this idea, and the above equation, one can calculate the average value o...
prob_Page_134_Chunk4973
3.3. CARD SHUFFLING 127 The above theorem shows that the essential information about the probability assigned to an ordering under an a-shuffle is just the number of rising sequences in the ordering. Thus, if we determine the number of orderings which contain exactly r rising sequences, for each r between 1 and n, then w...
prob_Page_135_Chunk4974
128 CHAPTER 3. COMBINATORICS The word “random” should really be used to describe a process. We will say that a process that produces an object from a (finite) set of objects is a random process if each object in the set is produced with the same probability by the process. In the present situation, the objects are the o...
prob_Page_136_Chunk4975
3.3. CARD SHUFFLING 129 Number of Riffle Shuffles Variation Distance 1 1 2 1 3 1 4 0.9999995334 5 0.9237329294 6 0.6135495966 7 0.3340609995 8 0.1671586419 9 0.0854201934 10 0.0429455489 11 0.0215023760 12 0.0107548935 13 0.0053779101 14 0.0026890130 Table 3.14: Distance to the random process. 5 10 15 20 0.2 0.4 0.6 0.8 1 ...
prob_Page_137_Chunk4976
130 CHAPTER 3. COMBINATORICS very far from random. After 5 shuffles, the distance from the random process is essentially halved each time a shuffle occurs. Given the distribution functions fX(π) and u(π) as above, there is another way to view the variation distance ∥fX −u ∥. Given any event T (which is a subset of Sn), we ...
prob_Page_138_Chunk4977
3.3. CARD SHUFFLING 131 through the deck to do this. Thus, one can see that in a new deck, the Yin suits are in the most advantageous order and the Yang suits are in the least advantageous order. Under 7 riffle shuffles, the relative advantage of the Yin suits over the Yang suits is preserved to a certain extent. Exercises...
prob_Page_139_Chunk4978
132 CHAPTER 3. COMBINATORICS (b) Give an accurate estimate for the probability that in three riffle shuffles of a 52-card deck, the first card ends up in one of the first 26 positions. Using a computer, accurately estimate the probability of the same event after seven riffle shuffles. 4 Let X denote a particular process that pro...
prob_Page_140_Chunk4979
Chapter 4 Conditional Probability 4.1 Discrete Conditional Probability Conditional Probability In this section we ask and answer the following question. Suppose we assign a distribution function to a sample space and then learn that an event E has occurred. How should we change the probabilities of the remaining events...
prob_Page_141_Chunk4980
134 CHAPTER 4. CONDITIONAL PROBABILITY Example 4.3 Consider our voting example from Section 1.2: three candidates A, B, and C are running for office. We decided that A and B have an equal chance of winning and C is only 1/2 as likely to win as A. Let A be the event “A wins,” B that “B wins,” and C that “C wins.” Hence, w...
prob_Page_142_Chunk4981
4.1. DISCRETE CONDITIONAL PROBABILITY 135 (start) p (ω) ω ω ω ω ω 1/2 1/2 l ll 2/5 3/5 1/2 1/2 b w w b 1/5 3/10 1/4 1/4 Urn Color of ball 1 2 3 4 Figure 4.1: Tree diagram. Example 4.4 (Example 4.1 continued) Let us return to the example of rolling a die. Recall that F is the event X = 6, and E is the event X > 4. Note ...
prob_Page_143_Chunk4982
136 CHAPTER 4. CONDITIONAL PROBABILITY (start) p (ω) ω ω ω ω ω 9/20 11/20 b w 4/9 5/9 5/11 6/11 I II II I 1/5 3/10 1/4 1/4 Urn Color of ball 1 3 2 4 Figure 4.2: Reverse tree diagram. Bayes Probabilities Our original tree measure gave us the probabilities for drawing a ball of a given color, given the urn chosen. We hav...
prob_Page_144_Chunk4983
4.1. DISCRETE CONDITIONAL PROBABILITY 137 Suppose you’re on Monty Hall’s Let’s Make a Deal! You are given the choice of three doors, behind one door is a car, the others, goats. You pick a door, say 1, Monty opens another door, say 3, which has a goat. Monty says to you “Do you want to pick door 2?” Is it to your advan...
prob_Page_145_Chunk4984
138 CHAPTER 4. CONDITIONAL PROBABILITY 1/3 1/3 1/3 1/3 1/3 1/3 1/3 1/3 1/3 1/3 1 1/2 1/2 1/2 1/2 1/2 1 1/2 1 1 1 1 Door opened by Monty Door chosen by contestant Path probabilities Placement of car 1 2 3 1 2 3 1 1 2 2 3 3 2 3 3 2 3 3 1 1 2 1 1 2 1/18 1/18 1/18 1/18 1/18 1/9 1/9 1/9 1/18 1/9 1/9 1/9 1/3 1/3 Figure 4.3: ...
prob_Page_146_Chunk4985
4.1. DISCRETE CONDITIONAL PROBABILITY 139 1/3 1/3 1/3 1/2 1 Door opened by Monty Door chosen by contestant Unconditional probability Placement of car 1 2 1 1 3 3 1/18 1/9 1/3 Conditional probability 1/3 2/3 Figure 4.4: Conditional probabilities for the Monty Hall problem. if the contestant chooses the door with the car...
prob_Page_147_Chunk4986
140 CHAPTER 4. CONDITIONAL PROBABILITY As noted above, if both P(E) and P(F) are positive, then 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 (see Exercise 1). The following theorem provides another way to check for independen...
prob_Page_148_Chunk4987
4.1. DISCRETE CONDITIONAL PROBABILITY 141 Example 4.9 Finally, let us give an example of two events that are not indepen- dent. In Example 4.7, let I be the event “heads on the first toss” and J the event “two heads turn up.” Then P(I) = 1/2 and P(J) = 1/4. The event I∩J is the event “heads on both tosses” and has proba...
prob_Page_149_Chunk4988
142 CHAPTER 4. CONDITIONAL PROBABILITY If we have several random variables X1, X2, . . . , Xn which correspond to a given experiment, then we can consider the joint random variable ¯X = (X1, X2, . . . , Xn) defined by taking an outcome ω of the experiment, and writing, as an n-tuple, the corresponding n outcomes for the...
prob_Page_150_Chunk4989
4.1. DISCRETE CONDITIONAL PROBABILITY 143 Not smoke Smoke Total Not cancer 40 10 50 Cancer 7 3 10 Totals 47 13 60 Table 4.1: Smoking and cancer. S 0 1 0 40/60 10/60 C 1 7/60 3/60 Table 4.2: Joint distribution. for i = 1, 2, 3. However, in the case of ¯Y , the probability assigned to the outcome (1, 1, 0) is not the pro...
prob_Page_151_Chunk4990
144 CHAPTER 4. CONDITIONAL PROBABILITY pS =  0 1 47/60 13/60  . The random variables S and C are not independent, since P(C = 1, S = 1) = 3 60 = .05 , P(C = 1)P(S = 1) = 10 60 · 13 60 = .036 . Note that we would also see this from the fact that P(C = 1|S = 1) = 3 13 = .23 , P(C = 1) = 1 6 = .167 . 2 Independent Trial...
prob_Page_152_Chunk4991
4.1. DISCRETE CONDITIONAL PROBABILITY 145 The sample space is R3 = R × R × R with R = {1, 2, 3, 4, 5, 6}. If ω = (1, 3, 6), then X1(ω) = 1, X2(ω) = 3, and X3(ω) = 6 indicating that the first roll was a 1, the second was a 3, and the third was a 6. The probability assigned to any sample point is m(ω) = 1 6 · 1 6 · 1 6 = ...
prob_Page_153_Chunk4992
146 CHAPTER 4. CONDITIONAL PROBABILITY Number having The results Disease this disease + + + – – + – – d1 3215 2110 301 704 100 d2 2125 396 132 1187 410 d3 4660 510 3568 73 509 Total 10000 Table 4.3: Diseases data. We can calculate the numerator from our given information by P(Hi ∩E) = P(Hi)P(E|Hi) . (4.2) Since one and...
prob_Page_154_Chunk4993
4.1. DISCRETE CONDITIONAL PROBABILITY 147 d1 d2 d3 + + .700 .131 .169 + – .075 .033 .892 – + .358 .604 .038 – – .098 .403 .499 Table 4.4: Posterior probabilities. We can now use Bayes’ formula to compute various posterior probabilities. The computer program Bayes computes these posterior probabilities. The results for ...
prob_Page_155_Chunk4994
148 CHAPTER 4. CONDITIONAL PROBABILITY .001 can not .01 .95 .05 + - .001 0 .05 .949 + - .051 .949 + - .981 1 0 can not .001 .05 0 .949 can not .019 Original Tree Reverse Tree .99 .999 Figure 4.5: Forward and reverse tree diagrams. Three gamblers, A, B and C, take 12 balls of which 4 are white and 8 black. They play wit...
prob_Page_156_Chunk4995
4.1. DISCRETE CONDITIONAL PROBABILITY 149 The Probability of the happening of two Events dependent, is the prod- uct of the Probability of the happening of one of them, by the Probability which the other will have of happening, when the first is considered as having happened; and the same Rule will extend to the happeni...
prob_Page_157_Chunk4996
150 CHAPTER 4. CONDITIONAL PROBABILITY errors caused by his measuring device he could predict the probabilistic nature of his measurements. In fact, however, he is presented with the inverse problem of knowing the nature of the random errors, and the values of the measurements, and wanting to make inferences about the ...
prob_Page_158_Chunk4997
4.1. DISCRETE CONDITIONAL PROBABILITY 151 (a) Which of the following pairs of these events are independent? (1) A, B (2) A, D (3) A, E (4) D, E (b) Which of the following triples of these events are independent? (1) A, B, C (2) A, B, D (3) C, D, E 6 From a deck of five cards numbered 2, 4, 6, 8, and 10, respectively, a ...
prob_Page_159_Chunk4998
152 CHAPTER 4. CONDITIONAL PROBABILITY 14 If P( ˜B) = 1/4 and P(A|B) = 1/2, what is P(A ∩B)? 15 (a) What is the probability that your bridge partner has exactly two aces, given that she has at least one ace? (b) What is the probability that your bridge partner has exactly two aces, given that she has the ace of spades?...
prob_Page_160_Chunk4999
4.1. DISCRETE CONDITIONAL PROBABILITY 153 23 You are given two urns and fifty balls. Half of the balls are white and half are black. You are asked to distribute the balls in the urns with no restriction placed on the number of either type in an urn. How should you distribute the balls in the urns to maximize the probabi...
prob_Page_161_Chunk5000