December 27th, 2017 at 11:54:08 AM
permalink

standard deck of cards.

13 ranks, 4 of each rank (suits) so 52 total cards.

probability of drawing 27 cards (without replacement)

and getting at least 1 card of each rank

this in Wolfram Alpha

C(52,27)^-1 * sum ((-1)^k * C(13,k) * C(4*(13-k),27)) , k=0 to 12

returns

24307203072/48849343277≈0.497595

(this is inclusion-exclusion for those that want to know. I know. my head is spinning too)

result is very close to a coin flip (it was what I was after, after all)

Question:

How to calculate the probability of drawing 27 cards (without replacement)

and getting at least 1 card of each rank

but this time with only 10 ranks

9 ranks- 4 of each rank

1 rank- 16 of that rank

so my formula needs adjusting...

in other words

a standard deck of cards using almost Blackjack ranks A-9 (A only = 1)

and 16-10 value cards for 10,J,Q and K

(simulation is actually very easy in Excel or R and I get 0.626)

I love dice

but helping out with cards this time of year

Happy New Year coming!

Sally

13 ranks, 4 of each rank (suits) so 52 total cards.

probability of drawing 27 cards (without replacement)

and getting at least 1 card of each rank

this in Wolfram Alpha

C(52,27)^-1 * sum ((-1)^k * C(13,k) * C(4*(13-k),27)) , k=0 to 12

returns

24307203072/48849343277≈0.497595

(this is inclusion-exclusion for those that want to know. I know. my head is spinning too)

result is very close to a coin flip (it was what I was after, after all)

Question:

How to calculate the probability of drawing 27 cards (without replacement)

and getting at least 1 card of each rank

but this time with only 10 ranks

9 ranks- 4 of each rank

1 rank- 16 of that rank

so my formula needs adjusting...

in other words

a standard deck of cards using almost Blackjack ranks A-9 (A only = 1)

and 16-10 value cards for 10,J,Q and K

(simulation is actually very easy in Excel or R and I get 0.626)

I love dice

but helping out with cards this time of year

Happy New Year coming!

Sally

I Heart Vi Hart

December 27th, 2017 at 12:09:03 PM
permalink

I did it the same way. The answer is 1-probability(at least one empty rank). The first row show the probability of all 27 cards falling into 12 specific ranks. Multiply that by 13 because of 13 possible missing ranks.

However, what if all 27 cards fell into 11 ranks? You'd have double counted in the first step. So you need to subtract out the 78 ways to fit all the cards in 11 ranks.

But then you would have over-subtracted for the ways all the cards could fit in 10 ranks, so add back in the 286 ways that could happen. Keep going back and forth until you get to 7 ranks left. 27 cards can't fit into six ranks.

So the probability of at least one missing rank is 0.50240471127. So the probability of no missing rank is 1-0.50240471127=0.497595289.

However, what if all 27 cards fell into 11 ranks? You'd have double counted in the first step. So you need to subtract out the 78 ways to fit all the cards in 11 ranks.

But then you would have over-subtracted for the ways all the cards could fit in 10 ranks, so add back in the 286 ways that could happen. Keep going back and forth until you get to 7 ranks left. 27 cards can't fit into six ranks.

Ranks | Ways | Prob | Sign | 0 |
---|---|---|---|---|

12 | 13 | 0.04672638286 | 1 | 0.60744297719 |

11 | 78 | 0.00143723611 | -1 | -0.11210441623 |

10 | 286 | 0.00002519777 | 1 | 0.00720656107 |

9 | 715 | 0.00000019714 | -1 | -0.00014095336 |

8 | 1287 | 0.00000000042 | 1 | 0.00000054271 |

7 | 1716 | 0.00000000000 | -1 | -0.00000000010 |

6 | 1716 | 0.00000000000 | 1 | 0.00000000000 |

5 | 1287 | 0.00000000000 | -1 | 0.00000000000 |

4 | 715 | 0.00000000000 | 1 | 0.00000000000 |

3 | 286 | 0.00000000000 | -1 | 0.00000000000 |

2 | 78 | 0.00000000000 | 1 | 0.00000000000 |

1 | 13 | 0.00000000000 | -1 | 0.00000000000 |

Total | 0.50240471127 |

So the probability of at least one missing rank is 0.50240471127. So the probability of no missing rank is 1-0.50240471127=0.497595289.

It's not whether you win or lose; it's whether or not you had a good bet.

December 27th, 2017 at 12:32:00 PM
permalink

good to see I did it the same way alsoQuote:WizardI did it the same way.

and made the formula from it.

added: Actually you did yours a bit differently from mine as you showed

not getting all 13 ranks and subtracting that from 1.

That appears to me a simpler way (at first glance)

*****

but I changed the deck of card values

now only 10 ranks

"Question:

How to calculate the probability of drawing 27 cards (without replacement)

and getting at least 1 card of each rank

but this time with only 10 ranks

9 ranks- 4 of each rank

1 rank- 16 of that rank

so my formula needs adjusting..."

How would you calculate the new deck is the question?

thank you

Sally

Here is the draw distribution for 13 ranks in 52 cards

draw X | draw X or less | on draw X |
---|---|---|

13 | 0.000105681 | 0.000105681 |

14 | 0.000739767 | 0.000634086 |

15 | 0.002822795 | 0.002083028 |

16 | 0.007787021 | 0.004964226 |

17 | 0.017389697 | 0.009602677 |

18 | 0.03339448 | 0.016004783 |

19 | 0.057233399 | 0.023838919 |

20 | 0.089746728 | 0.032513329 |

21 | 0.131052661 | 0.041305933 |

22 | 0.18055152 | 0.04949886 |

23 | 0.237036475 | 0.056484955 |

24 | 0.298868289 | 0.061831814 |

25 | 0.364171945 | 0.065303656 |

26 | 0.431021961 | 0.066850016 |

27 | 0.497595289 | 0.066573327 |

28 | 0.562282125 | 0.064686836 |

29 | 0.623753775 | 0.06147165 |

30 | 0.680992435 | 0.05723866 |

31 | 0.7332907 | 0.052298265 |

32 | 0.780229398 | 0.046938697 |

33 | 0.821641806 | 0.041412409 |

34 | 0.857570992 | 0.035929186 |

35 | 0.888225424 | 0.030654432 |

36 | 0.913936486 | 0.025711061 |

37 | 0.935120134 | 0.021183648 |

38 | 0.952243906 | 0.017123772 |

39 | 0.965799645 | 0.013555739 |

40 | 0.976281797 | 0.010482152 |

41 | 0.984170764 | 0.007888966 |

42 | 0.989920631 | 0.005749867 |

43 | 0.993950513 | 0.004029882 |

44 | 0.996638759 | 0.002688246 |

45 | 0.998319328 | 0.001680569 |

46 | 0.999279712 | 0.000960384 |

47 | 0.999759904 | 0.000480192 |

48 | 0.999951981 | 0.000192077 |

49 | 1 | 4.80192E-05 |

. | total | 1 |

Last edited by: mustangsally on Dec 27, 2017

I Heart Vi Hart