{"text_format":"1","workbook":"xlsx","n_sheets":5,"sheets":["Multiplication","Combinations","Excel counting functions","Cards","Poker"],"not_rendered":{"charts":0,"images":4,"macros":1,"external_links":0,"defined_names":0,"comments":0,"pivot_tables":0},"unopened":[],"bounds":{"document_bytes":16777216,"sheet_cells":100000,"rows_first":2000,"rows_last":500,"rows_between":2000,"halvings":0,"cell_chars":16384,"cell_head_chars":4096},"cells_cut":0,"cells_raw":0,"read":"whole","date_system":"1900"}

{"sheet":"Multiplication","index":0,"n_rows":32,"n_cols":2,"rows_kept":32,"cut":false,"hidden":false,"merged":[[0,1,0,8]]}
[null,"How to Count"]
[]
[null,"In order to count up the number of different \"things\" of some type, it is frequently"]
[null,"useful to imagine yourself constructing one item of that type, and then, as you go"]
[null,"through the steps of the construction, keep track of the points where you needed to"]
[null,"make a choice. Then use the \"multiplication rule\": If there are  x  ways to start a"]
[null,"process, and, no matter how you start, there are  y  ways to continue, then there are"]
[null,"xy  ways to carry out the combined steps."]
[]
[null,"Example:  In poker, a \"straight\" is a sequence of five cards of consecutive ranks,"]
[null,"where the ranks are ordered A, 2, 3, 4, ..., 9, 10, J, Q, K, A. Note that an ace can be"]
[null,"counted as either a high or a low card, but that straights can't wrap around, e.g.,"]
[null,"Q, K, A, 2, 3 is not a straight. How many different 5-card straights can be dealt?"]
[]
[null,"Answer:  If someone handed you a deck of cards, and asked you to pull out five cards"]
[null,"forming a straight, what choices would you have to make? First, you'd have to decide"]
[null,"the range of the straight, which is fully determined once you decide what rank will be the"]
[null,"lowest in the hand. Any of the ranks from A, 2, 3, ..., through 10 could be the lowest"]
[null,"rank in the hand, so there are 10 ways to start. Having chosen the lowest rank, the"]
[null,"actual card of that rank can be chosen to be any of the four suits. The next four ranks"]
[null,"are already determined, but each of the cards of those ranks can also be chosen to be"]
[null,"any of the four suits. Therefore, there are 10∙4∙4∙4∙4∙4 = 10,240 different straights."]
[]
[null,"Example:  Actually, a straight in which all five cards are of the same suit is called a"]
[null,"\"straight flush,\" and is counted as a different type of hand than a \"simple straight\" made"]
[null,"of cards of at least two different suits. How many simple straights are there?"]
[]
[null,"Answer:  From the total computed above, we want to subtract off the number of straight"]
[null,"flushes. To construct a straight flush, you'd have to decide on the lowest rank in the"]
[null,"straight (this can be done in 10 different ways), and then on the suit from which all five"]
[null,"cards will be drawn (this can be done in 4 different ways). Therefore, there are 10∙4 = 40"]
[null,"straight flushes, and 10,240 - 40 = 10,200 simple straights."]

