Week 4 - Card Based Probability
Card based probabilities
Counting example:
-
Poker - all players are given 5 cards and must make the best possible card combos they can. The 5 cards are dealt from a standard 52 card deck.
-
How many possible poker hands are there?
-
Use Binomial Coefficient to find the answer
-
2,598,960 combos
-
What would the probability be of getting a pair? (2 of the same value, and any 3 other cards that do not match)
-
Choose 1 of the 13 values of card (13 choose 1)
-
AND then choose 2 of the 4 suits (4 choose 2)
-
(13 1) (4 2)
-
AND Choose three of the remaining 12 values (12 choose 3)
-
AND Choose a suit for each of those (4 choose 1 AND 4 choose 1 and 4 choose 1)(doing it three times allows for any suit to be chosen)
-
(12 3) (4 1)3for the number of possible successes
-
1,098,240 ways or about 42%
-
Could use the binomial distribution to guess the likelihood of another player having a pair
Cards have more information and values than dice
-
Suits, number order etc.
When calculating the probabilities of card-like game data structures, we must also include the extra information in our counting
Video Game Hypothetical (Rewards System)
-
Deck of cards for a reward deck
-
Each card has a reward
-
Duplicate values, but still unique rewards
-
Each time a card is drawn from the reward deck that card is removed forever from it (Non replacement probability)
-
Probability formula to help with non replacement probability
-
Hyper-Geometric Distribution Formula
-
The formula has 4 variables:
-
The population size (N) (Number of cards in a deck for our example)
-
The sample size (n) (How many cards from the rewards deck we draw)
-
The number of possible successes (K)
-
The number of successes we’re looking for (k)
-
P = (K k) (N - K over n-k) over (N n )
Example: Magic the Gathering
-
60 cards in a deck
-
24 are island resource cards (lands)
-
Start with 7 cards in hand
-
Need to draw at least 4 islands by turn 4 (draw 1 card every turn)
-
N is 60
-
n is 11 ( start with 7, draw 4)
-
K is 24
-
k is [4,5,6,7,8,9,10,11]
-
8 probabilities to calculate for k
-
Roughly 73% chance of drawing at least 4 cards by turn 4