DOC PREVIEW
Berkeley COMPSCI 70 - Counting, Probability

This preview shows page 1 out of 2 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 2 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 2 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

CS70, Fall 2003 Discussion #8 Amir KamilUC Berkeley 10/24/03Topics: Counting, Probability1 PokerWe start off our discussion of probability by computing the probability of getting various hands in the gameof poker1. A hand consists of five cards, which are scored according to type. (There are other rules to breakties, but we won’t consider them here.) The p oss ible types of hands are a single pair, two pairs, a triple, afull house, four of a kind, a straight, a flush, a straight flush, and a royal flush. Note that a deck of cardscontains 52 cards. There are thirteen different values (the values 2 to 10, the jack, the queen, the king, andthe ace), and four suits (diamonds, clubs, hearts, and spades), and each card has a value and a suit. Asa result, there are525= 2598960 possible distinct poker hands. For the purposes of this discussion, weassume that five cards are randomly dealt to each player, and the player’s dealt hand is final.1. A single pair is a hand that contains four distinct values, one of which is repeated. Thus the hand hasthe form AABCD, where each letter corresponds to a distinct value . In order to create such a hand,we can first choose the value of A, then the actual cards we are using that have value A (for example,if our value is 2, we have a choice of the 2 of clubs, the 2 of hearts, the 2 of diamonds, and the 2 ofspades), then the values of B, C, and D, and finally the actual cards of value B, C, and D. Now wehave 13 choices for A,42choices for the cards of value A,123choices for B, C, and D (we can’t pickthe same value as A), and 4 choices each for the cards of value B, C, and D. Thus the number ofhands that are single pair is 13 ·42·123· 43= 1098240. Thus the probability of getting a single pairis10982402598960= 0.423.Note that the number of single pairs is not 13 ·42·121·121·121· 43, which corresponds to choosingB after choosing A and its cards, then choosing C, and then choosing D. This is because permutingour choices for B, C , and D does not change a hand (e.g. picking B = 2, C = 3, D = 4, is equivalentto picking B = 4, C = 3, D = 2), so we have to divide by the number of permutations of B, C, andD, or 3!, recovering our previous result.2. A two pair is a hand of the form AABBC , where each letter is a distinct value. We first choose thevalues of A and B (remember that if we choose first one, then the other, we have to divide by 2!), thenthe value of C. Furthermore, we have to choose two cards of value A, two of value B, and one of valueC. Thus the number of two pair hands is132·111·422· 4 = 123552, and the probability of gettingsuch a hand is 0 .0475.3. A triple has the form AAABC. First choosing the value of A, then of B and C, and then choosingthe cards of value A, B, and C gives us 13 ·122·43· 42= 54912 different hands, for a probability of0.0211.Counting the number in a different way, we can first choose the value of A, then of B, then of C, andthen the cards of each value. But then we must divide by 2! for permuting B and C, so the result is13 · 12 · 11 ·43· 42·12!= 54912 hands, the same as before.4. A full house is a hand of the form AAABB. There are 13 · 12 ·43·42= 3744 such hands, and theprobability of getting such a hand is 0.00144.5. A hand of the form AAAAB is a four of a kind. The number of four of a kinds is 13 · 12 ·44· 4 = 624,and the probability of getting one is a measly 0.000240.1The material in this section was adapted from notes by Tom Ramsey of the University of Hawaii.16. A straight is a set of cards in order, {4,5,6,7,8} for example. The ace is allowed to be either 1 or 14, so{A,2,3,4,5} and {10,J,Q,K,A} are straights, but {J,Q,K,A,2} is not. Note that choosing the low valuein a straight, for which there are 10 choices, forces the values of the other cards, and then all that isleft is to choose the suits of each card. Thus the number of straights is 13 · 45= 10240.However, we have overcounted slightly, since we included straight and royal flushes. From below, thereare 36 straight flushes and 4 royal flushes, so the number of straights is actually 10200. T he probabilityof getting a straight is 0.00392.7. A flush is a hand in which all the cards are of the same suit. There are four choices for the suit, andthen five values must be chosen out of 13, so the number of flushes is 4 ·135= 5148.Again, we have to subtract the number of straight and royal flushes, so there are actually 5108 straights.The corresponding probability is 0.00197.8. A straight flush is the intersection of a straight and a flush. (Well, it would be, if we hadn’t removedstraight flushes in defining a straight and a flush.) There are four s uits and 10 possible low cards, sothere are 40 straight flushes.But once again we counted royal flushes as well. Subtracting the number of royal flushes, we get 36possible straight flushes. The probability of getting one is only 0.0000139.9. Finally, the mother of all hands is the royal flush. These are the hands consisting of a ten, jack, queen,king, and ace, all of the same suit. There are only 4 of these, and an inconsequential probability ofgetting one, 0.00000154.10. The last type of hand is one that stinks. It has the form ABCDE. There are135− 10 choicesfor the values (subtracting the choices that result in straights). There are 45− 4 choices for theactual cards (subtracting the choices that result in flushes). Thus the number of hands that stink is(135− 10) · (45− 4) = 1302540. The probability of stinking is 0.501.Of course, knowing what an opponent has changes the probability of getting each hand (the probabilityis now conditioned on the opponent’s hand). For example, if you are playing against a single opponent whoyou know has a royal flush, the probability of you having one as well decreases


View Full Document

Berkeley COMPSCI 70 - Counting, Probability

Documents in this Course
Notes 1

Notes 1

12 pages

Note 2

Note 2

6 pages

Notes

Notes

6 pages

Notes

Notes

7 pages

Note 10

Note 10

8 pages

n20

n20

10 pages

n19

n19

10 pages

n18

n18

10 pages

n17

n17

6 pages

n16

n16

9 pages

n15

n15

10 pages

n14

n14

9 pages

n13

n13

6 pages

n12

n12

7 pages

n11

n11

6 pages

n10

n10

8 pages

n9

n9

5 pages

n8

n8

7 pages

n7

n7

8 pages

n6

n6

5 pages

n5

n5

8 pages

n4

n4

7 pages

n3

n3

10 pages

n2

n2

7 pages

n1

n1

5 pages

Load more
Download Counting, Probability
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Counting, Probability and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Counting, Probability 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?