It is actually hard if you try to find the exact number.
No, it's still 8th grade maths.
Edit: If you want to figure out the odds that you play specific card draw cards and the odds of Acolyte drawing a specific amount of cards, it does get harder. I suppose you also want to include the chances of getting Raza or card draw from Kabal Courier. I'll add my calculations later.
I already gave the formula for a variable number of draws and variable number of cards thrown back in the mulligan in post #39 of this thread. When I say "variable number of draws" I mean any card draw counts as a draw (so drawing from acolyte, loot hoarder, etc.).
You just plug in your values for D and M in the equation and you get the answer (post 39 assumes you don't have it in the hand before the mulligan but I also explain how to adjust it for that).
Calculations involving getting Raza from Kabal Courier and variable number of cards drawn from Cleric, Acolyte are going to get really complicated very quickly. Just considering the number of cards drawn from the deck is much easier (but the algebra took me a while). When you draw a card by another means you just add 1 to D and calculate the answer again.
I can work out the odds of getting Raza from a Courier if you want though (this needs a bit of thought since it counts as a class card for all 3 of the Kabal classes and Mage and Warlock have 1 less class card than Priest in standard [Ice Lance/Power Overwhelming removed from standard]). EDIT: You can also get a Kabal Courier off Kabal Courier -> infinite loop -> this can be accounted for also [well, kind of, best option is to pretend this cannot happen, it takes multiple Couriers played/probably over multiple turns].
I don't see how you can model the chance of an acolyte or cleric drawing a specific number of cards either (damage can be variable amounts, can be removed without taking damage, priests can heal these minions as often as they like, the health can be buffed, etc. etc.).
EDIT2: You can also get a copy of your opponent's Raza in the mirror match via any of the priest stealing card mechanisms/Curious Glimmeroot. You can also play against a rogue and steal cards they stole from you/discovered from your class.
Calculations involving getting Raza from Kabal Courier and variable number of cards drawn from Cleric, Acolyte are going to get really complicated very quickly. Just considering the number of cards drawn from the deck is much easier (but the algebra took me a while). When you draw a card by another means you just add 1 to D and calculate the answer again.
It's basically a probability tree though (which I admit is not the most elegant approach). It's going to be long but not difficult.
I can work out the odds of getting Raza from a Courier if you want though (this needs a bit of thought since it counts as a class card for all 3 of the Kabal classes and Mage and Warlock have 1 less class card than Priest in standard [Ice Lance/Power Overwhelming removed from standard]). EDIT: You can also get a Kabal Courier off Kabal Courier -> infinite loop -> this can be accounted for also, but makes it more complicated still.
I didn't consider the amount of class cards. I guess it doesn't affect the calculations too much, however - just have to calculate the odds of Raza being offered as a card of each class individually.
The infinite loop would be interesting one to calculate, but you can only pick a Courier from a Courier once before turn 5.
I don't see how you can model the chance of an acolyte or cleric drawing a specific number of cards either (damage can be variable amounts, can be removed without taking damage, priests can heal these minions as often as they like, the health can be buffed, etc. etc.).
If we want to get fancy, we could take averages against each opponents' decks and take the play rates from vS but I'd just use an average, like 1,5 for Acolyte and 1 for Cleric, unless you play a card on turn 2 in which case you can't heal it, unless that card is a PW:S which keeps it alive.
EDIT2: You can also get a copy of your opponent's Raza in the mirror match via any of the priest stealing card mechanisms/Curious Glimmeroot. You can also play against a rogue and steal cards they stole from you/discovered from your class.
There wasn't anything like that on the example list we're using, right?
It's going to be a lot more difficult than you imagine. Each time the probability tree branches you have to do twice as much work [3 times as much if the tree splits in 3, etc.] from then on.
My calculations in Mungo's Maths Thread about number of minions drawn from a Barnes deck got long and complicated fast (also error-prone).
Anything as complicated as accounting for variable card draw would probably be best handled via simulation. You also need to take into account the probability of actually having a cleric/loot hoarder/acolyte playable each turn (more did I draw it by that turn calculations). Keeping card draw cards in the mulligan should be accounted for also.
Using the average number of cards drawn will not work either because you don't know how many turns it will take to draw the cards in the case of cleric/acolyte/hoarder.
Realised a much easier way to think about this question.
I'll assume you don't have the card in your opening hand pre-mulligan.
When you mulligan M cards you have a chance to get the card equal to M/27 if you go first or M/26 if you go second. Let's call this the base chance.
Then the chance to have it after the mulligan (0 draws from deck) is the base chance.
The chance to have it after D draws increases linearly (can you see why?) from the base chance for each card you draw until it reaches 1 (i.e. 100% chance) after you draw your entire deck.
That's just linear interpolation between the base chance and 1 with 27 or 26 steps depending upon whether you went first or second.
Which agrees with the results from another poster (in post #30).
Again, this case (where you can have it in your opening hand) is again just a linear interpolation between the base chance when D = 0 and when D = 27 or 26 (when going first or second) so you can use the difference between two values to find the fixed increase in the probability for each draw you make.
If you want to consider the case where you may have it in your opening hand, the probability is
Going first:
p(I have card after D draws or in opening hand) = 1/10 + 9/10 * (M/27 + (1 - M/27) * D/27)
Right, I've convinced myself that is NOT a valid argument unless you ALWAYS mulligan M cards.
(So it would work for the OP's original question, which says everything is thrown back if the card is not in your starting hand, with M=3 in this case [going first]).
Reason for this is you need to consider how often you mulligan M cards as well, otherwise if you draw a probability tree the outcomes sum to more than 1 unless you do this. [Reason: p(Mulligan M and draw card by turn D) + p(Mulligan M and do not draw card by turn D) = 1 for each individual M]
The formula should involve all possible mulligan scenarios and be weighted according to how often you mulligan a certain number of cards. [EDIT: Which is why it works if you always mulligan a set amount, because the weight for this branch is 1, and the weight for the other branches is 0].
However, the formula where I assume you do not have the card in the opening hand is correct, it's just the combination of the two that is incorrect.
Can anyone see a way around this issue, other than estimating how often you mulligan a certain number of cards (I don't like that at all)?
In short, only use the formula if you always mulligan everything (and use M=3 when going first, M=4 going second), otherwise only start considering the probabilities when you see you don't have it in your opening hand and then use the formula which assumes you didn't have it, i.e.
when going first and mulligan M cards
p(I have card after D draws) = M/27 + (1 - M/27) * D/27
when going second and mulligan M cards
p(I have card after D draws) = M/26 + (1 - M/26) * D/26
Those are correct (once you saw you didn't have it in your opening hand).
EDIT2: Now I'm less convinced the argument is invalid, when you choose to make the mulligan you effectively do weight the other branches to 0... can't do maths without beer...
EDIT3: No, it is definitely not correct. You should be able to add up the probabilities from the leaf nodes of the tree to find the probability that any event from the set of leaf nodes occurred, and this should be 1. But when D = 27 going first (i.e. all cards drawn regardless of cards mulliganned) the probabilities add up to 1/10 + 9/10 + 9/10 + 9/10 + 9/10 > 1.
So you only use the mulligan formula if you do not have the card in your opening hand and you must use the specific formula for whichever mulligan decision you took. Do not use the formula taking into account the chance of having the card in your opening hand if you want to adjust for however many cards you mulligan. It does work if you always mulligan all cards though (i.e. M=3 going first, M=4 going second).
EDIT4: Lol, changed my mind again ;) I'm incorrect thinking about the second formula as part of a probability tree diagram.
What the second form of the formula shows is the probability of having the specific card given that you mulligan M cards. Given that you mulligan that many cards, the probability that you mulliganned a different number of cards is indeed 0.
I already gave the formula for a variable number of draws and variable number of cards thrown back in the mulligan in post #39 of this thread. When I say "variable number of draws" I mean any card draw counts as a draw (so drawing from acolyte, loot hoarder, etc.).
You just plug in your values for D and M in the equation and you get the answer (post 39 assumes you don't have it in the hand before the mulligan but I also explain how to adjust it for that).
Calculations involving getting Raza from Kabal Courier and variable number of cards drawn from Cleric, Acolyte are going to get really complicated very quickly. Just considering the number of cards drawn from the deck is much easier (but the algebra took me a while). When you draw a card by another means you just add 1 to D and calculate the answer again.
I can work out the odds of getting Raza from a Courier if you want though (this needs a bit of thought since it counts as a class card for all 3 of the Kabal classes and Mage and Warlock have 1 less class card than Priest in standard [Ice Lance/Power Overwhelming removed from standard]). EDIT: You can also get a Kabal Courier off Kabal Courier -> infinite loop -> this can be accounted for also [well, kind of, best option is to pretend this cannot happen, it takes multiple Couriers played/probably over multiple turns].
I don't see how you can model the chance of an acolyte or cleric drawing a specific number of cards either (damage can be variable amounts, can be removed without taking damage, priests can heal these minions as often as they like, the health can be buffed, etc. etc.).
EDIT2: You can also get a copy of your opponent's Raza in the mirror match via any of the priest stealing card mechanisms/Curious Glimmeroot. You can also play against a rogue and steal cards they stole from you/discovered from your class.
It's going to be a lot more difficult than you imagine. Each time the probability tree branches you have to do twice as much work [3 times as much if the tree splits in 3, etc.] from then on.
My calculations in Mungo's Maths Thread about number of minions drawn from a Barnes deck got long and complicated fast (also error-prone).
Anything as complicated as accounting for variable card draw would probably be best handled via simulation. You also need to take into account the probability of actually having a cleric/loot hoarder/acolyte playable each turn (more did I draw it by that turn calculations). Keeping card draw cards in the mulligan should be accounted for also.
Using the average number of cards drawn will not work either because you don't know how many turns it will take to draw the cards in the case of cleric/acolyte/hoarder.
Realised a much easier way to think about this question.
I'll assume you don't have the card in your opening hand pre-mulligan.
When you mulligan M cards you have a chance to get the card equal to M/27 if you go first or M/26 if you go second. Let's call this the base chance.
Then the chance to have it after the mulligan (0 draws from deck) is the base chance.
The chance to have it after D draws increases linearly (can you see why?) from the base chance for each card you draw until it reaches 1 (i.e. 100% chance) after you draw your entire deck.
That's just linear interpolation between the base chance and 1 with 27 or 26 steps depending upon whether you went first or second.
The formula for linear interpolation is
Lerp(start, end, amount) = start + (end - start) * amount
where amount goes from 0 to 1 (how far between start and end you are)
When going first, each draw is 1/27th of the total amount. When going second, it's 1/26th of the total amount.
So rewriting this in terms of going first or second, we see
p(I have card after D draws) = Lerp(M/27, 1, D/27) if you go first
p(I have card after D draws) = Lerp(M/26, 1, D/26) if you go second
i.e.
when going first and mulligan M cards
p(I have card after D draws) = M/27 + (1 - M/27) * D/27
when going second and mulligan M cards
p(I have card after D draws) = M/26 + (1 - M/26) * D/26
You can show that this gives the same formula (just rearranged a bit) from my post #39 if you do some algebra.
If you want to consider the case where you may have it in your opening hand, the probability is
Going first:
p(I have card after D draws or in opening hand) = 1/10 + 9/10 * (M/27 + (1 - M/27) * D/27)
Going second:
p(I have card after D draws or in opening hand) = 4/30 + 26/30 * (M/26 + (1 - M/26) * D/26)
Plugging some numbers into this equation
p(I have card after 5 draws or in opening hand when I mulligan everything, going first)
= 1/10 + 9/10 * (3/27+ (1 - 3/27) * 5/27) = 34.81%
p(I have card after 5 draws or in opening hand when I mulligan everything, going second)
= 4/30 + 26/30 * (4/26+ (1 - 4/26) * 5/26) = 40.77%
Which agrees with the results from another poster (in post #30).
Again, this case (where you can have it in your opening hand) is again just a linear interpolation between the base chance when D = 0 and when D = 27 or 26 (when going first or second) so you can use the difference between two values to find the fixed increase in the probability for each draw you make.
So to conclude:
The chances of drawing raza turn 5 are a perfect 5/7
I was born at an incredibly young age
Right, I've convinced myself that is NOT a valid argument unless you ALWAYS mulligan M cards.
(So it would work for the OP's original question, which says everything is thrown back if the card is not in your starting hand, with M=3 in this case [going first]).
Reason for this is you need to consider how often you mulligan M cards as well, otherwise if you draw a probability tree the outcomes sum to more than 1 unless you do this. [Reason: p(Mulligan M and draw card by turn D) + p(Mulligan M and do not draw card by turn D) = 1 for each individual M]
The formula should involve all possible mulligan scenarios and be weighted according to how often you mulligan a certain number of cards. [EDIT: Which is why it works if you always mulligan a set amount, because the weight for this branch is 1, and the weight for the other branches is 0].
However, the formula where I assume you do not have the card in the opening hand is correct, it's just the combination of the two that is incorrect.
Can anyone see a way around this issue, other than estimating how often you mulligan a certain number of cards (I don't like that at all)?
In short, only use the formula if you always mulligan everything (and use M=3 when going first, M=4 going second), otherwise only start considering the probabilities when you see you don't have it in your opening hand and then use the formula which assumes you didn't have it, i.e.
when going first and mulligan M cards
p(I have card after D draws) = M/27 + (1 - M/27) * D/27
when going second and mulligan M cards
p(I have card after D draws) = M/26 + (1 - M/26) * D/26
Those are correct (once you saw you didn't have it in your opening hand).
EDIT2: Now I'm less convinced the argument is invalid, when you choose to make the mulligan you effectively do weight the other branches to 0... can't do maths without beer...
EDIT3: No, it is definitely not correct. You should be able to add up the probabilities from the leaf nodes of the tree to find the probability that any event from the set of leaf nodes occurred, and this should be 1. But when D = 27 going first (i.e. all cards drawn regardless of cards mulliganned) the probabilities add up to 1/10 + 9/10 + 9/10 + 9/10 + 9/10 > 1.
So you only use the mulligan formula if you do not have the card in your opening hand and you must use the specific formula for whichever mulligan decision you took. Do not use the formula taking into account the chance of having the card in your opening hand if you want to adjust for however many cards you mulligan. It does work if you always mulligan all cards though (i.e. M=3 going first, M=4 going second).
EDIT4: Lol, changed my mind again ;) I'm incorrect thinking about the second formula as part of a probability tree diagram.
What the second form of the formula shows is the probability of having the specific card given that you mulligan M cards. Given that you mulligan that many cards, the probability that you mulliganned a different number of cards is indeed 0.
Thinking about probability can be confusing :/