TheManaDrain.com
January 18, 2026, 04:32:49 am *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Calendar Login Register  
Pages: [1]
  Print  
Author Topic: What is the chance for getting a specific card in your opening hand?  (Read 4271 times)
Bone
Basic User
**
Posts: 158



View Profile
« on: August 02, 2009, 03:58:54 am »

What is the chance for getting a specific card in your opening hand?

To find out my chances to get my only mox in my opening hand I did 100/60x7 and got 11.67%

But what is the chance to get a card in my opening hand when I run 2, 3 or 4 of the same card?

Is there some easy mathematics to figure this out?
Logged
Duncan
Full Members
Basic User
***
Posts: 312


Team R&D

duncan_keijzer@hotmail.com duncankeijzer
View Profile
« Reply #1 on: August 02, 2009, 04:12:27 am »

You were right on the 11,67%, but for numbers other than one such things get a bit more complicated.

For calculating those chances you need to use the hypergeometric distribution, which is in Excel. I have the Dutch version but in english I believe the formula is called HYPGEOMDIST(a;b;c;d). a is the number of the card you get in you opening hand, b is the size of your opening hand, c is the number of the specific card in your deck and d is the size of your deck. So if you run 4 Force of Will and you want to kow the chance of having exactly one in your opener you do HYPGEOMDIST(1;7;4;60), which results 33,6%.

For most cards you'd be more interested in having at least one in your opener, which is a sum of the chance of having either 1, 2, 3 or 4 in your opening hand. And that is the same is not having 0 in your opener. So that's calculated by 1-HYPGEOMDIST(0;7;4;60) which results 39,9%.
Logged

"Good things may come to those who wait, but they are merely leftovers from great things that come to those who act.”
Bone
Basic User
**
Posts: 158



View Profile
« Reply #2 on: August 02, 2009, 05:53:19 am »

Thanks Smile
Logged
Mr. Fantastic
Basic User
**
Posts: 143


Master of Illusion


View Profile
« Reply #3 on: August 15, 2009, 04:16:52 pm »

You were right on the 11,67%, but for numbers other than one such things get a bit more complicated.

For calculating those chances you need to use the hypergeometric distribution, which is in Excel. I have the Dutch version but in english I believe the formula is called HYPGEOMDIST(a;b;c;d). a is the number of the card you get in you opening hand, b is the size of your opening hand, c is the number of the specific card in your deck and d is the size of your deck. So if you run 4 Force of Will and you want to kow the chance of having exactly one in your opener you do HYPGEOMDIST(1;7;4;60), which results 33,6%.

For most cards you'd be more interested in having at least one in your opener, which is a sum of the chance of having either 1, 2, 3 or 4 in your opening hand. And that is th`e same is not having 0 in your opener. So that's calculated by 1-HYPGEOMDIST(0;7;4;60) which results 39,9%.


I asked my PhD mathematics professor to do this for me back in 2002 and she said the simplest way is to divide the cards in the deck by copies of the card, then take that number and divide it by the cards you draw, then convert the fraction to a decimal to learn the percentage.

So 60 cards divided by 4 copies of Force is 15.  Then divide 7 cards drawn by 15 (and multiply by 100) to get a decimal of 46.66%

If that is insufficient, I'd like to know why (in laymen's terms if possible; I don't know anything about advanced mathematics).  it seems to me your way complicates it a bit too much.  Also, I'm not saying you are wrong, in fact I doubt I'm right, but have you double checked that you are not entering the numbers wrong?

Edit: 11.67 times 4 is 46.68 btw.  I don't know if that is proof of anything.
« Last Edit: August 15, 2009, 04:20:44 pm by Mr. Fantastic » Logged

"Who needs the sun when you've got me around?"
—Jaya Ballard, Task Mage
ilpeggiore
Basic User
**
Posts: 60


View Profile Email
« Reply #4 on: August 16, 2009, 05:57:29 am »

the chance to see 1 of your 4 fow in the first 7 cards is about 40%.

Quote
For most cards you'd be more interested in having at least one in your opener, which is a sum of the chance of having either 1, 2, 3 or 4 in your opening hand. And that is th`e same is not having 0 in your opener. So that's calculated by 1-HYPGEOMDIST(0;7;4;60) which results 39,9%.

