Odds calculation drawing 3 cards

192 Views Asked by At

I've had a few questions here wich helped me out greatly. i'd like some advice again , this time my problem is probability based.

As a programming excercice I'm using a normal 52 deck of cards, and blackjack rules (J-Q-K = 10 , A = 1 or 11) We draw 3 cards in order.

I want to calculate how often my total sum of the 3 cards is 15. The way i have been going about is, is calculating the chance of all individual possibilities that makes up 15.

This would be :

A-A-3 , A-10-4, A-9-5, A-8-6 , A-7-7

10-3-2

9-4-2 , 9-3-3

8-5-2, 8-4-3

7-6-2 , 7-5-3, 7-4-4

6-6-3, 6-5-4

5-5-5

for a total of 16 possible combinations to make a total of 15. so what i do right now :

  • calculate the chance of each instance to occure , for example

TOA = Total amount of

A-A-3 = ((TOAAces/CardsLeft) * (TOAAces-1/CardsLeft - 1) * (TOAThrees /CardsLeft-2)) * 3

A-10-4 = ((TOAAces/CardsLeft) * (TOAValueTens/CardsLeft - 1) * (TOAFours/CardsLeft-2)) * 6

all the way to 555

5-5-5 = ((TOAFives/CardsLeft) * (TOAFives-1/CardsLeft - 1) * (TOAFives-2/CardsLeft-2)) * 1

add these values up , and voila , probability of a total value of 15, right?

here's my question : I am unsure if my times 3,6 and 1 in above examples are right, they are supposed to represent the amount of possibilities i can draw the 3 cards (A-A-3, A-3-A,3-A-A).

Should i count every value 6 times for every possible possibility i can draw the 3 cards? Is the above example correct? I feel like the math should check out on this , but it doesn't from what i've found.

If somebody could explain to me what i'm doing it wrong, you'd save me all alot of grief.. thanks ! Any suggestions or help would be appreciated :)

Additional advanced question :

What if i wanted to calculate the chance that the 15 was suited (all same suit) Could i do the same , but calculate the chance of getting above values per suit?

You are heroes!

1

There are 1 best solutions below

17
On

You have to first add all possibilities of the event summing to 15 and then divide by exhaustive number of possibilities in the sample space.

A) Here exhaustive number of possibilities to draw 3 cards is $52C3$. Please note that a draw of {A,2,3} or {2,A,3} is considered the same. We have to keep this in mind as we build possibilities for our event (which I saw you did correctly as you described in the question).

B) Now coming to the event of 3 cards summing to 15.

i) Case of a draw of {9,2,4} - the number of possibilities = $4C1 . 4C1 . 4C1$ = 64 (as there are four each of 9, 2 and 4 in the pack)

ii) Case of a draw of {9,3,3} - the number of possibilities = $4C1 . 4C2$ = 24 (as you need to draw two 3's from four 3's)

iii) similarly, case of a draw of {5,5,5} - the number of possibilities = $4C3$ = 4

iv) now take a case of {10,2,3} - the number of possibilities = $16C1 . 4C1 . 4C1$ = 256. This is because your rule says 10, J, Q, K (in total 16 cards) are all considered 10.

Please do the rest of the cases on this line. All cases summing to 15 will follow one of the above 4 patterns. For example, {A,A,3} will follow (ii).

Once you are done, add all possibilities of summing to 15 that you got in each of the cases and divide by $52C3$.