It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
Basically, the question is this: what's the probability of drawing 4 cards rank 9 or higher, when you draw x cards from a standard deck of cards?

The results, from image bellow, were generated by an online calculator.

As you can see:
The probability of drawing 4 cards rank 9 or higher, when drawing only 1 card is 0%.
The probability of drawing 4 cards rank 9 or higher, when drawing only 2 cards is 0%.
The probability of drawing 4 cards rank 9 or higher, when drawing only 3 cards is 0%.
The probability of drawing 4 cards rank 9 or higher, when drawing only 4 cards is 3.7%.
The probability of drawing 4 cards rank 9 or higher, when drawing only 5 cards is 12.8%.
...

Shouldn't the formula for drawing 4 cards be: 24C4 / 52C4 = 3.9% ??? WTF
24 - is the number of cards rank 9 or higher(9, 10, J, Q, K, A = 6 * 4)
so, 24C4 = 24 correct cards, and I choose 4 random ones.
and, 52C4 = 52 possible cards, and I choose 4 random ones.
Attachments:
untitled.png (11 Kb)
This question / problem has been solved by dtgreeneimage
avatar
MadalinStroe: ...
Are you drawing cards with replacement, so that each draw is independent from other draws, or are you not replacing the cards when drawn? If not replacing then each draw is dependent on the previous ones as follows:

First card rank 9 or higher = 24/52
Second card rank 9 or higher = 23/51, (assuming first draw was successful)
Third = 22/50
Fourth = 21/49

If drawing more than 4 cards, then the other cards can be anything, but with a different number of cards available depending on when they are drawn, so still affect the other dependent probabilities, and that is where the combinations then come in. So if drawing 5 and your first card is <9 (28/52) then the first success is then 24/51. But the first card could also be >=9. So you have different probabilities for each scenario and each scenario has a different number of combinations.
Post edited September 22, 2021 by Korell
For x = 3 or less, the answer is obviously 0.

For 4, Korell's answer is correct.

For 5, the idea is that there are 5 different ways that the 4 cards that are 9 or higher could be arranged, so you need to add up each probability. However, you will count the case where all 5 cards are 9 or higher more than once (5 times in this case, I believe), so you need to subtract out the extra counts.

For 6, there's many ways you could get 4, but then you need to subtract extra counts of 5, but then you need to make sure you count the case of all 6 exactly once.

Assuming you mean without replacement, perhaps this Wikipedia article might help:
https://en.wikipedia.org/wiki/Hypergeometric_distribution

(Hypergeometric distribution is apparently the term in this case. If you're looking at the situation with replacement, where you put the card back in the deck and reshuffle, you then have a binomial distribution. I think the results are pretty close for x small, but differ for large x (x = 52 gives you probability 1 without replacement but something smaller with replacement, while x = 53 or higher doesn't work without replacement as you run out of cards to draw).

For x not an integer, or x < 0, this question fails to make sense, as far as I know.
avatar
Korell: Are you drawing cards with replacement?
No without replacement.
avatar
dtgreene: Hypergeometric distribution is apparently the term in this case...
I have no idea about this, but I found a calculator online: https://stattrek.com/online-calculator/hypergeometric.aspx

Using the following input data(4 draws): 52,24,4,4: 3.9% ... wtf this matches my formula from the first post.
Using the following input data(7 draws): 52,24,7,4: 26% ... which also doesn't match the image results.
avatar
dtgreene: Hypergeometric distribution is apparently the term in this case...
avatar
MadalinStroe: I have no idea about this, but I found a calculator online: https://stattrek.com/online-calculator/hypergeometric.aspx

Using the following input data(4 draws): 52,24,4,4: 3.9% ... wtf this matches my formula from the first post.
Using the following input data(7 draws): 52,24,7,4: 26% ... which also doesn't match the image results.
The discrepancy in the 7 draw case can be easily explained:
* According to the calculator, the chance of drawing *exactly* 4 cards of 9 or higher is 26%.
* However, the chance of drawing *at least* 4 cards of 9 or higher is 41.1%.

The difference becomes bigger as x increases. For x = 32, for example, the calculater gives a probability of 0 for exactly 4, but 1 for at least 4. (Actually, this isn't quite accurate; if you draw all cards of 8 or less, you will draw exactly 4 of 9 or higher, but this calculator may just display small numbers as 0. For x = 33, however, it's not possible to get fewer than 5 successes.)

Also, it's possible that there might be a bug in one (or both) of the calculators.
avatar
MadalinStroe: Shouldn't the formula for drawing 4 cards be: 24C4 / 52C4 = 3.9% ??? WTF
24 - is the number of cards rank 9 or higher(9, 10, J, Q, K, A = 6 * 4)
so, 24C4 = 24 correct cards, and I choose 4 random ones.
and, 52C4 = 52 possible cards, and I choose 4 random ones.
Yes.
avatar
Korell: First card rank 9 or higher = 24/52
Second card rank 9 or higher = 23/51, (assuming first draw was successful)
Third = 22/50
Fourth = 21/49
Also yes.