right

Quote
So 60 cards divided by 4 copies of Force is 15.  Then divide 7 cards drawn by 15 (and multiply by 100) to get a decimal of 46.66%

wrong. because in this way, u'r drawing as the deck is 15 cards only.

Quote
Edit: 11.67 times 4 is 46.68 btw.  I don't know if that is proof of anything.

sure. That's because it's 4 time harder to pick the fow if your deck is 60 cards instead of 15 cards.
Logged
Mr. Fantastic
Basic User
**
Posts: 143


Master of Illusion


View Profile
« Reply #5 on: August 16, 2009, 11:38:56 am »

Quote
wrong. because in this way, u'r drawing as the deck is 15 cards only.

Sorry, you're saying when converted to a decimal,  1/15 is different than 4/60?

Quote
Edit: 11.67 times 4 is 46.68 btw.  I don't know if that is proof of anything.

sure. That's because it's 4 time harder to pick the fow if your deck is 60 cards instead of 15 cards.

[/quote]

I am wrong yet my answer is right?

See, this is why I'm not a "math guy." Even when I'm right I'm wrong.
Logged

"Who needs the sun when you've got me around?"
—Jaya Ballard, Task Mage
Yare
Zealot
Full Members
Basic User
***
Posts: 1215


Playing to win

Yare116
View Profile
« Reply #6 on: August 16, 2009, 12:27:56 pm »

I'm pretty sure this is right.

Assuming 4 copies of the card and a 60 card deck:

Probability of NOT drawing at least 1 copy of the card in your opening 7 cards = (56/60)(55/59)(54/58)(53/57)(52/56)(51/55)(50/54) = .6005

=> Probability of drawing at least 1 copy of the card in your opening 7 cards = 1 - .6005 = .3995

So, you have a 39.95% chance of drawing at least one copy of a four-of card in your opening seven cards.

Edit: Yeah, that's what Duncan got. I just wanted to make sure we had it straight due to the ensuing discussion.
« Last Edit: August 16, 2009, 12:33:19 pm by Yare » Logged
ilpeggiore
Basic User
**
Posts: 60


View Profile Email
« Reply #7 on: August 16, 2009, 03:36:57 pm »

Quote
Sorry, you're saying when converted to a decimal,  1/15 is different than 4/60?

No, im saying that the % of drawing at least one of yours fows froma 60 cards deck is not the same of drawing one fow from a 15 cards deck.

Quote
I am wrong yet my answer is right?

You are wrong. You noticed a correlation "it's 4 time harder to pick the fow if your deck is 60 cards instead of 15 cards. " that don't proofs nothing.

let me explain :

every 100 opening hands you will see 11,67 times your lotus

every 100 o. h. u'll see 11,67 times your petal

that doesn't mean that  you'll see at least one lotus or one petal in the 23,34% of your opening hands . that's because there 'll be some hands with petal AND lotus.

so the % of opening hands with one of the 2 cards is about 20,5 % and not 23,3%.

the same if you are calculating the probs of seeing one of your fow.

the % of seein at least one of your fow in your opening is :
the % of seein fow A + the % of seeing fowB (- the % of seeing fowa and fowB) + the % of seeing fow C (- the % of seeing FowC and fowA or fowB)+ the % of seeing fowD (- the % of seeing fowD and another fow).

se the total is  about 40% and not 46%


Logged
Mr. Fantastic
Basic User
**
Posts: 143


Master of Illusion


View Profile
« Reply #8 on: August 16, 2009, 03:52:37 pm »

Quote
Sorry, you're saying when converted to a decimal,  1/15 is different than 4/60?

No, im saying that the % of drawing at least one of yours fows froma 60 cards deck is not the same of drawing one fow from a 15 cards deck.

Quote
I am wrong yet my answer is right?

You are wrong. You noticed a correlation "it's 4 time harder to pick the fow if your deck is 60 cards instead of 15 cards. " that don't proofs nothing.

let me explain :

every 100 opening hands you will see 11,67 times your lotus

every 100 o. h. u'll see 11,67 times your petal

that doesn't mean that  you'll see at least one lotus or one petal in the 23,34% of your opening hands . that's because there 'll be some hands with petal AND lotus.

so the % of opening hands with one of the 2 cards is about 20,5 % and not 23,3%.

