Sections


Showing posts with label Proofs and Post Tests. Show all posts
Showing posts with label Proofs and Post Tests. Show all posts

Wednesday, August 19, 2009

Probability: Law of Multiplication


We have covered finding the probability of drawing into specific card, when drawing multiple cards from the top of your deck.  But what if we want to know about the probabilities of drawing multiple cards in a set, from a certain amount of draws from the top of the deck.  To get this probability, we need to use the Law of Multiplication.  The Law of Multiplication looks as follows:


P(A and B) = P(A) x P(B)

However, because the probability of drawing from a system without replacement creates conditional probabilities, the Law of Multiplication will look as follows:

P(A and B) = P(A) x P(B given A)

To put P(B given A) in perspective, lets assume that we have successfully drawn one card from a set of four, from the top card of a sixty-card library, and we want to know the probability of drawing the second card of the set of four from the next draw.  The overall deck size has been depleted by one, and the number of cards from the set of four has been depleted by one as well.  Therefore P(B given A) is 3/59. So the overall probability of drawing two cards from a set of four, in the top two cards of a sixty card library is as follows:


P(A and B) = 4/60 x 3/59 = 0.339%

The Probability Laws of Addition and Multiplication are especially useful in finding Mana Availability Curve, as we need to draw into multiple lands to play cards with converted mana costs higher than one (which is most cards). Remember that in Probability: Law of Subtraction, we can use P prime, to find overall probabilities, so long as we remember to subtract P prime from one at the end.  So lets say we want to know the probability of drawing 2 of 20 lands, in the top 3 draws from a deck of 60 cards.  In order to do this we will have to break down the possible combinations of where we can draw into the first and second cards of the set of twenty.  In the table below, P(A) represents the probability of drawing into the first land, and P(B) represents the probability of drawing into the second land.


 

P(X)/EventFirst PossibilitySecond Possibility
P(A)First DrawSecond Draw
P(B)Second DrawThird draw


Finding P'(A and B) will be the same as finding P'(A) + P'(B)P(A), according to Probability: Law of Addition.  I will show the proof for this as follows:


Given: P(X and Y) = P(X) + P(Y)(1- P(X)), according to Probability: Law of Addition.


Prove: P'(A and B) = P'(A) + P'(B)P(A)

By substituting all instances of P(X) for P'(A), and all instances of P(Y) for P'(B), the given equation looks as follows.

P'(A and B) = P'(A) + P'(B)(1-P'(A))


According to Probability: Law of Subtraction P(A) = 1- P'(A), therefore:


P'(A and B) = P'(A) + P'(B)P(A)

Next we apply the Probability: Law of Multiplication to find P'(A).  We know that we must fail to find the first card of a set of 20, in both the first and second draws, therefore P'(A) = (1-20/60)(1-20/59).  To find P'(B) we must find the probability of failure in the second and third draws.  P'(B) = (1-19/59)(1-19/58).  Because we are dealing with conditional probabilities, we must also take into account the probability of looking for the second card of a set of 20, in the second and third draws.  This probability is represented by two separate occurrences of successfully drawing into 1 of a set of 20 from a deck of 60, (20/60+20/60).  The equation for failing to draw into 2 of 20 lands from a deck of 60 cards, in the top three cards, looks as follows:



P'(A and B)=(1-20/60)(1-20/59)+(1-19/59)(1-19/58)(20/60+20/60)= 74.459%


P(A and B) = 1-P'(A and B) = 25.541%

Obviously, the opening hand consists of 7 cards, not three, and the equations will only get more complex as we begin to look for more and more lands, in more and more draws.  Fortunately, these probabilities can be easily found using a spreadsheet.  To find the above probability, I can type the following on a Google Spread Sheet:



=Minus(1,SUM(HYPGEOMDIST(0,3,20,60),HYPGEOMDIST(1,3,20,60)))

Later on, I will explain in greater detail, what this code means, and how to find other specific probabilities when drawing from a deck, with the HYPGEOMDIST function.  For now, suffice it to say that with this function, I can find the probabilities of drawing into any number of cards in a set, from a deck of a specific size, in any given amount of draws.



Saturday, August 8, 2009

Probability: Law of Addition


When you draw cards from the top of your deck, in hopes of drawing into a specific card, say that Warp World, Haunting Echoes, Akroma, Angle of Wrath, or whatever your devious plans call for, you are essentially sampling without replacement. Your deck does not replenish itself as you draw, unless of coarse you are pulling some wicked synergy. The act of drawing actually influences probabilities of future draws. When you are checking two or more separate events, which are independent of one another, and looking for the same outcome, the overall probability is found through the addition of the probabilities. Total Probability, as this is called, looks as follows:

P(A or B) = P(A) + P(B)

However, when the two or more events are dependent, as in the case with a depleting deck size, the equation looks as follows:

P(A or B) = P(A) + P(B) - P(A and B)

We can rearrange this equation in numerous ways; I have two ways which I like to use. P(A and B) is the same as P(A) x P(B); I will cover the Multiplication Law later on.

P(A or B) = P(A) + P(B) - P(A) x P(B)

P(A or B) = P(A) + [P(B) - P(A) x P(B)]

P(A or B) = P(A) + P(B)(1 - P(A))


I like this arrangement, because it is easy for me to remember that, "If I had found the card in the first draw, I wouldn't be looking for it in the second draw." Before I move onto the third arrangement, I should explain P'(A), P prime of A. If P(A) is the probability of successfully finding the card in the first draw, then P'(A) is the probability if failing to find the card in the first draw. Because all possible outcomes add up to 1, when dealing with probabilities we can observe Probability: Law of Subtraction as follows:

P(A) + P'(A) = 1

P'(A) = 1 - P(A)

P(A) = 1 - P'(A)

In second example, the second probability, P(B), must be multiplied by the probability of failure of the first check, P'(A), because we had to fail to get there. Let's see what happens when we substitute 1-P'(A) for P(A):

P(A or B) = P(A) + P(B) -P(A) x P(B)

P(A or B) = P(A) + P(B) - [(1-P'(A)) x P(B)]


P(A or B) = P(A) + P(B) - [P(B) - P'(A) x P(B)]


P(A or B) = P(A) + [P(B) - P(B)
+ P'(A) x P(B)]

P(A or B) = P(A) + [P'(A) x P(B)]


P(A or B) = P(A) + [(1-P'(B)) x P'(A)]


P(A or B) = P(A) + [P'(A) - P'(B) x P'(A)]


P(A or B) = 1 - P'(A) + P'(A) - (P'(A) x P'(B))


P(A or B) = 1 - (P'(A) x P'(B))


P(A or B) = 1 - (1-P(A))(1-P(B))


What this tells us is that if we find the probabilities of failing to draw into the desired card on both the first and second draw, we can multiply them together to get the probability of failing to draw into the card on both draws, P'(A or B). Take one minus that probability, and we have the probability of drawing at least one of the desired card in the first two draws.

So, say I have 4 copies of the desired card, in a 60 card deck, what are my chances of drawing into that card in my opening hand of 7 cards:

P(A or . . . G) = 1 - (1-4/60)(1-4/59)(1-4/58)(1-4/57)(1-4/56)(1-4/55)(1-4/54) = 39.95%



Wednesday, August 5, 2009

Why we keep decks trimmed.

Here is one of many blogs to follow, in which I will cover some basics in statistics and probability. I will post these in order to explain, piece by piece, the framework of my study, and eventual e-book. To most of us, it is common sense to keep our decks trimmed, because we know intuitively that doing so increases our chances of drawing into the cards we want to play. But without proof, our best guesses are nothing more than just that. Here is the proof, which can be found in the introductory chapter of most any Statistics text book:

IF: P(X) = 1/X

Prove: P(N) > P(N+1)

By substituting all instances of X for N when P(X) = 1/X, we get P(N) = 1/N.

By substituting all instances of X for (N+1) when P(X) =1/X, we get P(N+1) = 1/(N+1)

Let's arbitrarily call N 60, for a typical deck size of 60 cards.

We find that P(N) = P(60) = 1/60 = 0.01666,

and P(N+1) = P(60+1) = 1/(60+1) = 0.01639.

0.01666 > 0.01639, therefore

P(N) > P(N+1).


In otherwords, If you have one copy of a card in your deck, you will have a 1.666% chance of drawing into it from the top card of a 60 card deck, and a 1.639% chance of drawing into it from the top card of a 61 card deck. This might seem like an insignificant difference, but rest assured, as you add more and more cards to your deck, without thinning others out, the difference becomes significant. Later on I will cover finding Probability Without Replacement, which explains what happens to the probabilities of drawing into certain cards, as you deplete your library through the act of drawing. But for now chew on this; if you have 4 copies of a specific card in your deck, you have a 39.950% chance of drawing into at least one of those cards in your opening hand, from a 60 card deck. However if your deck is 70 cards, your chance of drawing into at least 1 of 4, in your opening hand, is reduced to 35.035%.