(Do you know, or are you learning, programming? A good way to test your results is to write a short program that'd simulate whatever it is you're calculating (perhaps with smaller values). Leave it to work for like 5 minutes and look at the mean.)
avatar
dtgreene: The discrepancy in the 7 draw case can be easily explained:
* According to the calculator, the chance of drawing *exactly* 4 cards of 9 or higher is 26%.
* However, the chance of drawing *at least* 4 cards of 9 or higher is 41.1%.
I noticed that.
avatar
dtgreene: Also, it's possible that there might be a bug in one (or both) of the calculators.
The calculator that generated the image I linked is from the discord page of the game Poker Quest(from STEAM/Kongregate/Armor Games). There are alot of smart people there and I'm certain that if there was a bug somebody would have caught it.
avatar
Starmaker: (Do you know, or are you learning, programming? A good way to test your results is to write a short program that'd simulate whatever it is you're calculating (perhaps with smaller values). Leave it to work for like 5 minutes and look at the mean.)
The thing is that probabilities was one of the parts of maths that I never quite got. And I'm trying to make sense of it now.
Post edited September 22, 2021 by MadalinStroe
avatar
MadalinStroe: ...
This was bugging me so I quickly wrote a program to check. In the image below is the precise probabilities for drawing at least 4 cards 9 and up without replacement, for the various draws, compared to their values.

Notice how close their values are, and that it's sometimes higher, sometimes lower. That is, I would thing that their values were derived from a program that simulated the card drawing with a random number generator, and then simply counted the hits.
Attachments:
avatar
MadalinStroe: ...
avatar
Matewis: This was bugging me so I quickly wrote a program to check. In the image below is the precise probabilities for drawing at least 4 cards 9 and up without replacement, for the various draws, compared to their values.

Notice how close their values are, and that it's sometimes higher, sometimes lower. That is, I would thing that their values were derived from a program that simulated the card drawing with a random number generator, and then simply counted the hits.
That actually makes sense! They would be using the same code for generating random hands as in game, and then simulating like a million hands, and calculating all the hits divided by all the hands.
Post edited September 22, 2021 by MadalinStroe
avatar
MadalinStroe: ...
avatar
Matewis: This was bugging me so I quickly wrote a program to check. In the image below is the precise probabilities for drawing at least 4 cards 9 and up without replacement, for the various draws, compared to their values.

Notice how close their values are, and that it's sometimes higher, sometimes lower. That is, I would thing that their values were derived from a program that simulated the card drawing with a random number generator, and then simply counted the hits.
It would help to have a sample size (that is, a count of how many draws your program does), as that would allow one to compute the margin of error.
avatar
dtgreene: Hypergeometric distribution is apparently the term in this case.
That's exactly the response, thank you for pointing the solution to me! I missed the point you were making, when I first read your reply. Could you reply to this post, so that the solution contains the answer, the formula and the credit.

For anyone interested the formula for calculating the probability of drawing at least 4 cards rank 9 or higher, for a 7 sized hand, is this:

(24C4*28C3 + 24C5*28C2 + 24C6*28C1 + 24C7) / 52C7

24C4*28C3 <> the number of solutions where there are 4 cards rank 9 or higher, and 3 cards of lower rank,
+24C5*28C2 <> the number of solutions where there are 5 cards rank 9 or higher, and 2 cards of lower rank,
+24C6*28C1 <> the number of solutions where there are 6 cards rank 9 or higher, and 1 cards of lower rank,
+24C7 <> the number of solutions where there are 7 cards rank 9 or higher.
/52C7 <> the maximum number of possible hands, of size 7 cards.

(34,810,776 + 16,066,512 + 3,768,688 + 346,104) / 133,784,560 = 54.992.080 / 133,784,560 = 0.411095 = 41.1%
Post edited September 22, 2021 by MadalinStroe
avatar
dtgreene: It would help to have a sample size (that is, a count of how many draws your program does), as that would allow one to compute the margin of error.
No sample size on my end. The code simply calculates the probabilities directly, in a for loop with cards drawn as index, using the kind of formula MadalinStroe wrote out in the above post.
avatar
dtgreene: Hypergeometric distribution is apparently the term in this case.
avatar
MadalinStroe: That's exactly the response, thank you for pointing the solution to me! I missed the point you were making, when I first read your reply. Could you reply to this post, so that the solution contains the answer, the formula and the credit.

For anyone interested the formula for calculating the probability of drawing at least 4 cards rank 9 or higher, for a 7 sized hand, is this:

(24C4*28C3 + 24C5*28C2 + 24C6*28C1 + 24C7) / 52C7

24C4*28C3 = the number of solutions where there are 4 cards rank 9 or higher, and 3 cards of lower rank,
+24C5*28C2 = the number of solutions where there are 5 cards rank 9 or higher, and 2 cards of lower rank,
+24C6*28C1 = the number of solutions where there are 6 cards rank 9 or higher, and 1 cards of lower rank,
+24C7 = the number of solutions where there are 7 cards rank 9 or higher.

52C7 = the maximum number of possible hands, of size 7 cards.

(34,810,776 + 16,066,512 + 3,768,688 + 346,104) / 133,784,560 = 54.992.080 / 133,784,560 = 0.411095 = 41.1%
Here's the reply.
avatar
dtgreene: ...
GG!