the same if you are calculating the probs of seeing one of your fow.

the % of seein at least one of your fow in your opening is :
the % of seein fow A + the % of seeing fowB (- the % of seeing fowa and fowB) + the % of seeing fow C (- the % of seeing FowC and fowA or fowB)+ the % of seeing fowD (- the % of seeing fowD and another fow).

se the total is  about 40% and not 46%




I'm sorry but I don't understand what you are saying at all.  I do appreciate your attempt to explain however.  I think I kind of understand Yare's explanation if only slightly.
Logged

"Who needs the sun when you've got me around?"
—Jaya Ballard, Task Mage
Djinn
Basic User
**
Posts: 79


View Profile
« Reply #9 on: August 18, 2009, 08:48:56 pm »

@ Mr. Fantastic.

Think of it like this - I think this will shed light on why your logic is wrong.  You divided the deck by 4 because there are 4 copies of said card (this logic does not really get you much).  However, if your deck is cut by three quarters (60 cards --> 15 cards), why would it then make sense to draw 7 cards, which is equivalent to nearly half the deck?  You're talking about drawing 7 cards out of 60 versus 7 out of 15 - they simply do not correlate.

You need to use that function because the chance you draw a certain card changes every time the deck becomes smaller.  Imagine you draw one card from your 60 card deck.  It is one of 4 copies of a card you have in your deck.  The deck size is now 59 cards, and there are 3 more of that card in the deck.  The chances of drawing another one are now 3/59, as opposed to the 4/60 that you originally had. 

Now imagine the first card you draw is NOT the card you are looking for.  The chances went from being 4/60 to 4/59.  I think you can see where this is going now.  To complicate things more, you want to know the chances of drawing AT LEAST one of the card you are looking for, so even more scenarios need to be accounted for.

Because of all these complexities, it does not make sense to just divide by 4 then by 7.  If I am wrong about something please correct me.  I hope I helped. 
Logged
meadbert
Adepts
Basic User
****
Posts: 1341


View Profile Email
« Reply #10 on: August 18, 2009, 09:14:42 pm »

Yare's explanation is correct.  Basically if you want to figure out the expectation or average number of Force of Wills in your opening hand then that is 7*4/60.  If instead you want the probability of drawing at least 1 it is lower since you sometimes start with 2, 3 or even 4.  For the probability of drawing at least one, Yare gave the explanation.
Logged

T1: Arsenal
Harlequin
Full Members
Basic User
***
Posts: 1860


View Profile
« Reply #11 on: August 19, 2009, 01:45:37 pm »

@ 39.95 is approximately 60/4 -> 7/15

This is a short hand way of doing "in your head" math.  But its not exact.  

To use your example, what the probably of drawing 1 Force of will in 15 cards?  60 / 4 = 15... 15/15 = 100% ?  Does this mean you gaurenteed to find a force every time you draw 15 cards?  Clearly not.  And despite this being a very extreme example, if you do the math out it turns out that this is around 70%.  (with the expected number of forces draw being exactly equal to 1).  


What your example does is it says:  Ok 1 deck of 60 cards with 4 copies of FOW .... is kinda like saying we have 4 decks of 15 cards each with 1 copy of FOW. But going back to more reasonable number, If we were to draw 7 cards we would have 7/15 or "a little less than 50%" to draw our FOW.  If we instead drew 5 cards we would have "about 5/15 is about 1/3."  

While not exact, this logic is very useful to aproximate your changes in a practical situation where you want to consider probability - but you don't have the luxory of computation.  You're going to mull to 5, whats the odds of drawing FOW?  Well its aproximately 33% (based on our logic above).   you have 50 cards left in your deck, and you've burned 1 FOW you're going to Recall.. whats the odds of a 2nd force?  50/3 ~> 16 and 3/16 is a little less than 1/5.  

And if you did it out exactly you would see that its 17.270% (where 1/5 is 20%).  This type of "on the fly" math can be useful in a match.  The differance between "Its a little less than 20%" and "Its Exactly 17.270%" is negligible when you are deciding on either doing something or not doing it.  So your trick is actually more useful than knowing the exact mathematics... when it comes to application during an event.  