{"sheet":"Combinations","index":1,"n_rows":50,"n_cols":3,"rows_kept":50,"cut":false,"hidden":false,"merged":[[0,1,0,8]]}
[null,"Counting Combinations"]
[]
[null,"Things tend to be counted in two ways:  As sequences (in which order is important),"]
[null,"and as sets. Counting sequences is simple.  If there are  m  ways to do one thing,"]
[null,"followed by  n  ways to do another, then there are  mn  ways to carry out the two tasks"]
[null,"in sequence.  In how many ways can a 5-card hand be dealt out (as in stud poker,"]
[null,"where the order in which the cards are dealt is important)?  52∙51∙50∙49∙48 ="]
[null,"311,875,200.  (For every one of the 52 ways to start with card 1, there are 51 ways to"]
[null,"continue with card 2, ...)"]
[]
[null,"But how many 5-card hands are there?  Obviously, every hand could be dealt out in"]
[null,"5∙4∙3∙2∙1 = 120 different card-orders.  So there are only 311,875,200 / 120 = 2,598,960"]
[null,"different hands."]
[]
[null,"Standard notation:  n! = 1∙2∙3∙...∙n ; the symbol \"n!\" is read as \"n factorial\".  This gives"]
[null,"the total number of ways of arranging  n  distinct items.  The number of ways to select,"]
[null,"in order, k  items from  n, is  n∙(n-1)∙...∙(n-k+1) = n!/(n-k)! .  In our card example, the"]
[null,"number of ways to deal out a 5-card hand was simply  52! / 47! .  But if we only care"]
[null,"about different hands, and not the order in which the cards arrive, then we must take into"]
[null,"account that each hand can be dealt out in 5! different ways, so there are really only "]
[null,"52! / (47!∙5!)  different hands."]
[]
[null,"More standard notation:"]
[]
[]
[null,"is the number of ways of choosing  k  distinct items from a set of  n ; the symbol is read"]
[null,"as \"n choose k\"."]
[]
[null,"Example:  What is the probability of being dealt a \"full house\" (two cards of one rank,"]
[null,"and three of another)? There are "]
[]
[]
[]
[null,"different full houses (13 ways to choose the pair-rank, and 6 ways to choose two cards,"]
[null,"then 12 ways left to choose the triple-rank, and 4 ways to choose three cards).  So the"]
[null,"probability is a bit more than one chance in a thousand, i.e., 3,744 / 2,598,960 ="]
[null,{"$f":"3744/2598960","v":1.4405762304921968E-3},"."]
[]
[null,"Example:  I have 5 pairs of blue socks, 3 pairs of brown socks, and 4 pairs of black"]
[null,"socks lying loose in my drawer.  What's the chance that two randomly-selected socks"]
[null,"(pulled out early in the morning, before my eyes are really open) will match?"]
[]
[null,"There are"]
[]
[]
[null,"ways to pick a matching pair, and"]
[]
[]
[null,"ways to pick some pair. Therefore, the probability of a matching pair"]
[null,"is  88 / 276 = 0.319 .  (I'll match roughly every third day.)"]

{"sheet":"Excel counting functions","index":2,"n_rows":30,"n_cols":6,"rows_kept":30,"cut":false,"hidden":false,"merged":[[0,1,0,7]]}
[null,"Three Useful \"Counting\" Formulas"]
[]
[null,"The FACTorial function",null,null,10,"n"]
[null,null,null,null,{"$f":"FACT(E3)","v":3628800},{"$f":"showformula(E4)","v":"=FACT(E3)"}]
[]
[null,"The function =FACT(n) counts the number of ways  n  distinct"]
[null,"items can be arranged in a row."]
[]
[null,"FACT(n) = n! = 1·2·3·...·n ."]
[]
[null,"Conventionally, FACT(0) = 1 ; there is precisely one way"]
[null,"to arrange \"nothing.\""]
[]
[null,"The PERMUTations function",null,null,6,"n"]
[null,null,null,null,2,"k"]
[null,null,null,null,{"$f":"PERMUT(E14,E15)","v":30},{"$f":"showformula(E16)","v":"=PERMUT(E14,E15)"}]
[]
[null,"The function =PERMUT(n,k) counts the number of ways to select  k  items - "]
[null,"in sequence, where order matters - from a group of  n  distinct items."]
[]
[null,"PERMUT(n,k) = n! / (n-k)! = n·(n-1)·…·(n-k+1) ."]
[]
[null,"The COMBINations function",null,null,6,"n"]
[null,null,null,null,2,"k"]
[null,null,null,null,{"$f":"COMBIN(E23,E24)","v":15},{"$f":"showformula(E25)","v":"=COMBIN(E23,E24)"}]
[]
[null,"The function =COMBIN(n,k) counts the number of ways to select  k  items -"]
[null,"as an unordered collection - from a group of  n  distinct items."]
[]
[null,"COMBIN(n,k) = PERMUT(n,k) / k! = n! / [(n-k)!·k!] = n·(n-1)·…·(n-k+1) / k! ."]

