
Poker Hand Probability Analysis
Explore the concept of independence and conditional probability in poker hands by calculating the probability of getting four-of-a-kind (4k) when the first card dealt is a 6 of Spades (6S). Understand how these events are related and whether they are independent or positively correlated.
Download Presentation

Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.
E N D
Presentation Transcript
Independence Conditional Probability
Consider the probability of getting four-of-a-kind (4k) in a poker hand, when you see that the first card dealt to you is a 6 of Spades (6S) How many ways can you get 4k now? (1) Four 6 s and another card or (2) a 6 and four of another value. (1) Three cards must be the remaining 6 s, and there are 48 choices for the other card, 48 possibilities (2) The other four cards are the same value (not 6) so 12 choices. Total: 60 possibilities. How many ways are there to finish the hand: (514) Pr[4k | 6S] = 60/ (514) This is a conditional probability.
How does this compare to the original probability of four-of-kind? Pr[4k] = 13*48 / (525) = 52*12/((52/5) (514))= 60/ (514) = Pr[4k | 6S] Since the conditional probability of 4k given 6S is the same as the original probability of 4k, we say 4k is independent of 6S. note: (525) = (52/5)*(514) and 13 * 48 = 52*12 We note that Pr[6S] = (514) / (525) = 5/52 What about Pr[6S | 4k] ? If we know we have 4k (four-of-a-kind) then we can get a six of spades if the 4k is all sixes or if the 6S is the single card with 4k of another value. Former case has 48 choices for extra card, second case has 12 choices for 4k value: total of 60 choices. We already saw the number of ways to get 4k is 13*48, so Pr[6S | 4k] = 60/(13*48) = 5/52 = Pr[6S]
We have that Pr[4k | 6S] = Pr[4k] and Pr[6S | 4k] = Pr[6S], so the events 4k and 6S are independent of each other. We just say that they are independent. Another way to look at this. Consider the following: Pr[4k] = 13*48/ (525) Pr[6S] = 5/52 Pr[4k 6S] = 60/ (525) Pr[4k]*Pr[6S] = 13*48/ (525) * 5/52 = 13*4*12*5/52* (525) = 60/ (525) = Pr[4k 6S] So Pr[4k]*Pr[6S] = Pr[4k 6S] Definition: We say two events A and B are independent if Pr[A]*Pr[B] = Pr[A B] Definition: The conditional probability of A given B, Pr[A|B] = Pr[A B] / Pr[B]
We see from the definitions that if two events A and B are independent, then Pr[A|B] = Pr[A] and Pr[B|A] = Pr[B]. Example: suppose 6S6H is the event that we get both the 6 of hearts and the 6 of spades in a five card hand. What is Pr[4k|6S6H]? We know to get four-of-a-kind, they must be sixes, so there are 48 possibilities for the remaining card. To get the 6S6H, we need to get 3 other cards from 50 = (503) , so Pr[4k|6S6H] = 48/(503) > 13*48/ (525) = Pr[4k] How about Pr[6S6H|4k]? So to get the sixes, the 4k must be sixes with 48 ways to get the fifth card. There are 13*48 ways to get 4k, so Pr[6S6H|4k] = 48/ 13*48 = 1/13 > 5/(13*51) = 5*4/(52*51) = (503) / (525) = Pr[6S6H]
So we conclude that the events 4k and 6S6H are not independent! In fact: Pr[6S6H] = (503) / (525) and Pr[4k] = 13*48/ (525) Pr[6S6H 4k] = 48/ (525) > 5*48 /51* (525) = ((503)/(525))(13*48/ (525)) = Pr[6S6H] * Pr[4k] We say 6S6H and 4k are positively correlated events because knowing one is true makes the other more likely to be true. For events A and B we defines A and B to be positively correlated if Pr[A B] > Pr[A]*Pr[B] The opposite is A and B are negatively correlated if Pr[A B] < Pr[A]*Pr[B]
Lets look at Bernoulli trials again. Suppose we flip a fair coin twice. The sample space is {HH, HT, TH, TT}. Consider the following events: Flip 1 is heads (H1) Flip 2 is heads (H2) Flips match (M) Pr[H1] = Pr[H2] = Pr[M] = since each occurs two out of four times. We expect that H1 and H2 are independent since they are physically independent And this is the case: Pr[H1 H2] = Pr[HH] = = Pr[H1]*Pr[H2] What about H1 and M? Although they are related because H1 limits the way to get M. Are they independent? Yes! Pr[H1 M] = Pr[HH] = = Pr[H1]*Pr[M]
What if we do not have a fair coin. The probability heads on a flip is p and the probability of tails is (1-p). The two flips are still physically independent, so we expect H1 and H2 to be independent events. Pr[H1 H2] = Pr[HH] = p2= Pr[H1]*Pr[H2] What about H1 and M? Pr[M] = p2+ (1-p)2 If independent then: Pr[H1 M] = Pr[H1]*Pr[M] Pr[H1 M] = Pr[HH] = p2and Pr[H1]*Pr[M] = p*(p2+ (1-p)2), so p2= p3+ p - 2 p2+ p3 0 = 2p3- 3 p2+ p = p*(2p 1)*(p 1) So p = 0, , or 1. H1 and M are independent only if coin always shows head, never shows heads, or is fair
Test your intuition. Suppose we flip a fair coin 8 times. Consider the events H7+ : we get seven or more heads and H6+, we get six or more heads. Pr[H7+] = ((87) + (88)) / 28= (8 + 1)/ 28= 9/256 = 0.035 What do you think Pr[H7+ | H6+] would be roughly? About 1/2? About 1/3? About 1/4? About 1/10? Pr[H6+] = ((86) + (87) + (88)) / 28= (28 + 8 + 1)/ 28= 37/ 256 H6+ H7+ = H7+, so Pr[H7+ | H6+] = Pr[H6+ H7+] / Pr[H6+] = (9/256)/(37/ 256) = 9/37 = 0.243
Good examples in the text: 10.14, 10.15, 10.16, 10.19, 10.20, 10.22 Some properties of conditional probabilities. Definition: Pr[A|B] = Pr[A B] / Pr[B] and Pr[B|A] = Pr[A B] / Pr[A] So Pr[A B] = Pr[B]*Pr[A|B] The chain rule extends this for events A1, A2, , Ak Pr[A1 A2 A3 A4 Ak] = Pr[A1]*Pr[A2 | A1]*Pr[A3 | A1 A2]*Pr[A4 | A1 A2 A3]* * Pr[Ak | A1 A2 Ak-1] Pr[Heart flush in poker] = (13/52)*(12/51)*(11/50)*(10/49)*(9/48)
Law of total probability for events A and B: Pr[A] = Pr[A|B]*Pr[B] + Pr[A|~B]*Pr[~B] Proof: Pr[A] = Pr[(A B) (A ~B)] = Pr[A B] + Pr[A ~B] = Pr[A|B]*Pr[B] + Pr[A|~B]*Pr[~B] Example: Moderna (M)vaccine is 96% effective (E). Pfizer (P) is 90% effective (E). For one area, Moderna has supplied 60% of the vaccines, Pfizer the rest (40%) What is the probability that your vaccine (not knowing which it is) is effective? Pr[E] = Pr[E|M]*Pr[M] + Pr[E|P]*Pr[P] = (96/100)*(6/10) + (90/100)*(4/10) = 936/1000 = 93.6% We could extend this to J&J if it was in the mix by summing the three terms Pr[E|M]*Pr[M] + Pr[E|P]*Pr[P] + Pr[E|J&J]*Pr[J&J]
Bayes Theorem: For two events A and B: Pr[A|B] = Pr[B|A] * Pr[A] / Pr[B] Proof: Definition: Pr[A|B] = Pr[A B] / Pr[B] and Pr[B|A] = Pr[A B] / Pr[A] So Pr[A|B] *Pr[B] = Pr[A B] = Pr[B|A] * Pr[A] Pr[A|B] = Pr[B|A] * Pr[A] / Pr[B]
Example: Suppose a quick Covid test is 95% sensitive, meaning if you have Covid, the test shows positive 95% of the time and false negative 5%. The test is also 90% specific, meaning if you are negative, it will show negative 90% of the time and will show false positive 10%. TP is the event you test positive In your community, the rate of Covid is 5%. You have a positive quick Covid test. C is the event you have Covid. If you test positive, what is the probability that you have Covid? Using total probability: Pr[TP] = Pr[TP|C] Pr[C] + Pr[TP|~C] Pr[~C] Pr[C|TP] = Pr[TP|C]Pr[C]/Pr[TP] = Pr[TP|C]Pr[C]/(Pr[TP|C] Pr[C] + Pr[TP|~C] Pr[~C] ) = .95*.05/(.95*.05 + .10*.95) = .0475/ (.0475+ .095) = .33
Example: A better Covid test is 95% sensitive, meaning if you have Covid, the test shows positive 95% of the time and false negative 5%. The test is also 99% specific, meaning if you are negative, it will show negative 99% of the time and will show false positive 1%. In your community, the rate of Covid is 5%. You have the better Covid test. Pr[C|TP] = Pr[TP|C]Pr[C]/(Pr[TP|C] Pr[C] + Pr[TP|~C] Pr[~C] ) = .95*.05/(.95*.05 + .01*.95) = .0475/ (.0475+ .0095) = 0.83 When the overall rate is low, which is the more important aspect of the test, the sensitivity (accurate positive) or the specificity (accurate negative)?
More good examples from text: 10.23, 10.24, 10.25, 10.27, 10.28