So to answer the question you asked:  We see that it -is- different; but -why- is it different.  The assumption that drives your shortcut is that 1 deck of 60 cards with 4 is identical to 4 decks of 15 cards each with 1.  It doesn't consider the probably that a single 15 card deck has no forces, or 2 forces, or even all 4 forces!  Each of those permuations yield sub-probabilites like "what if the first deck has all 4 forces, but they are in the bottom 4 cards - then you still draw no forces."   All of these possibilites would need to be considered to nail down an exact probabilty.  It could be done, but it would require a rock-solid understanding of conditional probability.  

You shorth hand starts with a near uniform distribution, and says any other permuations iether don't exist or cancle each other out.  So its useful in shorthand, but ulimately not exact.

--------------------------------------------------------------------------------------------------------------------------------------------------------
The interesting observation is that you pointed out that 7/15 (short cut for FOW) is equal to 4 x 7/60 (exact probably for Lotus).  While we know this is mathematically true, how does my example account for this:

Lets say that we have a 60 card deck with 1 lotus.  We shuffle it up and divide it into 4 decks of 15 cards.  Now we know that exactly ONE of those decks has exactly ONE lotus, and the other THREE decks have exactly ZERO lotus. 

Then I say, ok you pick a pile and draw 7 card from it.  Right off the bat you only have a 1 in 4 chance of picking the Lotus Pile.  Then from there, if you DO get the lotus pile you have a 7/15 chance of gett the lotus.  So It ends up being:
Prob( you choose the wrong pile) * Prob( Drawing lotus off that pile AKA 0%) + Prob ( you choose the right pile) * Prob( you draw the lotus) = ...
( 3/4 * 0% ) + ( 1/4 * 46.67% ) = 11.67%
« Last Edit: August 19, 2009, 03:23:00 pm by Harlequin » Logged

Member of Team ~ R&D ~
pickle.69
Basic User
**
Posts: 14


View Profile
« Reply #12 on: August 24, 2009, 07:32:51 am »

Hi did aynwone ever do the Math for getting Bazaars in hand with 4 Serum powders in a deck?

thanks
Logged
Harlequin
Full Members
Basic User
***
Posts: 1860


View Profile
« Reply #13 on: August 24, 2009, 08:55:40 am »

The number 88% comes to mind if you mull to 1 in search of bazaar.  The problem with this type of calcualtion is that it has tons of possible purmutation.  And the 60 card deck you start with gets smaller each time you use powder.

The best approach here is simulation.  Basically write a small loop to 'test' millions of opening hands and count how many times you sucessfully find bazaar and how many times you don't.  I and others have done the simulation, I just can't find my workbook for it right now.  But again the number 88% is in my head for some reason.
Logged

Member of Team ~ R&D ~
meadbert
Adepts
Basic User
****
Posts: 1341


View Profile Email
« Reply #14 on: August 24, 2009, 09:21:18 am »

I have done the math 2 ways and they got the same answer.
The answer is 0.94168133

Here is the c code that determines it:

#include <stdio.h>

/*powders in hand, other cards in hand, powders in deck, other cards in deck, draws till next mull*/
float m[5][8][5][53][8];

/*
  Initialize all values to -1 which represents not knowing the probability.
*/
init(void)
{
    int ph, oh , pd, od, dr;

    for(ph = 0;ph < 5;ph++) {
        for(oh = 0;oh < 8;oh++) {
            for(pd = 0;pd < 5;pd++) {
                for(od = 0;od < 53;od++) {
                    for(dr = 0;dr < 8;dr++) {
                        m[ph][oh][pd][od][dr] = -1.0;
                    }
                }
            }
        }
    }
}

static float getProb(
    int ph,/* Powders in hand*/
    int oh,/* Other cards in hand*/
    int pd,/* Powders in deck*/
    int od,/* Other cards in deck*/
    int dr)/* Draws left till next mulligan*/
{
    float retval = m[ph][oh][pd][od][dr];
   
    if(retval >= 0) {
        return retval;
    }
    if(dr == 0) {
        if(ph > 0) {
            retval = getProb(0, 0, pd, od, ph + oh);
            m[ph][oh][pd][od][dr] = retval;
            return retval;
        }
        if(ph + oh == 0) {
            m[ph][oh][pd][od][dr] = 0;
            return 0;           
        }
        retval = getProb(0, 0, ph + pd, oh + od, ph + oh - 1);
        m[ph][oh][pd][od][dr] = retval;
        return retval;
    }
    retval = 4.0/(pd + od + 4.0);
    if(pd > 0) {
        retval += pd/(pd + od + 4.0)*getProb(ph + 1, oh, pd - 1, od, dr - 1);
    }
    if(od > 0) {
        retval += od/(pd + od + 4.0)*getProb(ph, oh +1, pd, od - 1, dr - 1);
    }
    m[ph][oh][pd][od][dr] = retval;
    return retval;
}

