SignGuyDino
SignGuyDino
Joined: Mar 31, 2021
  • Threads: 1
  • Posts: 2
Thanks for this post from:
Mission146
March 31st, 2021 at 8:33:13 AM permalink
I am working on a game design. To decide to go forward with the project, I am requesting verification on one mathematics question:

Supposed I had a 48 card deck, four suits, twelve cards each suit.

If I drew 15 cards, what is the probability that I will draw at least one card in each suit?

I THINK I have the correct answer, but I'm looking for anyone showing me the answer and how it came about. So if my number is not right I'll know how (if) I can adjust the criteria.

Thank you.
If at first you don't succeed, don't try sky diving.
Mission146
Mission146
Joined: May 15, 2012
  • Threads: 125
  • Posts: 13201
March 31st, 2021 at 8:49:24 AM permalink
Quote: SignGuyDino

I am working on a game design. To decide to go forward with the project, I am requesting verification on one mathematics question:

Supposed I had a 48 card deck, four suits, twelve cards each suit.

If I drew 15 cards, what is the probability that I will draw at least one card in each suit?

I THINK I have the correct answer, but I'm looking for anyone showing me the answer and how it came about. So if my number is not right I'll know how (if) I can adjust the criteria.

Thank you.



The easiest way for me to figure out this question is to determine the probability of having (at least) one suit that you don't draw any of.

nCr(12,0)*nCr(36,15)/nCr(48,15) = 0.0050929350345811

There are four suits, so we must:

0.0050929350345811 * 4 = 0.0203717401383244

We also have a way that we can verify this by doing it the long way. We're going to start with wanting to avoid a specific suit, let's say clubs:

(36/48) * (35/47) * (34/46) * (33/45) * (32/44) * (31/43) * (30/42) * (29/41) * (28/40) * (27/39) * (26/38) * (25/37) * (24/36) * (23/35) * (22/34) = 0.00509293503

Of course, that agrees with the combinatorial formula above, which is the short way of doing it. Again, you must multiply this result by the four suits.

There's also a possibility that you could draw fifteen cards AND avoid two suits, but that doesn't impact anything, because if you have avoided two suits you have also avoided one...so that's already included in the result.

EDIT TO ADD:

Sorry, forgot to finish answering the question. The probability that you will get at least one of each suit is simply 1 - the probability of that not happening, so:

1 - 0.0203717401383244 = 0.97962825986 which means that the probability of getting at least one of every suit is 97.962825986%
Vultures can't be choosers.
SignGuyDino
SignGuyDino
Joined: Mar 31, 2021
  • Threads: 1
  • Posts: 2
Thanks for this post from:
Mission146
March 31st, 2021 at 9:02:59 AM permalink
A thousand blessings.

The number I came with was approximately 97.962%. I asked a question off Quora for a slightly different scenario and translated the gentleman's numbers to this criteria. His answer involved binomial coefficients (yikes!) but omnicalculator has that, and I came up with the same number. Basically something like 1,070,980,624,076 out of 1,093,260,079,344 possible combinations or approximately 0.97962. Ironically I tried reasoning like you had above but couldn't get it right somehow.

The game I am designing would use that for the main part of the game. I wanted something for 2% house odds.

I'll be able to continue from here.

Again, thank you so much!
If at first you don't succeed, don't try sky diving.
Mission146
Mission146
Joined: May 15, 2012
  • Threads: 125
  • Posts: 13201
March 31st, 2021 at 9:04:54 AM permalink
Quote: SignGuyDino

A thousand blessings.

The number I came with was approximately 97.962%. I asked a question off Quora for a slightly different scenario and translated the gentleman's numbers to this criteria. His answer involved binomial coefficients (yikes!) but omnicalculator has that, and I came up with the same number. Basically something like 1,070,980,624,076 out of 1,093,260,079,344 possible combinations or approximately 0.97962. Ironically I tried reasoning like you had above but couldn't get it right somehow.

The game I am designing would use that for the main part of the game. I wanted something for 2% house odds.

I'll be able to continue from here.

Again, thank you so much!



