Here's how I, as a mathematician who is not especially good at probability, would do it. First, find a lower bound. Do this by ignoring card draw. (In the sample deck, these are Bloodmage Thalnos, Novice Engineer, Gnomish Inventor, Acolyte of Pain, and Power Word: Shield. Also the outside cases of drawing from Shadow Visions into PW:S, Kabal Courier into a draw card turn 4, or drawing from Northshire Cleric.)
I'll compute by the "one minus" method; find the probability of NOT drawing Raza by turn 5, and subtract that from 1. (I assume you meant _by_ turn 5, rather than _on_ turn 5.) Three things have to happen: one is to miss Raza in the opening hand, the second is to miss Raza on the mulligan assuming you didn't start with it, and the third is to miss Raza after the mulligan assuming it wasn't in your first 7 cards.
The prob of not drawing Raza in first 3 is (29 choose 3)/(30 choose 3), or 90%. The probability of not opening with Raza and not getting Raza in the hard mulligan is .9*(26 choose 3)/(27 choose 3), or 80%. The probability of missing Raza in both first two stages and then not drawing Raza by turn 5 is .8*(26 choose 5)/(27 choose 5), or about 65%. According to this, the minimum probability of drawing Raza by turn 5 is therefore about (1-.65) or 35%.
Then I'd find a close-to-upper-bound. The probability gets higher the more cards you draw. Let's not calculate quite the max number of cards you could draw, but rather say you drop Engineer turn 2, Acolyte turn 3, and Inventor turn 4, and manage to draw 2 cards from Acolyte. That's 4 extra cards, a pretty high expectation for the number of extra draws. This only affects the third stage of the calculation, where we just change the number 5's to 9's. That gives a number of (1-.53) or 47%.
So, the answer is somewhere between 35% and 47%. The upper bound was pretty extreme, so the true value is almost certainly much closer to 35%. I'd guess the 37-39% range.
Just banged this out real quick. Might not be right, even though I am a "good mathematician".
So if you hard mulligan for raza and don't even keep Anduin and have no card draw and no coin then 36.67% any extra card drawn on turns 1-4 adds 3.33% (if you draw your hole deck somehow then 100%)
with the coin it is 43.3% because you get an extra card and extra mulligan... same as before 3.33% for any extra draw you get. If you deck is draw heavy reaching over 50% chance is manageable.
This is correct. :)
I don't think it is correct. Getting Raza by turn 5 is NOT the same as Raza "being in the top 11 cards of your deck", as the ones you mulligan away go back to the pool and can push Raza further down your deck.
Oh right I made a mistake in step 2. I forgot to take into account that 3 mulliganed cards are returned into deck. So it should be 10% that you get it in Muligan, lucky you. 90%*3/27 = 10% chance that you get it after you muligan 80%*5/27 = 14.81% (which is indeed 4/27) chance that you get it in 5 topdecks
Yep 34.81% seems to be about right. I used 8/27 * 90% at step 2, which of course increased odds, as if 3 mulliganed cards are discarded instead of shuffled back into deck...
I only did the going first case so far and ignored card draw.
It shows you how to calculate it though (it gets quite complicated).
EDIT: That was to do with drawing a set number of minions from a Big Priest deck. Drawing a specific card is easier to calculate, you just need to think about the mulligan situation (since it depends on how may cards you mulligan) and then use hypergeometric distribution for the chance to draw the specific card after a certain number of draws.
EDIT2: Chance to have it before the mulligan if going first is 3/30 = 1/10, going second is 4/30. If you don't have it, you then consider how many cards you mulligan and use the hypergeometric distribution to get the chance to get it from the mulligan (find 1 card from how many you draw in the mulligan from 27 cards in the deck if going first, 26 cards if going second). Then if you don't have it after the mulligan it's another hypergeometric calculation to see if you draw it within a set number of draws.
You don't even have to use the hypergeometric distribution if you are only looking for 1 card, since each draw is just 1/N chance to get it where N is number of cards left in the deck. You do need separate cases for how many cards you decide to mulligan.
EDIT: Hypergeometric would be used where you have a certain number of outs you can draw and you need to draw 1 or more of them in a certain number of draws.
So corrected calculations taking into account my past errors:
Going first: (without coin) chance is 34.81% without card draw Every card drawn increases chance by 2.96%
Going second: (with coin) chance is 40.77% Every card drawn increases chance by 2.82%
Your calculation looks correct.
If you don't mulligan everything, instead of 3/27 to draw it going first (4/26 going second), the chance to get it from the mulligan is M/27 or M/26 (going 2nd) where M cards are thrown back.
Then if you don't get it post mulligan, each draw is 1/R to draw it where R is the number of cards remaining in the deck, and the chance to draw it within D draws is D/27 going first, D/26 going 2nd.
Chance to get it during mulligan of 3 given you don't have it in opening hand = 9/10 * 3/27 = 1/10
Chance to get it within D draws when you didn't get it from mulligan is (1 - (1/10 + 1/10)) * D/27 = 8/10 * D/27 = (8*D)/270
Add up those to get chance to have it after D draws (1/10 + 1/10 + 8*D/27 = 2/10 + 8*D/270 = 54/270 + 8*D/270
= (54 + 8*D)/270
When D=5, chance is (54 + 40)/270 = 94/270 ~= 34.81%
EDIT: Sanity check: when D=27 probability is (54 + 8*27)/270 = 1, so formula works.
Going first, mulligan 2
Pre-mulligan chance still 1/10
Chance to get it from mulligan of 2 given not having is pre-mulligan = 9/10 * 2/27 = 18/270 = 1/15
Chance to get it from D draws when you didn't get it from mulligan is (1 - (1/10 + 1/15)) * D/27 = (30/30 - 3/30 - 2/30) * D/27 = 25/30 * D/27 = 25*D/810
So add up those to get chance of having it after D draws when you mulligan 2 = 1/10 + 1/15 + 25*D/810 = 81/810 + 54/810 + 25*D/810
= (135 + 25*D)/810. When D=5 chance is (135+125)/810 = 260/810 ~= 32.1%
Going first, mulligan 1
Pre-mulligan chance still 1/10
Chance to get it from mulligan of 1 given not having is pre-mulligan = 9/10 * 1/27 = 9/270 = 1/30
Chance to get it from D draws when you didn't get it from mulligan is (1 - (1/10 + 1/30)) * D/27 = (30/30 - 3/30 - 1/30) * D/27 = (26/30) * D/27 = 26*D / 810
So add up those to get chance of having it after D draws when you mulligan 1 is 1/10 + 1/30 + 26*D/810 = 81/810 + 27/810 + 26*D/810
= (108 + 26*D)/810. When D=5 probability is (108 + 130)/810 = 238/810 ~= 29.38%
Going first, mulligan 0
Pre-mulligan chance still 1/10
Chance to get it within D draws given not having it pre-mulligan is 9/10 * D/27 = 9*D/270
Add those up to get the chance of having it after D draws when mulligan 0 so 1/10 + 9*D/270 = (27 + 9*D)/270
When D=5 probability is (27+45)/270 = 72/270 ~= 26.67%
Just for the heck of it, I made a simulator for this as well. Of course, assuming no draw cards and a full mulligan if no Raza. Answers were the following:
With Coin = ~41.39%
Without Coin = ~34.47%
Not sure why the slight difference in answers though...
Just for the heck of it, I made a simulator for this as well. Of course, assuming no draw cards and a full mulligan if no Raza. Answers were the following:
With Coin = ~41.39%
Without Coin = ~34.47%
Not sure why the slight difference in answers though...
Do you mean the difference between my answer 34.8148% and your 34.47%? If your answer comes from the simulations then it's really not very far from the true ones. Such a small approximation error is really fine even if you made quite a few repetitions.
Yes, but I did 10,000,000 simulations though! Would think that it would be dead on... I must have missed something cause the math is good.
Surprisingly, the error doesn't look so bad! The so-called "rate of convergence" of the mean of a sample as an the estimator of the probability of success in this distribution (i.e., Binomial(n,0.348148)) is 1/sqrt(n). So, roughly speaking, if you make around 1,000,000 samples then the error will be of the order of 0.001. The absolute error you got is ~0.0035. I'm too tired to do calculate it all very precisely now but I think it might be a tiny bit large, but not unacceptable.
I have come up with a formula for this assuming you don't see it in your opening hand (i.e. pre-mulligan) but I must have pressed back button or something since the forum ate my post :(
Not having it in your opening hand is the only scenario we are really interested in anyway since you wouldn't need to work out any probabilities if you had it in your opening hand. Formula depends on M (number of cards thrown in mulligan) and D (number of draws).
I'll get some beer from the shop and do it again when I return.
EDIT: Re: simulation error, you aren't adding the cards you mulligan back into the pool you can draw from in the mulligan phase are you? Number of cards you draw from is always 27 going first or 26 going 2nd. That is the usual cause of errors.
Yes, but I did 10,000,000 simulations though! Would think that it would be dead on... I must have missed something cause the math is good.
Surprisingly, the error doesn't look so bad! The so-called "rate of convergence" of the mean of a sample as an the estimator of the probability of success in this distribution (i.e., Binomial(n,0.348148)) is 1/sqrt(n). So, roughly speaking, if you make around 1,000,000 samples then the error will be of the order of 0.001. The absolute error you got is ~0.0035. I'm too tired to do calculate it all very precisely now but I think it might be a tiny bit large, but not unacceptable.
I think it might have to do with Pseudo random generator in question that he has used... some of them have biases which are bad for shuffling algorithms...
Dividing numerator and denominator by 27 (cheated a bit here by looking at factors to try from original formula, but it's beer O'Clock now)
(1458 + 216*D)/7290 = (54 + 8 * D)/270 so this agrees with my calculation where I took seeing the card before the mulligan into account. I notice I can further divide by 2 to get a simpler fraction,
(54 + 8*D)/270 = (27 + 4*D)/135
and those numbers are coprime so they can't be simplified further.
So the equation to factor in the probability of having it before the mulligan looks good too.
Just one thing I want to mention before the error spreads:
Having a specific card in your mulligan is NOT 3/30 (or 10%) as some people say here, since one card is gone from the calculation after it is in your hand. Having it in your mulligan is: 1/30+1/29+1/28 = 10.35% (or 14.06% if going second) Also after you hard mulligan all cards, the chance isn't 10% either. You can not get a card you mulliganed again and no card twice, so the chance for this step is: 1/27+1/26+1/25 = 11.55% (or 16.36% if going second)
and that is quite a difference to your 10%, gentlemen.
I thought so too at first, but it is correct.
Simple argument: You see 3 cards from the 30 before the mulligan (going first). The card you want is either in these 3 (chance: 3/30) or it is not (chance: 27/30).
More complex argument:
Chance of NOT seeing the card is 29/30 * 28/29 * 27/28 = (29*28*27)/(30*29*28) = (29*28*27)/(30*29*28) via cancellation argument = 27/30.
Chance of seeing it is therefore 1 - (27/30) = 30/30 - (27/30) = (30-27)/30 = 3/30 = 1/10
This is because 1 - ((N-1)(N-2)(N-3)/(N(N-1)(N-2)) = 1 - ((N-3)/N) = N/N - (N-3)/N = (N-(N-3))/N = (N - N + 3)/N = 3/N
EDIT: And a similar argument shows the chance of having a specific card in the 4 you see when going 2nd is 4/30.
I don't see where you get 1/30 + 1/29 + 1/28 from, but that is incorrect. EDIT: Simple reason for this, if you got all your cards at once, 1/30 + 1/29 + 1/28 + ... + 1/3 + 1/2 + 1/1 > 1 ;) EDIT2: In fact, 1/1 + 1/2 + 1/3 + ... increases without bounds (i.e. sum from n= 1 to infinity of 1/n is infinity. Sum of 1/(n*n) as n tends to infinity is pi*pi/6 though :P
Seems legit for the brain at first, but then I drew a probability tree and remembered that I learned all the Bernoulli stuff some years ago.
I quoted you so no hiding :P
The mistake you made is that if you get the card as the first one, the chance to see it as the 2nd or 3rd one goes down to 0/30 => conditional probability complications, so it is (far) easier to work out the chance to NOT see it and do 1 minus that instead. And once you do the algebra it is N/30 where N is the number of cards you see.
EDIT: It's more complicated (i.e. not N/30 or 2N/30 where N is the number of cards you see) if you have 2 copies of a card though... but again the easiest way to calculate the probability is to do 1 - p(you don't see a copy) in that case as well.
So chance to see 1 card you have 2 of going first is
I may do some more maths regarding Prince Keleseth being playable on curve (turn 2 going first, turn 1 going second coining him out), and whether it is a good idea to keep a single copy of Shadowstep or not.
I opened Keleseth on day 1 of KFT (still not got Bloodreaver Gul'dan though so I'm just playing the rogue version).
I'll see how good the beer batteries are at powering my maths ;)
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
10% that you get it in Muligan, lucky you.
90%*3/27 = 10% chance that you get it after you muligan
80%*5/27 = 14.81% (which is indeed 4/27) chance that you get it in 5 topdecks
Yep 34.81% seems to be about right. I used 8/27 * 90% at step 2, which of course increased odds, as if 3 mulliganed cards are discarded instead of shuffled back into deck...
I am envoy from nowhere in nowhere. Nobody and nothing have sent me. And though it is impossible I exist. ©Trimutius
Example of how to calculate this kind of thing (in detail), if you hard mulligan for a card.
http://www.hearthpwn.com/forums/hearthstone-general/general-discussion/203995-mungos-maths-thread
I only did the going first case so far and ignored card draw.
It shows you how to calculate it though (it gets quite complicated).
EDIT: That was to do with drawing a set number of minions from a Big Priest deck. Drawing a specific card is easier to calculate, you just need to think about the mulligan situation (since it depends on how may cards you mulligan) and then use hypergeometric distribution for the chance to draw the specific card after a certain number of draws.
EDIT2: Chance to have it before the mulligan if going first is 3/30 = 1/10, going second is 4/30. If you don't have it, you then consider how many cards you mulligan and use the hypergeometric distribution to get the chance to get it from the mulligan (find 1 card from how many you draw in the mulligan from 27 cards in the deck if going first, 26 cards if going second). Then if you don't have it after the mulligan it's another hypergeometric calculation to see if you draw it within a set number of draws.
So corrected calculations taking into account my past errors:
Going first: (without coin)
chance is 34.81% without card draw
Every card drawn increases chance by 2.96%
Going second: (with coin)
chance is 40.77%
Every card drawn increases chance by 2.82%
I am envoy from nowhere in nowhere. Nobody and nothing have sent me. And though it is impossible I exist. ©Trimutius
You don't even have to use the hypergeometric distribution if you are only looking for 1 card, since each draw is just 1/N chance to get it where N is number of cards left in the deck. You do need separate cases for how many cards you decide to mulligan.
EDIT: Hypergeometric would be used where you have a certain number of outs you can draw and you need to draw 1 or more of them in a certain number of draws.
Yes, this is correct. I calculated nearly the exact same numbers.
So a full answer including mulligan scenario
Going first, mulligan 3
Chance to get it pre-mulligan = 3/30 = 1/10
Chance to get it during mulligan of 3 given you don't have it in opening hand = 9/10 * 3/27 = 1/10
Chance to get it within D draws when you didn't get it from mulligan is (1 - (1/10 + 1/10)) * D/27 = 8/10 * D/27 = (8*D)/270
Add up those to get chance to have it after D draws (1/10 + 1/10 + 8*D/27 = 2/10 + 8*D/270 = 54/270 + 8*D/270
= (54 + 8*D)/270
When D=5, chance is (54 + 40)/270 = 94/270 ~= 34.81%
EDIT: Sanity check: when D=27 probability is (54 + 8*27)/270 = 1, so formula works.
Going first, mulligan 2
Pre-mulligan chance still 1/10
Chance to get it from mulligan of 2 given not having is pre-mulligan = 9/10 * 2/27 = 18/270 = 1/15
Chance to get it from D draws when you didn't get it from mulligan is (1 - (1/10 + 1/15)) * D/27 = (30/30 - 3/30 - 2/30) * D/27 = 25/30 * D/27 = 25*D/810
So add up those to get chance of having it after D draws when you mulligan 2 = 1/10 + 1/15 + 25*D/810 = 81/810 + 54/810 + 25*D/810
= (135 + 25*D)/810. When D=5 chance is (135+125)/810 = 260/810 ~= 32.1%
Going first, mulligan 1
Pre-mulligan chance still 1/10
Chance to get it from mulligan of 1 given not having is pre-mulligan = 9/10 * 1/27 = 9/270 = 1/30
Chance to get it from D draws when you didn't get it from mulligan is (1 - (1/10 + 1/30)) * D/27 = (30/30 - 3/30 - 1/30) * D/27 = (26/30) * D/27 = 26*D / 810
So add up those to get chance of having it after D draws when you mulligan 1 is 1/10 + 1/30 + 26*D/810 = 81/810 + 27/810 + 26*D/810
= (108 + 26*D)/810. When D=5 probability is (108 + 130)/810 = 238/810 ~= 29.38%
Going first, mulligan 0
Pre-mulligan chance still 1/10
Chance to get it within D draws given not having it pre-mulligan is 9/10 * D/27 = 9*D/270
Add those up to get the chance of having it after D draws when mulligan 0 so 1/10 + 9*D/270 = (27 + 9*D)/270
When D=5 probability is (27+45)/270 = 72/270 ~= 26.67%
I'll leave the going 2nd case as an exercise ;)
@pempek
Just for the heck of it, I made a simulator for this as well. Of course, assuming no draw cards and a full mulligan if no Raza. Answers were the following:
With Coin = ~41.39%
Without Coin = ~34.47%
Not sure why the slight difference in answers though...
Auto squelch. That's all I'm asking for.
Yes, but I did 10,000,000 simulations though! Would think that it would be dead on... I must have missed something cause the math is good.
Auto squelch. That's all I'm asking for.
I have come up with a formula for this assuming you don't see it in your opening hand (i.e. pre-mulligan) but I must have pressed back button or something since the forum ate my post :(
Not having it in your opening hand is the only scenario we are really interested in anyway since you wouldn't need to work out any probabilities if you had it in your opening hand. Formula depends on M (number of cards thrown in mulligan) and D (number of draws).
I'll get some beer from the shop and do it again when I return.
EDIT: Re: simulation error, you aren't adding the cards you mulligan back into the pool you can draw from in the mulligan phase are you? Number of cards you draw from is always 27 going first or 26 going 2nd. That is the usual cause of errors.
I am envoy from nowhere in nowhere. Nobody and nothing have sent me. And though it is impossible I exist. ©Trimutius
General formula when we assume you DO NOT have the card you want in your hand before the mulligan.
Going first, mulligan M cards
Chance to get it = M/27
Chance to get it after D draws given you didn't get it from the mulligan = (1 - M/27) * D/27 = (27/27 - M/27)/27 * D/27 = (27-M)/27 * D/27
= (27-M)*D / 729
So chance to have it after D draws is those added together
= M/27 + (27-M)*D/729 = 27*M/729 + (27-M)*D/729 = ((27*M) + (27-M)*D)/729
Sanity check: when D=0, result is (27*M)/729 = M/27 i.e. chance to have it after the mulligan
When D=27, result is ((27*M) + (27-M)*27)/729 = (27*M + 27*27 - M*27)/729 = 27*27/729 = 1 i.e. 100% chance to have it after 27 draws.
When M=3, formula is (27*3 + (27-3)*D)/729 = (81 + 24*D)/729. So if D=5, chance is (81+120)/729 = 201/729 ~= 27.57%
When M=2, formula is (27*2 + (27-2)*D)/729 = (54 + 25*D)/729. So if D=5 chance is (54+125)/729 = 179/729 ~= 24.55%
When M=1, formula is (27 + (27-1)*D)/729 = (27 + 26*D)/729. So if D=5 chance is (27+130)/729 = 157/729 ~= 21.54%
When M=0, formula is (0 + 27*D)/729 = D/27 as expected. So if D=5 chance is 5/27 ~= 18.52%
Going second, mulligan M cards
Chance to get it = M/26
Chance to get it after D draws given you didn't get it from the mulligan = (1 - M/26) * D/26 = (26/26 - M/26)/26 * D/26 = (26-M)/26 * D/26
= (26-M)*D / 676
So chance to have it after D draws is those added together
= M/26 + (26-M)*D/676 = 26*M/676 + (26-M)*D/676 = ((26*M) + (26-M)*D)/676
Sanity check: when D=0, result is (26*M)/676 = M/26 i.e. chance to have it after the mulligan
When D=26, result is ((26*M) + (26-M)*26)/676 = (26*M + 26*26 - M*26)/676 = 26*26/676 = 1 i.e. 100% chance to have it after 26 draws.
When M=4, formula is (26*4 + (26-4)*D)/676 = (104 + 22*D)/676 . So if D=5, chance is (104 + 110)/676 = 214/676 ~= 31.66%
When M=3, formula is (26*3 + (26-3)*D)/676 = (78 + 23*D)/676. So if D=5, chance is (78+115)/676 = 193/676 ~= 28.55%
When M=2, formula is (26*2 + (26-2)*D)/676 = (52 + 24*D)/676. So if D=5 chance is (52+120)/676 = 172/676 ~= 25.44%
When M=1, formula is (26 + (26-1)*D)/676 = (26 + 25*D)/676. So if D=5 chance is (26+125)/676 = 151/676 ~= 22.34%
When M=0, formula is (0 + 26*D)/676 = D/26 as expected. So if D=5 chance is 5/26 ~= 19.23%
If you want to factor in the probability that you had it in your hand before the mulligan, you do
p(I had it in opening hand) + (1 - p(I had it in opening hand)) * p(from my formula above)
so going first you use
3/30 + (27/30) * probability from my formula for going first
and if going second you use
4/30 + (26/30) * probability from my formula for going second.
Right, question well and truly answered now ;)
29*28*27)/(30*29*28) via cancellation argument = 27/30.Auto squelch. That's all I'm asking for.
I may do some more maths regarding Prince Keleseth being playable on curve (turn 2 going first, turn 1 going second coining him out), and whether it is a good idea to keep a single copy of Shadowstep or not.
I opened Keleseth on day 1 of KFT (still not got Bloodreaver Gul'dan though so I'm just playing the rogue version).
I'll see how good the beer batteries are at powering my maths ;)