int main()
{
    float prob;

    init();
    prob = getProb(0, 0, 4, 52, 7);
    printf("%.8f\n", prob);
    return 0;
}
Logged

T1: Arsenal
median
Basic User
**
Posts: 229



View Profile WWW Email
« Reply #15 on: August 24, 2009, 06:17:39 pm »

I'm just curios on the ichorid math, I've seen some lists running crop rotation in place of serum powder. the advantage is that it will most of the time give you a bazaar, where powder just gives you a better chance at one.
what's the math on crop rotation vs bazaar?

my knowledge of programing is pathetic and I'm just starting to fully understand the full functions of excel. If this were not the case, i would do the math myself.

Logged

He traded goats for artifacts, artifacts for cards, cards for life. In the end, he traded life for goats.
Harlequin
Full Members
Basic User
***
Posts: 1860


View Profile
« Reply #16 on: August 25, 2009, 04:30:52 pm »

The answer totally depends on how many of each card you run.

Lets say we have 4 bazaars, 4 Crop Rotates, and 6 "other" lands that can cast rotate.

Sucess is either of these two independant sets:

Prob(Getting Bazaar and Any other cards) +
Prob(Not Gettng Bazaar; but getting at least 1 Crop AND at least 1 land)

With Conditional Probability that is the same as:

Prob( Bazarr Not 0 ) + Prob( Getting Crop Rotation | Bazaar = 0 ) x Prob( Bazaar = 0)

Wich for 7 cards is:

.39950 + (.22324)(1 - .3995) = 53.356% ... for 7 cards

* That .22324 is not super easy to get.  I have a handy spreadsheet that does handy math for me.  The big thing to note here is that you are only useing "Choose 56" because it is "Known" that you don't have bazaar.

.35146 + (.11158)(1 - .35146) = 46.304% .... for 6 cards
38.717% for 5 cards
30.719% for 4 cards
22.501% for 3 cards
14.350% for 2 cards
6.667% for 1 card (which has a 0% chance to draw both crop rotate AND a mana)

So now for mulligans.  You clearly can't just add all this together, instead you have to do:
Prob(Sucess on 7) +
Prob(Failure on 7) x Prob(sucess on 6) +
Prob(Failure on 6 AND 7) x Prob(sucess on 5) +
...
prob( sucess on 1)

So it looks like:
53.356% +
(1-0.5335)(46.304%) +    ;Marginal Prob = 21.60% | Cumulative = 74.95%
(1-0.7495)(38.717%) +    ;Marginal Prob = 9.70   | Cumulative = 84.65%
(1-0.8465)(30.719%) +    ;Marginal Prob = 4.72   | Cumulative = 89.37%
.... etc

Down to
Cards - Marginal - Cumulative
7 ----- 53.35% ----- 53.356%
6 ----- 21.60% ----- 74.95%
5 -----  9.70% ----- 84.65%
4 -----  4.72% ----- 89.37%
3 -----  2.39% ----- 91.76%
2 -----  1.18% ----- 92.94%
1 -----  0.47% ----- 93.41%

So with 6 lands that can tap for green, 4 bazaars and 4 crop rotations - you end up with a 93.41% total 'success' chance to hit your bazaar or castable rotate by the time you mull to 1.

Logged

Member of Team ~ R&D ~
median
Basic User
**
Posts: 229



View Profile WWW Email
« Reply #17 on: August 25, 2009, 09:32:37 pm »

so with about a 40% chance of crop rotation being forced, it becomes entirely unplayable; compared to serum powder (with a 94.1% base chance).
thanks.
Logged

He traded goats for artifacts, artifacts for cards, cards for life. In the end, he traded life for goats.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.049 seconds with 20 queries.