You're welcome. Welcome to WoV and thank you for posting your question here! I certainly hope you'll come back and post again if you have any other questions related to your game, or to have a look around elsewhere on the forums.
Vultures can't be choosers.
Mission146
Mission146
Joined: May 15, 2012
  • Threads: 125
  • Posts: 13201
March 31st, 2021 at 9:07:54 AM permalink
Also, here is a link to the calculator that I like to use for combinatorics:

https://web2.0calc.com/

The good news is that you can't wear out the, "nCr," button on a virtual calculator, or I'd have done it by now.
Vultures can't be choosers.
ThatDonGuy
ThatDonGuy
Joined: Jun 22, 2011
  • Threads: 97
  • Posts: 4632
Thanks for this post from:
Mission146
March 31st, 2021 at 9:52:43 AM permalink
Quote: Mission146

There's also a possibility that you could draw fifteen cards AND avoid two suits, but that doesn't impact anything, because if you have avoided two suits you have also avoided one...so that's already included in the result.


Except that, it is included in two different results - that is, a hand with six hearts and nine spades is counted in both the "no clubs" and "no diamonds" hands.
Mission146
Mission146
Joined: May 15, 2012
  • Threads: 125
  • Posts: 13201
March 31st, 2021 at 12:44:08 PM permalink
Quote: ThatDonGuy

Except that, it is included in two different results - that is, a hand with six hearts and nine spades is counted in both the "no clubs" and "no diamonds" hands.



That's true, but does it matter in the context of what we are answering? If a hand is lacking in one suit, or lacking in two suits, it still doesn't have all four suits.
Vultures can't be choosers.
ThatDonGuy
ThatDonGuy
Joined: Jun 22, 2011
  • Threads: 97
  • Posts: 4632
Thanks for this post from:
Mission146
March 31st, 2021 at 1:04:25 PM permalink
Quote: Mission146

That's true, but does it matter in the context of what we are answering? If a hand is lacking in one suit, or lacking in two suits, it still doesn't have all four suits.


Yes, it does, because if you count the number of hands that don't contain any, say, spades, and then multiply by 4, you are counting all of the hands that don't have any spades and any hearts twice (once in the "hands with no spades" count, and once in the "hands with no hearts" count).
Mission146
Mission146
Joined: May 15, 2012
  • Threads: 125
  • Posts: 13201
March 31st, 2021 at 2:08:00 PM permalink
Quote: ThatDonGuy

Yes, it does, because if you count the number of hands that don't contain any, say, spades, and then multiply by 4, you are counting all of the hands that don't have any spades and any hearts twice (once in the "hands with no spades" count, and once in the "hands with no hearts" count).



Good point, thanks!

Okay, so we want to count only half of the hands in which two suits are completely missing. The first thing we have to do is determine how many combinations of two suits can be missing:

Hearts + Diamonds
Hearts + Clubs
Hearts + Spades
Diamonds + Clubs
Diamonds + Spades
Clubs + Spades

So, there are six ways that two suits can be missing.

The probability of a hand missing two suits under the initial parameters:

nCr(12,0)*nCr(12,0)*nCr(24,15)/nCr(48,15) = 0.0000011959679354

Which we then multiply by the six ways that can happen:

0.0000011959679354 * 6 = 0.0000071758076124

And, we only want half of those to count in order to not be duplicative, so:

0.0000071758076124/2 = 0.0000035879038062

We then subtract out our duplicative ones from the previous result:

0.0203717401383244 - 0.0000035879038062 = 0.0203681522345182

1 - 0.0203681522345182 = 0.9796318477654818 or 97.96318477654818%

In this case, it doesn't change the result much just because it's such an unlikely event. That said, I appreciate you catching this that way it's not only more precise (and hopefully correct), but I don't make the same omission on something in the future where the effect could be larger.
Vultures can't be choosers.
coachbelly
coachbelly
Joined: Oct 21, 2013
  • Threads: 1
  • Posts: 830
March 31st, 2021 at 2:36:30 PM permalink
Quote: Mission146

The good news is that you can't wear out the, "nCr," button on a virtual calculator, or I'd have done it by now.



Who told you that you're not a mathematician?

  • Jump to: