300 likes | 463 Views
Probability. Pierre de Fermat (1601 - 1665). Blaise Pascal (1623 - 1662). Much of the original discussion was framed in terms of gambling, especially cards and dice. Experiment. Take a coin. Flip it five times. Record the outcomes (e.g., HHTTH). Outcomes. The possible outcomes are 5H
E N D
Pierre de Fermat (1601 - 1665) Blaise Pascal (1623 - 1662)
Much of the original discussion was framed in terms of gambling, especially cards and dice.
Experiment • Take a coin. • Flip it five times. • Record the outcomes (e.g., HHTTH)
Outcomes The possible outcomes are 5H 4H 1T 3H 2T 2H 3T 1H 4T 5T But they do not seem to be equally likely.
Another way to list the possible outcomes: HHHHHHHHTT THHHTHTTHT TTHTHTTTTH HHHHT HHTHT THHTHHTTTH TTTHHTTTTT HHHTH HHTTH THTHHTHHTTHTTTT HHTHH HTHHT TTHHHTHTHTTHTTT HTHHH HTHTH HHTTT THTTHTTHTT THHHH HTTHHHTHTT TTHHTTTTHT Another way to list the possible outcomes: 5H 1 4H 1T 5 3H 2T 10 2H 3T 10 1H 4T 5 5T 1 If each of the outcomes at the top of the page is equally likely, we see why the extreme outcomes at left are much less likely than the more “balanced” ones.
The basic idea is not too complicated, but we need a way to systematize it. Clearly it has something to do with the different orders in which the events can happen. So suppose we have 3 objects, 1, 2, 3. How many different orders are there for these three? 123 132 213 6 ways 231 312 321
Now suppose we have n objects, 1, 2, 3, …, n. How many different orders are there for them? First, let’s pick which will be the first object. There are n ways to do this. Then, let’s pick which will be the second object. There are n-1 ways to do this (since the first object is already chosen). Altogether, there are n(n-1) ways to choose the first two objects. Then, there are n-2 ways to choose the third object, n-3 ways to choose the fourth object, n-4 ways to choose the fifth object, : : 1 way to choose the nth object.
There are n ways to choose the first object, n-1 ways to choose the second object, • n-2 ways to choose the third object, n-3 ways to choose the fourth object, n-4 ways to choose the fifth object, : : 1 way to choose the nth object. Altogether, there are n(n-1)(n-2) … 3 . 2 . 1 ways to choose the n objects.
This number, n(n-1)(n-2) … 3 . 2 . 1 , is so important that it has a special name. It is called “n factorial” and it is abbreviated n! So, for example, 3! = 3.2.1 = 6 4! = 4.3.2.1 = 24 5! = 5.4.3.2.1 = 120
number of ways for 20 people to shuffle chairs. 10! = 3,628,800 20! = 2,432,902,008,176,640,000 30! = 265,252,859,812,191,058,636,308,480,000,000 100! = 93,326,215,443,944,152,681,699,238,856,266,700,490,715, 968,264,381,621,468,592,963,895,217,599,993,229,915,608,941, 463,976,156,518,286,253,697,920,827,223,758,251,185,210,916, 864,000,000,000,000,000,000,000,000 ~ 9.332621544 x 10157
n! is the number of ways of arranging n objects, so it is often called the number of “rearrangements” of n objects, or the number of “permutations” of n objects. For reasons which are not clear yet, but which will be clearer soon, we simply define 0! = 1
Note that 4! = 4.3.2.1 = 4.(3.2.1) = 4 . 3! Similarly, n! = n(n-1)(n-2) . … . 4.3.2.1 = n((n-1)(n-2) . … . 4.3.2.1) = n . (n-1)!
Suppose we have n objects and want to pick k of them, for some k ≤ n. How many ways are there of doing this? In other words, how many different subsets are there containing exactly k elements?
There are n choices for the first element of the set. Then there are n-1 choices for the second element of the set. Then there are n-2 choices for the third element of the set. Then there are n-3 choices for the fourth element of the set. : : How many choices are there for the kth element of the set? n-k+1 So the number of ways of choosing all k elements of the set is n(n-1)(n-2)(n-3) . … . (n-k+2).(n-k+1)
The number of ways of choosing all k elements of the set is n(n-1)(n-2)(n-3) . … . (n-k+2).(n-k+1) But we have overcounted. After all, we have counted each possible set of k elements in every possible order. And the number of different orders in which k elements can be written is k! So the number of subsets containing exactly k elements is n(n-1)(n-2)(n-3) . … . (n-k+2).(n-k+1) k!
The number of subsets containing exactly k elements is n(n-1)(n-2)(n-3) . … . (n-k+2).(n-k+1) k! (n-k).(n-k-1) .(n-k-2) . … . 3.2.1 (n-k).(n-k-1) .(n-k-2) . … . 3.2.1 n(n-1)(n-2)(n-3) . … . (n-k+2).(n-k+1) k! n! k! (n-k)! We write nn! kk! (n-k)! ( ) It is pronounced: “n choose k”.
( ) nn! k k! (n-k)! Note that nn! 1 1! (n-1)! ( ) n (n-1)! 1! (n-1)! n 1 =n
Note that n 1 ( ) n is exactly what we should expect, since there are n ways of choosing a single object out of n objects.
Also, nn! nn! 0! ( ) 1 1 1 This too is exactly what we should expect, since there is only 1 way of choosing all n objects out of n objects. It also demonstrates that letting 0! = 1 was not so crazy after all….
Finally, nn! kk! (n-k)! ( ) Noting that the two numbers in the denominator add up to n, we see that this also equals nn! n-k (n-k)! k! ( ) In other words, nn kn-k ( ) ( )
( ) 6 3 20 ( ) 5 2 10 ( ) 26 1 26 ( ) 15 14 15
There are 365 possible birthdays (ignoring for the moment the complications presented by February 29). If you consider a roomful of people, what is the chance that two or more of them have the same birthday? On the face of it, it seems unlikely, unless the number of people is fairly large compared to 365.
We might try to work out the probability. But unfortunately, the situation is complicated. There are many ways birthdays can coincide. Counting them is a nightmare.
Doing it backwards… Strangely, it is far better to figure out how likely it is not to happen. This amounts to asking how likely it is that everybody has different birthdays. How do we work this out?
The first person to be born can be born on any of the 365 days without risking a conflict. But the second person born must avoid the first one’s birthday if the birthdays are to be all distinct. The second person has a chance of 364/365 of having a birthday different from that of the first person. Then the third person has a chance of 363/365 of having a birthday different from those of the first two people. And so on….
Suppose there are n people (with n < 365). The probability that they will have n distinct birthdays is 365 . 364 . 363 . 362 . … . (366-n) 365 . 365 . 365 . 365 . … . 365 This can be written as 365 . 364 . 363 . 362 . … . (366-n) . (365-n) . (364-n) . … . 3 . 2 . 1 365 . 365 . 365 . 365 . … . 365 . (365-n) . (364-n) . … . 3 . 2 . 1 365! 365n. (365-n)! =
The probability that n people have distinct birthdays is 365! 365n. (365-n)! The probability that n people do not have distinct birthdays is 365! 365n. (365-n)! 1 -
When n = 23, this probability is slightly over 50%. In a room of 23 people, the odds are better than even that two of them will have the same birthday. When n = 40, this probability is nearly 90%. When n = 50, this probability is over 97%.