{"sheet":"Cards","index":3,"n_rows":15,"n_cols":5,"rows_kept":15,"cut":false,"hidden":false,"merged":[[0,1,0,7]]}
[null,"Counting Cards"]
[]
[null,"The \"Probability Diagrams\" workbook contained some rather large numbers."]
[null,"They were computed using the formulas below."]
[]
[]
[null,{"$f":"COMBIN(52,5)","v":2598960},{"$f":"showformula(B7)","v":"=COMBIN(52,5)"},null,"5-card hands from a 52-card deck"]
[]
[null,{"$f":"COMBIN(48,5)","v":1712304},{"$f":"showformula(B9)","v":"=COMBIN(48,5)"},null,"hands with no aces"]
[null,{"$f":"B7-B9","v":886656},{"$f":"showformula(B10)","v":"=B7-B9"},null,"hands with at least one ace"]
[]
[null,{"$f":"COMBIN(39,5)","v":575757},{"$f":"showformula(B12)","v":"=COMBIN(39,5)"},null,"hands with no clubs"]
[]
[null,{"$f":"COMBIN(36,5)","v":376992},{"$f":"showformula(B14)","v":"=COMBIN(36,5)"},null,"hands with no clubs and no aces"]
[null,{"$f":"B12-B14","v":198765},{"$f":"showformula(B15)","v":"=B12-B14"},null,"hands with no clubs and at least one ace"]

{"sheet":"Poker","index":4,"n_rows":29,"n_cols":12,"rows_kept":29,"cut":false,"hidden":false,"merged":[[0,1,0,8],[16,8,17,9],[16,10,17,10]]}
[null,"Poker Hands"]
[]
[null,"A \"poker hand\" consists of 5 cards dealt from a deck of 52 cards (with 13 ranks, and"]
[null,"4 suits; aces count as both the highest rank and the lowest rank)."]
[]
[null,"The various types of hands are"]
[]
[null,"a straight flush",null," - five cards of consecutive ascending ranks, all of the same suit"]
[null,"four of a kind",null," - four cards of one rank, and one of another rank"]
[null,"a full house",null," - three cards of one rank, and two of another rank"]
[null,"a flush",null," - five cards of the same suit, but not a straight flush"]
[null,"a straight",null," - five cards of consecutive ascending ranks, but not a straight flush"]
[null,"three of a kind",null," - three cards of one rank, and two cards of two other ranks"]
[null,"two pairs",null," - two cards of each of two distinct ranks, and a fifth card of a different rank"]
[null,"one pair",null," - two cards of the same rank, and three cards of three different ranks"]
[null,"nothing",null," - none of the above"]
[null,null,null,null,null,null,null,null,"hand type",null,"formulas"]
[null,"Count the number of hands of each type."]
[null,null,null,null,null,null,null,null,"straight flush",null,{"$f":"COMBIN(10,1)*COMBIN(4,1)","v":40}]
[null,"The answers are to the right: Click on a cell to see the formula.",null,null,null,null,null,null,"four of a kind",null,{"$f":"COMBIN(13,1)*COMBIN(4,4)*COMBIN(48,1)","v":624}]
[null,null,null,null,null,null,null,null,"full house",null,{"$f":"COMBIN(13,1)*COMBIN(4,2)*COMBIN(12,1)*COMBIN(4,3)","v":3744}]
[null,null,null,null,null,null,null,null,"flush",null,{"$f":"COMBIN(4,1)*COMBIN(13,5)-K19","v":5108}]
[null,null,null,null,null,null,null,null,"straight",null,{"$f":"COMBIN(10,1)*COMBIN(4,1)^5-K19","v":10200}]
[null,null,null,null,null,null,null,null,"three of a kind",null,{"$f":"COMBIN(13,1)*COMBIN(4,3)*COMBIN(12,2)*COMBIN(4,1)^2","v":54912}]
[null,null,null,null,null,null,null,null,"two pairs",null,{"$f":"COMBIN(13,2)*COMBIN(4,2)^2*COMBIN(44,1)","v":123552}]
[null,null,null,null,null,null,null,null,"one pair",null,{"$f":"COMBIN(13,1)*COMBIN(4,2)*COMBIN(12,3)*COMBIN(4,1)^3","v":1098240}]
[null,null,null,null,null,null,null,null,"nothing",null,{"$f":"(COMBIN(13,5)-10)*(COMBIN(4,1)^5-4)","v":1302540}]
[null,null,null,null,null,null,null,null,"total",null,{"$f":"SUM(K19:K27)","v":2598960},{"$f":"showformula(K28)","v":"=SUM(K19:K27)"}]
[null,null,null,null,null,null,null,null,null,null,{"$f":"COMBIN(52,5)","v":2598960},{"$f":"showformula(K29)","v":"=COMBIN(52,5)"}]