|
-
Jun 25th, 2009, 08:49 AM
#1
Thread Starter
Addicted Member
Probability question
Okay, so myself and another person were playing around with some programming of a 2 handed pinochle deck. The other person simulated 34K deals or so and came up with 1 variation of a hand 2 times... then they simulated another 250K deals and came up with 0 more instances. How do I calculate the probability of such a variation of that hand?
Pinochle deck:
4x of each ace, 10, king, queen & jack.
Hand in question... triple Aces/Kings/Queens/Jacks (i.e. 3 of each in each suit, so 12 cards).
I was thinking it would start like:
12/80 * 11/79 * 10/78 * 9/77 * 8/76 * 7/75 * 6/74 * 5/73 * 4/72 * 3/71 * 2/70 * 1/69
but then I thought that may be the probability of getting any of the given 4 with all 12 cards dealt in order.
so maybe the below would work on getting any ace/king/queen/jack as the first card, then the remainin 11, but that's still over the next 11 cards.
48/80 * 11/79 * 10/78 * 9/77 * 8/76 * 7/75 * 6/74 * 5/73 * 4/72 * 3/71 * 2/70 * 1/69
Since a pinochle hand contains 20 cards, how do I calculate the probability of getting 12/16 specific cards in that 20 card hand? My above numbers may be off still.
First may be 64/80 instead of 48 because there are 4 of each card of each suit so 4*4*4...
Can anyone help?
-
Jun 25th, 2009, 09:49 AM
#2
Hyperactive Member
Re: Probability question
I'm a little confused. You're using two decks with 20 cards each with only Ace, K, Q, J, 10 for a total of 40 cards and the hands are 12 cards?
I'm a little rusty but assuming the above I would do:
Number of Hands that have 3 of a kind of 4 different cards
= (8,3) (5,1) (8,3) (4,1) (8,3) (3,1) (8,3) (2,1)
Where (n,m) = number of ways of choosing m items from n choices (nCr)
This equals 56 x 5 x 56 x 4 x 56 x 3 x 56 x 2 = 56^4(5!) = 1180139520
Now you have to subtract how many of those hands contain the three 10's which is 5.
So we are left with 1180139515
Total Hands = (40,12) = 5586853480
Probability = 1180139520 / 5586853480 = 0.211
There must be something wrong here either in the assumptions about the deck/hands or in my calculations since this is way higher than you observed. Can you clarify how many cards are in the deck and how many cards are in a hand?
-
Jun 25th, 2009, 10:02 AM
#3
Thread Starter
Addicted Member
Re: Probability question
Okay. It's 1 deck of 80 cards. 4 of each Ace for 16 aces, 4 of each 10 for 16 tens, etc... 16 of a rank * 5 ranks = 80 cards total.
What is the probability of getting say Aces around 3 times in a single hand? (3 of the 4 aces of Clubs, 3 of the 4 aces of Diamonds, 3 of the 4 aces of Hearts, and 3 of the 4 aces of Spades)
More specifically I'm looking at the probability of getting either Aces/Kings/Queens/ or Jacks around 3 times in a hand. A hand is 20 cards or 1/4 of the deck. (The entire deck gets dealt out to 4 people).
 Originally Posted by wy125
I'm a little confused. You're using two decks with 20 cards each with only Ace, K, Q, J, 10 for a total of 40 cards and the hands are 12 cards?
My apologies on this. A standard Pinochle Deck consists of 2 of each A, 10, K, Q, J, & 9. The 4 player Pinochle variation that we're programing around is played with 2 of those decks put together without the 9's. Alternatively, a double deck pinochle deck can be constructed from 4 standard decks of cards by removing all of the 2's through 9's.
Last edited by Fizziii; Jun 25th, 2009 at 10:10 AM.
-
Jun 25th, 2009, 11:37 AM
#4
Hyperactive Member
Re: Probability question
Okay this is a bit tricky for me. Jemidiah is definitely one guy who knowss how to do this. Hopefully he'll chime in, but here's my attempt:
okay so the way I see it is first we need to choose rank, then suit then the number of ways to get dealt the 3 of a kind and then finally the rest of the hand.
There are 5 ranks, 4 suits, and 4 of each suit per ranks so:
number of combinations of getting AT LEAST 3 (you may get another triple or more of another rank) of each either A/K/Q/J/10 is:
first triple: (5,1) (4,1) (4,3)
second triple given first: (1) (3,1) (4,3)
third triple given others: (1) (2,1) (4,3)
4th triple given others: (1) (1,1) (4,3)
There are a total of 80 cards in the deck but we remove the selected rank leaving 80 - 16 = 64.
Number of ways to deal 8 cards from 64: (64, 8)
this gives a total of: 4^4 * 5! * (64,8) = 135971800104960
total number of hands: (80, 20) = 3535316142212174320
probability = 3.846e-5
Does that jive with your experimental results? Do you allow the possibility of other triples in the hand?
-
Jun 25th, 2009, 11:56 AM
#5
Thread Starter
Addicted Member
Re: Probability question
 Originally Posted by wy125
