# Card Probablities

Discussion in 'Cards: Strategy and Rulings Discussion' started by ugly psyducky, May 27, 2008. 1. ### ugly psyducky<a href="http://pokegym.net/forums/showpost.php?p=

I saw someone asking on the Ask the Master's Forum about card Probabilities and having read an older thread I thought a few clarifications might be needed to understand how this can be easiliy calculated. I had also seen some somewhat erroneous discussion of the hypergeometric distribution in an older thread, but didn't want to revive it so instead I started this one:

Obviously the idea is, to ask questions like:

If I have 6 basics in my deck what is the likelihood that I will have a basic in my openning hand

OR

If I have two of a particular trainer what is the likelihood that both cards will be prized

In essence each of these questions is slightly different in terms of the mathematical solution. However both rely on the fact that the deck is completely randomized before each shuffle. Let us take the following

n -- the total number of cards in a deck at this point in the game state
k -- the total number of instances of the same card (e.g. four basics)
t -- the total number of cards to be drawn (e.g. seven cards to start the game)
p -- the probablity of at least one card of type k being in the cards drawn

Then:

p = 1 -[(n-k)!(n-t)!]/[n! (n-k-t)!] {where n! = n x (n-1) x (n-2) x (n-3) .... x (2) x (1)}

So for example if you have 4 basics (k =4)in your deck at the start of the game (i.e. n = 60), and you draw your starting hand (t=7) you have:

p = 1 -[(60-4)!(60-7)!]/[60! (60 - 7 -4)!] = 1 -0.6005 ~ 40%

I have seen reference to the fact that this is the hypergeometric function, but it is not. The hypergeometric function has one more arguement which is the number of cards in the drawn set (we'll call this "q") which are of type "k". So we could ask what is the chance of having exactly one basic in our starting hand. In which case:

P = HYPGEOMDIST* (q,t,k,n) = HYPGEOMDIST (1,7,4,60) ~33.6%

* The factorial breakout of this is pretty ugly, but if you check out Excel help it for this function it will steer you in the right direction

This is the chance that you will start with exactly one of the basics in your hand. If one were to add up the probablities of having exactly 1, exactly 2, exactly 3 and exactly 4. You would get

p = P(q=1) + P (q=2) + P (q = 3) + P (q=4) = 33.6% + 5.9% + 0.4% + 0.007% ~ 40%. The same as given in the formulation above.

The first function is much more useful for asking the questions about muligans or what the likelihood of drawing a particular card in a particular gamestate. Whereas the Hypergeometric distribution is more useful for asking a question like, what is the chance that all my rare candies will be prized etc.

Hopefully this is useful to some. I can do more math if you like, but hopefully this suffices.

Regards

Last edited: May 27, 2008
2. Also can be found by 1 - (x/60*((x-1)/59)*((x-2)/58)*((x-3)/57)*...*((x-p)/(60-p)))

where x is the number of cards, say basics, in your deck you are trying to get, and p is the number of cards you will be drawing. The ellipsis(triple dots) means you keep subtracting one from the top and bottom until you reach x-p on the top and 60-p on the bottom. My formula makes a lot more sense to me, but I'm sure yours works fine as well.

3. Hope it wasn't any of my threads that you were referring to as erroneous. Not that I can't make mistakes but it is unlikely on this particular topic.

So sorry guys but the Hypergeometric distribution is the right distribution to apply to our opening hands. Just because it is possible to plug the wrong numbers in and get the wrong answer out as a result doesn't make it incorrect. or to fail to setup the problem correctly does not mean that the Hypergeometric distribution does not apply.

The one or more problem is best resolved by calculating 1-Mulligan. You can however sum several hypergeometric results if you wish, it just takes a bit longer!

for the problem you give you just use 1- HYPGEOMDIST (0,7,4,60)

Last edited: May 28, 2008
4. ### ugly psyducky<a href="http://pokegym.net/forums/showpost.php?p=

Firstly no offences was meant by the use of the word erroneous, confusing might have been a better word to use.

All I remeber of the thread was the ascertion that the chance of having a muligan with only 4 basics in the deck was 67%, which hopefully we can all agree is incorrect. I also certainly didn't mean to imply the hypergeometric function couldn't be made to apply, but hadn't thought of a zero successes manner of making it apply (agreeing this is much cleaner then my adding all of the possitive success possiblities). So just to check my math:

1- HYPGEOMDIST (q=0,t,k,n)

= 1 - {n-k}c{t-q} x {k}c{q} / {n}c{t} where {n}c{k} = n! / (n-k)!k!

for q =0

= 1 - {n-k}c{t} x {k}c{0} / {n}c{t} {k}c{0}=1

= 1 - [(n-k)!/(n-k-t)!(t)!]/[(n)!/(n-t)!(t)!]

= 1 - [(n-k)!(n-t)!]/[(n-k-t)!(n)!]

which is the formulation I presented for the case. Hopefully that clears up any misconceptions.

The good news is that with math, unlike Pokemon there is only one right answer even if it can be presented in multiple different notations.

Number of Basics............ Chance of a Mulligan
1....................................... 88.3%
2....................................... 77.9%
3....................................... 68.5%
4....................................... 60.1%
5....................................... 52.5%
6....................................... 45.9%
7........................................39.9%
8 .......................................34.6%
9........................................30.0%
10......................................25.9%
11......................................22.2%
12......................................19.1%
13......................................16.3%
14......................................13.9%
15......................................11.8%

Number of Card X in Deck..........Chance all Prized*
1..................................................10.169%
2...................................................0.877%
3...................................................0.062%
4...................................................0.003%

* Noting that population is 59 not 60 as 1 card from the deck must not be in your prizes as it must be a basic in play

Regards

Last edited: May 29, 2008
5. 'sokay. Gives me an excuse to plug Mewchous' opening hand simulator :

Simulator

Last edited: May 28, 2008
6. ### ninetales1234<a href="http://pokegym.net/gallery/browseimages.p

Do these numbers take into account that you have to do your opening hand first (and it must have at least 1 card that is a basic Pokemon) and then lay out your prizes?

X-Act made the mistake of not taking that into account in a Pojo article and had to fix his numbers.
http://www.pojo.com/Features/X-Act/2005/Odds in Pokemon 3.htm

7. ### TheDarkTwinsActive Member

As, I have said before, you can have a good pokemon starter, but what happens if you have a pokemon and 6 useless cards. You have a good pokemon start, but a bad start overall.