# Help with probability!

4 replies [Last post]
twobob
Offline
Joined: 12/31/1969

Here we go .... another probability problem for those game designers out there that have mathematics majors!

I've got a basic grasp of probability, but am not really sure where to start with this one, so any help would very much be appreciated!

Basically, I'm trying to put together an excel spreadsheet that will give me an idea of various probabilities.....

Assumptions:

a) A pack of cards consists of the following:
Set 1 (6 cards)
Card A x 1
Card B x 2
Card C x 3
Set 2 (15 cards)
Card D x 4
Card E x 5
Card F x 6
Set 3 (24 cards)
Card G x 7
Card H x 8
Card I x 9
Total = 45 cards

b) There are four players and they receive the following cards:

4 cards each at time 0
2 cards each at time 1
2 cards each at time 2
2 cards each at time 3

c) When a player obtains a set (ie one of each of the cards in that set .. eg 1 x A, 1 x B, 1 x C = 1 set), those cards go back into the pack.

So - again apologies for having absolutely no clue about where to start - is there a mathematics professor out there that can explain how I can calculate:

1. The probabilty that at least one player will receive a Set at times 0, 1, 2 or 3?
2. The probabilty that one or more players will receive a Set at times 0, 1, 2 or 3?
3. What is the average number of sets a player will receive by times 0, 1, 2 or 3?
3. How many cards will normally be left in the pack at times 0, 1, 2 or 3?

Can anyone help ......... ?

Cheers ..... TwoBob

Anonymous
Help with probability!

Hello! I have only just begun looking into card probabilities for a game I'm developing, but I have learned quite a bit and can possibly get you started in the right direction.

Here's a great link to poker hand compotations that has helped me get a grasp on the probability of cards. The math is mostly poker-centric, but you can extrapolate a lot of the information you'll need.

The first question I have is...how much probability and statistics do you know or remember from school? I remembered a little about factorials and that was enough to make sense of the information on the web site.

Just to start with the basics, the number of possible 4 card hands from a set of 45 cards is expressed as C(45, 4) and is calculated as follows:

C(45, 4) = 45!/4!(45-4)! = 45 * 44 * 43 * 42/4 * 3 * 2 * 1 = 148,995

This will help you calculate probabilities of a given hand based on the total possible combinations of any given hand.

OK, that's the easy part...

Anonymous
Help with probability!

Moving onward...

We can treat the "Sets" as suits and the "A, B, C..." as ranks so that we can evaluate the probabilities.

A set, as you deifine it, is equal in poker terms to a straight flush, that is a set of consecutive ranks all of the same suit. Therefore, the number of possible straight flushes is determined by the number of the starting cards of that suit.

With only 1 low card of set 1, and 42 remaining choices for the fourth card in the hand, there are 42 * 1 = 42 possible hands of a complete set 1. The same can be done for the remaining sets:

For Set 2 there are 4 low cards and 42 remaining cards so there are 42 * 4 = 168 possible hands with a complete set 2.

For Set 3 there are 7 low cards and 42 remaining cards so there are 42 * 7 = 294possible hands with a complete set 3.

Adding these together we get 42 + 168 + 294 = 504 possible hands in which there is a complete set. 504/148,995 = 0.00338 or a .34% chance of being dealt a complete set in the first hand. That’s roughly the odds of being dealt a regular straight in a 5-card poker hand.

I only a beginner at this, so I’d apreciate the input of someone with a math/statistics background weighing in on my methods.

From there, the math gets a little messy! From your rules it would seem that players are then dealt 2 additional cards. Do they discard when they are dealt more cards or do their hands grow in size? Do they only discard when a full set is achieved, at which point that set is put back into the draw pile?

twobob
Offline
Joined: 12/31/1969
Help with probability!

SiskNY wrote:
From there, the math gets a little messy! From your rules it would seem that players are then dealt 2 additional cards. Do they discard when they are dealt more cards or do their hands grow in size? Do they only discard when a full set is achieved, at which point that set is put back into the draw pile?

SiskNY - thanks for both the link to the Poker Probs page and your posts on how to calculate (which I managed to follow!). Now to figure out the probabilities at time 1 ... hmmmm. Currently, players only discard their cards when they get a set, but receive 2 extra cards at every other time.

As you said the maths gets a little messy from here! I think I might just playtest it a few more times (maybe another dozen or so times) and - unless I get a freak run of cards - that should give me a rough indication of how well my system works. I'll get back to you if I need more help!

Do any of you guys hire professional mathematicians/programmers to 'run the numbers' before publishing? My game is more of a social game than a strategy game, so perhaps the numbers aren't really that important anyway ...!

Anonymous
Help with probability!

twobob wrote:
SiskNY - thanks for both the link to the Poker Probs page and your posts on how to calculate (which I managed to follow!).