okay so the way I see it is first we need to choose rank, then suit then the number of ways to get dealt the 3 of a kind and then finally the rest of the hand.
I'm a little confused as to this. We're looking for something along the lines of:
AC AC AC AD AD AD AH AH AH AS AS AS XX XX XX XX XX XX XX XX
I'm thinking the math may be a bit above me as I only ever got up to Calculus and it looks like you're dealing with arrays
We ended up with 2 instances out of 1,039,360 (Yet those 2 came in the first 34,000 or so hands).
-
Jun 25th, 2009, 01:18 PM
#6
Hyperactive Member
Re: Probability question
I'm a little confused as to this. We're looking for something along the lines of:
AC AC AC AD AD AD AH AH AH AS AS AS XX XX XX XX XX XX XX XX
I find it confusing too I tried to calculate what you have above but making sure that it could occur in any order.
Do you need them to be an a specific order? If not then my calculation should be okay (barring any errors I made).
I'm not using arrays: I was using the convention that (n,m) means choose m items from a sampling of n without repetition.
(n,m) = n!/[(n-m)! m!]
(you see this noted usually as C(n,r) or nCr where you are choosing r items from a set of n. Sorry for the confusion)
This gives the number of ways in which m items can be chosen when order doesn't matter. So for example how many ways can you be dealt 3 aces from a standard deck if you deal out 3 cards?
Well we have 4 choices for the first ace, 3 choices for the second, and 2 choices for the third, which is 4 x 3 x 2 = 24. But three aces is three aces we don't care which order they were dealt so how many ways can we order 3 aces? That's just 3! = 6.
So the number of ways in which we could get 3 aces is 24/6 = 4, which is
(4,3) = 4!/[(4-3)!(3!)] = 4
So for the problem in question I just used that idea to your problem. Basically, how many ways to choose rank x how many ways to choose suit x how many ways to be dealt 3 of a kind from a pool of 4.
As far as your simulation is concerned I think it would be best to keep it running a bit longer. It may be that my calc is wrong if those results are accurate.
-
Jun 25th, 2009, 01:23 PM
#7
Thread Starter
Addicted Member
Re: Probability question
Thank you for the clarification. You are correct in that the order they are dealt does not matter.
If I'm correct you're saying there are 135,971,800,104,960 combinations that meet the requirements out of a total of 3,535,316,142,212,174,320 hands?
If so, is that the same as 1 out of 26K hands or so?
-
Jun 25th, 2009, 01:59 PM
#8
Hyperactive Member
Re: Probability question
yes, that's exactly right. Your simulation is showing a much lower frequency about a factor of 10. If my estimation of probably is correct then you will probably need to run your simulator for a LOOOOONG time to get a reasonable estimate of the probability. Maybe something like 500 million - 1 billion times....
-
Jun 25th, 2009, 05:44 PM
#9
Thread Starter
Addicted Member
Re: Probability question
How does this vary if I'm looking for something specific? Say if I'm looking for Aces only instead of Aces/Kings/Queens or Jacks?
Would "first triple: (5,1) (4,1) (4,3)"
become "(5,1) (1) (4,3)" ?
-
Jun 25th, 2009, 06:31 PM
#10
Hyperactive Member
Re: Probability question
No, if you want only aces, then you only have 1 rank to choose from
First Triple: (1) (4,1)(4,3)
Second Triple (1)(3,1)(4,3)
...
so basically same answer just divide it by 5
I missed the fact that you didn't want to count 10's. That changes my original calculation since i included it.
Here it is again excluding 10's
first triple: (4,1) (4,1) (4,3)
second triple given first: (1) (3,1) (4,3)
third triple given others: (1) (2,1) (4,3)
4th triple given others: (1) (1,1) (4,3)
this gives a total of: 4^5 * (64,8) = 1024 x 4,426,165,368 = 4.53239333683e+12
total number of hands: (80, 20) = 3535316142212174320
prob = 1.28203338952e-06, or 1 in about 780,000
Note: Please take my work with a grain of salt. Probabilities aren't my strong point.
-
Jun 25th, 2009, 08:26 PM
#11
Re: Probability question
For making hands with 3 out of 4 of each of the ace types ("AC AC AC AD AD AD AH AH AH AS AS AS XX XX XX XX XX XX XX XX"), I would use the following algorithm:
1. Choose 3 out of 4 aces of each of the ace types and set them aside. Each choice can be done in (4, 3) = 4 ways, giving 4*4*4*4 = 4^4 choices. Note that I haven't imposed an order of the cards; each choice is independent of the others. You could do the same thing by choosing which 4 aces won't be included, which gives the same result. (It also shows a nifty relation between (n, n-1) and (n, 1) and hints at the more general relationship between (n, k) and (n, n-k).)
2. Choose the remaining 8 cards from the cards left in the deck. If Aces are disallowed from the remaining cards (I'm a bit unclear on the specifics of the problem), there are 80-16=64 cards left to choose from. If Aces are allowed, there are 80-12=68 cards left. This gives (64, 8) or (68, 8) ways to make the choice. Again, I haven't imposed an order on any of these cards--the binomial coefficient (n, k) accounts for orderless choices.
In all you have either 4^4*(64, 8) = 1 133 098 334 208 ~= 1.13 x 10^12 or 4^4*(68, 8) = 1 892 354 500 608 ~= 1.89 x 10^12 hands with your triple-Aces property, depending on if you mean exactly 3 Aces or at least 3 Aces of each suit.
The number of hands is remarkably easy to calculate as (80, 20) ~= 3.54 × 10^18 like wy said above. The probability of randomly dealing a hand that you describe is then either 1.13 x 10^12 / 3.54 x 10^18 ~= 3.19 x 10^-7 or 1.89 x 10^12 / 3.54 x 10^18 ~= 5.34 x 10^-7. You'd expect to see one every million trials or so in either case. If you're looking for this 3/4-3/4-3/4-3/4-anything pattern with Aces/Kings/Queens/Jacks, it'd be 4 times as probable.
Again I'm a bit hazy on what you were precisely asking for, so I just did the calculation for one rank. I haven't checked wy125's work since it goes the long way around by imposing and unimposing ordering. I would note that his last post's calculation of 4^5 * (64, 8) decks with the triple-anything-but-10s property agrees with mine. Getting 2 of these hands with just the triple-Aces property in around 1 million hands fits fine with this prediction since the variance is so high. You'd have to run the simulation for a very long time to get meaningful experimental results though--I could go through the statistics involved, but it's probably not necessary .
I wrote up some more specifics on counting in cases like this in this thread, particularly in post #5.
Last edited by jemidiah; Jun 26th, 2009 at 05:23 AM.
The time you enjoy wasting is not wasted time.
Bertrand Russell
<- Remember to rate posts you find helpful.
-
Jun 29th, 2009, 11:48 AM
#12
Thread Starter
Addicted Member
Re: Probability question
Jemidiah,
Thank you for your input, I'm still parsing it all. For clarification as to the specifics,
It's not EXACTLY 3 aces of each and no other aces. You must have at least 3 of each ace, but not 4 of each because that would drop it into the quadruple aces category.
Basically you get dealt 20 cards, and if you have 3 of each of anything (except 10's) it's worth more meld than say 2 of each of anything (except 10s)...
So if your hand had AC AC AC AC AD AD AD AD AH AH AH AH AS AS AS JS XX XX XX XX, it's still triple aces and would be worth 150 points. If the JS was the other AS, it would be quadruple aces and worth 200 points instead.
Having run over 1 million hands (the same number my sister has) we've come up with triple around twice, each. Mine was in Kings and Queens, where hers was in Queens and Aces.
Also, when playing pinochle, you deal 4 or 5 cards at a time... that shouldn't affect the probability at all unless you're looking for the probability of the cards in a specific order in the deck, right?
-
Jun 29th, 2009, 06:24 PM
#13
Re: Probability question
Dealing 4 or 5 at a time would still give you the same chance of getting a particular hand as any other hand, so it wouldn't change these probabilities. To count the number of hands with the triple-Aces property but without the quadruple-Aces property, subtract the number of quadruple-Aces from the number of (triple-Aces or quadruple-Aces).
Since the quadruple-Aces calculation is much easier than the ones I went through in my previous post, I'll just give the answer--I suppose it could serve as a check if you're interested in trying to count them yourself--635 376. My post gives the number with either triple- or quadruple-Aces as 1 892 354 500 608, so the probability of 5.34 x 10^-7 would stay unchanged until the 6th significant digit or so.
Edit: I wanted to ask, is the 4-aces hand as incredibly rare as the calculations show? I've never played Pinochle.
Last edited by jemidiah; Jun 29th, 2009 at 06:41 PM.
The time you enjoy wasting is not wasted time.
Bertrand Russell
<- Remember to rate posts you find helpful.
-
Jun 29th, 2009, 08:32 PM
#14
Thread Starter
Addicted Member
Re: Probability question
In regards to your edit... I have yet to ever run across triple aces (well triple anything), so I would say that, yes, the 4-aces hand is that rare.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|