Stat 35b: Introduction to Probability with Applications to Poker

Slides:



Advertisements
Similar presentations
Stat 35b: Introduction to Probability with Applications to Poker Outline for the day: 1.Zelda, continued. 2.Difficult homework 3 problem. 3.WSOP 2013 hand.
Advertisements

Stat 35b: Introduction to Probability with Applications to Poker Outline for the day: 1.Savage/Tyler, Kaplan/Gazes 2.P(flop a full house) 3.Bernoulli random.
Stat 35b: Introduction to Probability with Applications to Poker Outline for the day: 1.Midterms. 2.Hellmuth/Gold. 3.Poisson. 4.Continuous distributions.
Stat 35b: Introduction to Probability with Applications to Poker Outline for the day: 1.Ly vs Negreanu. 2.Flush draws and straight draws 3.Project B teams.
Stat 35b: Introduction to Probability with Applications to Poker Outline for the day: 1.Straight draws. 2.HW2 clarification. 3.Greenstein vs. Farha AA.
Stat 35b: Introduction to Probability with Applications to Poker Outline for the day: 1.Hand in hw4. 2.Review list 3.Tournament 4.Sample problems * Final.
Stat 35b: Introduction to Probability with Applications to Poker Outline for the day: 0. Collect hw2, return hw1, give out hw3. 1.Project A competition.
Stat 35b: Introduction to Probability with Applications to Poker Outline for the day: 1.Midterm. 2.Review of Bernoulli and binomial random variables. 3.Geometric.
Stat 35b: Introduction to Probability with Applications to Poker Outline for the day: 1.E(cards til 2 nd king). 2.Negative binomial. 3.Rainbow flops examples,
Stat 35: Introduction to Probability with Applications to Poker Outline for the day: 1.Addiction 2.Syllabus, etc. 3. Wasicka/Gold/Binger Example 4.Meaning.
Stat 35b: Introduction to Probability with Applications to Poker Outline for the day: 1.Collect Hw4. 2.Review list. 3.Answers to hw4. 4.Project B tournament.
Stat 35b: Introduction to Probability with Applications to Poker Outline for the day: 1.Hand in hw3. 2.Review of midterm. 3.Project B functions and example.
Stat 35b: Introduction to Probability with Applications to Poker Outline for the day, Tue 3/13/12: 1.Collect Hw WSOP main event. 3.Review list.
Stat 35b: Introduction to Probability with Applications to Poker Outline for the day: 1.hw, terms, etc. 2.WSOP example 3. permutations, and combinations.
Outline for the day: 1.Discuss handout / get new handout. 2.Teams 3.Example projects 4.Expected value 5.Pot odds calculations 6.Hansen / Negreanu 7.P(4.
Stat 35b: Introduction to Probability with Applications to Poker Outline for the day: 1.Addiction 2.Syllabus, etc. 3. Wasicka/Gold/Binger Example 4.Meaning.
Stat 35b: Introduction to Probability with Applications to Poker Outline for the day: 1.HW3 2.Project B teams 3.Gold vs. Helmuth 4.Farha vs. Gold 5.Flush.
Stat 35b: Introduction to Probability with Applications to Poker Outline for the day: 1.Deal-making and expected value 2.Odds ratios, revisited 3.Variance.
Stat 35b: Introduction to Probability with Applications to Poker Poker Code competition: all-in or fold.   u 
Stat 35b: Introduction to Probability with Applications to Poker Outline for the day: 1. Review list 2.Bayes’ Rule example 3.CLT example 4.Other examples.
Stat 35b: Introduction to Probability with Applications to Poker Outline for the day: 1.Project B teams 2.Project B example 3.Gold vs Farha 4.Bayes Rule.
Stat 35b: Introduction to Probability with Applications to Poker Outline for the day, Tues 2/28/12: 1.Midterms back. 2.Review of midterm. 3.Poisson distribution,
Stat 35b: Introduction to Probability with Applications to Poker Outline for the day: 1.Expected value and pot odds, continued 2.Violette/Elezra example.
Expected value (µ) = ∑ y P(y) Sample mean (X) = ∑X i / n Sample standard deviation = √[∑(X i - X) 2 / (n-1)] iid: independent and identically distributed.
Stat 35b: Introduction to Probability with Applications to Poker Outline for the day: 1.Project B example, again 2.Booth vs. Ivey 3.Bayes Rule examples.
Stat 35b: Introduction to Probability with Applications to Poker Outline for the day: 1.Odds ratios revisited. 2.Gold/Hellmuth. 3.Deal making. 4.Variance.
Stat 35b: Introduction to Probability with Applications to Poker Outline for the day: 1.Hw, terms, etc. 2.Ly vs. Negreanu (flush draw) example 3. Permutations.
Stat 35b: Introduction to Probability with Applications to Poker Outline for the day: 1.Hand in hw1! Get hw2. 2.Combos, permutations, and A  vs 2  after.
Stat 35b: Introduction to Probability with Applications to Poker Outline for the day: 1.Tournaments 2.Review list 3.Random walk and other examples 4.Evaluations.
1)Hand in HW. 2)No class Tuesday (Veteran’s Day) 3)Midterm Thursday (1 page, double-sided, of notes allowed) 4)Review List 5)Review of Discrete variables.
Stat 35b: Introduction to Probability with Applications to Poker Outline for the day: 1.HW4 notes. 2.Law of Large Numbers (LLN). 3.Central Limit Theorem.
Outline: 1) Odds ratios, continued. 2) Expected value revisited, Harrington’s strategy 3) Pot odds 4) Examples.
Stat 35b: Introduction to Probability with Applications to Poker Outline for the day: 1. Combos, permutations, and A  vs 2  after first ace 2.Conditional.
Stat 35b: Introduction to Probability with Applications to Poker Outline for the day: 1.Expected value. 2.Heads up with AA. 3.Heads up with Gus vs.
Stat 35b: Introduction to Probability with Applications to Poker Outline for the day: 1.Review List 2.Review of Discrete variables 3.Nguyen / Szenkuti.
Stat 35b: Introduction to Probability with Applications to Poker Outline for the day: 1.Hw, terms, etc. 2.Ly vs. Negreanu (flush draw) example 3. Permutations.
Stat 35b: Introduction to Probability with Applications to Poker Outline for the day: 1.Odds ratio example again. 2.Random variables. 3.cdf, pmf, and density,
Stat 35b: Introduction to Probability with Applications to Poker
Stat 35b: Introduction to Probability with Applications to Poker
Stat 35b: Introduction to Probability with Applications to Poker
Probabilities What is the probability that among 23 people (this class) there will be a shared birthday?
Stat 35b: Introduction to Probability with Applications to Poker
Stat 35b: Introduction to Probability with Applications to Poker
Stat 35b: Introduction to Probability with Applications to Poker
Stat 35b: Introduction to Probability with Applications to Poker
Stat 35b: Introduction to Probability with Applications to Poker
Stat 35b: Introduction to Probability with Applications to Poker
Stat 35b: Introduction to Probability with Applications to Poker
Stat 35b: Introduction to Probability with Applications to Poker
Stat 35b: Introduction to Probability with Applications to Poker
Stat 35b: Introduction to Probability with Applications to Poker
Stat 35b: Introduction to Probability with Applications to Poker
Stat 35b: Introduction to Probability with Applications to Poker
Stat 35b: Introduction to Probability with Applications to Poker
Stat 35b: Introduction to Probability with Applications to Poker
Stat 35b: Introduction to Probability with Applications to Poker
Stat 35b: Introduction to Probability with Applications to Poker
Stat 35b: Introduction to Probability with Applications to Poker
Stat 35b: Introduction to Probability with Applications to Poker
Stat 35: Introduction to Probability with Applications to Poker
Stat 35b: Introduction to Probability with Applications to Poker
Stat 35b: Introduction to Probability with Applications to Poker
Stat 35b: Introduction to Probability with Applications to Poker
Stat 35b: Introduction to Probability with Applications to Poker
Stat 35b: Introduction to Probability with Applications to Poker
Stat 35b: Introduction to Probability with Applications to Poker
Stat 35b: Introduction to Probability with Applications to Poker
Stat 35b: Introduction to Probability with Applications to Poker
Stat 35b: Introduction to Probability with Applications to Poker
Stat 35b: Introduction to Probability with Applications to Poker
Presentation transcript:

Stat 35b: Introduction to Probability with Applications to Poker Outline for the day: Luck and skill in poker. Odds ratios, revisited, and Gold vs. Hellmuth on HSP. Variance and SD. Bernoulli random variables Binomial Geometric “Unbeatable” strategy. More sample code.   u    u 

Reminder: project A is due by email by Wed, Feb 8, 8pm. You may email me for your teammate’s email address. Hw3 is due Thur Mar 1, 12:30pm. 4.7, 4.8, 4.12, 4.16, 5.6, 6.2. Also, read chapter 5 this week. Luck and skill in poker, p71-79.   u    u 

2. Odds ratios, revisited: Odds ratio of A = P(A)/P(Ac) Odds against A = Odds ratio of Ac = P(Ac)/P(A). An advantage of probability over odds ratios is the multiplication rule: P(A & B) = P(A) x P(B|A), but you can’t multiply odds ratios. Example: Gold vs. Hellmuth on High Stakes Poker….

Gold: A K. Hellmuth: A K. Farha: 8 7. Flop: 4 7 K. Given these 3 hands and the flop, what is P(Hellmuth makes a flush)? 43 cards left: 9 s, 34 non-s. Of choose(43, 2) = 903 eq. likely turn/river combos, choose(9,2) = 36 have both s, and 9 *34 = 306 have exactly 1 . 342/903 = 37.9%. So, P(Hellmuth fails to make a flush) = 100% - 37.9% = 62.1%.

Moral: you can’t multiply odds ratios! Gold: A K. Hellmuth: A K. Farha: 8 7. Flop: 4 7 K. P(Hellmuth fails to make a flush) = 100% - 37.9% = 62.1%. Alt.: Given these 3 hands and the flop, P(neither turn nor river is a ) = P(turn is non- AND river is non-) = P(turn is non-) * P(river is non- | turn is non-) [P(A&B) = P(A)P(B|A)] = 34/43 * 33/42 = 62.1%. Note that we can multiply these probabilities: 34/43 * 33/42 = 62.1%. What are the odds against Hellmuth failing to make a flush? 37.9% ÷ 62.1% = 0.61 : 1. Odds against non- on turn = 0.26 :1. Odds against non- on river | non- on turn : 0.27 : 1. 0.26 * 0.27 = 0.07. Nowhere near the right answer. Moral: you can’t multiply odds ratios!

3. Variance and SD. Expected Value: E(X) = µ = ∑k P(X=k). Variance: V(X) = s2 = E[(X- µ)2]. Turns out this = E(X2) - µ2. Standard deviation = s = √ V(X). Indicates how far an observation would typically deviate from µ. Examples: Game 1. Say X = $4 if red card, X = $-5 if black. E(X) = ($4)(0.5) + ($-5)(0.5) = -$0.50. E(X2) = ($42)(0.5) + ($-52)(0.5) = ($16)(0.5) + ($25)(0.5) = $20.5. So s2 = E(X2) - µ2 = $20.5 - $-0.502 = $20.25. s = $4.50. Game 2. Say X = $1 if red card, X = $-2 if black. E(X) = ($1)(0.5) + ($-2)(0.5) = -$0.50. E(X2) = ($12)(0.5) + ($-22)(0.5) = ($1)(0.5) + ($4)(0.5) = $2.50. So s2 = E(X2) - µ2 = $2.50 - $-0.502 = $2.25. s = $1.50.

4. Bernoulli Random Variables. If X = 1 with probability p, and X = 0 otherwise, then X = Bernoulli (p). Probability mass function (pmf): P(X = 1) = p P(X = 0) = q, where p+q = 100%. If X is Bernoulli (p), then µ = E(X) = p, and s = √(pq). For example, suppose X = 1 if you have a pocket pair next hand; X = 0 if not. p = 5.88%. So, q = 94.12%. [Two ways to figure out p: (a) Out of choose(52,2) combinations for your two cards, 13 * choose(4,2) are pairs. 13 * choose(4,2) / choose(52,2) = 5.88%. (b) Imagine ordering your 2 cards. No matter what your 1st card is, there are 51 equally likely choices for your 2nd card, and 3 of them give you a pocket pair. 3/51 = 5.88%.] µ = E(X) = .0588. SD = s = √(.0588 * 0.9412) = 0.235.

5. Binomial Random Variables. Suppose now X = # of times something with prob. p occurs, out of n independent trials Then X = Binomial (n.p). e.g. the number of pocket pairs, out of 10 hands. Now X could = 0, 1, 2, 3, …, or n. pmf: P(X = k) = choose(n, k) * pk qn - k. e.g. say n=10, k=3: P(X = 3) = choose(10,3) * p3 q7 . Why? Could have 1 1 1 0 0 0 0 0 0 0, or 1 0 1 1 0 0 0 0 0 0, etc. choose(10, 3) choices of places to put the 1’s, and for each the prob. is p3 q7 . Key idea: X = Y1 + Y2 + … + Yn , where the Yi are independent and Bernoulli (p). If X is Bernoulli (p), then µ = p, and s = √(pq). If X is Binomial (n,p), then µ = np, and s = √(npq).

5. Binomial Random Variables, continued. Suppose X = the number of pocket pairs you get in the next 100 hands. What’s P(X = 4)? What’s E(X)? s? X = Binomial (100, 5.88%). P(X = k) = choose(n, k) * pk qn - k. So, P(X = 4) = choose(100, 4) * 0.0588 4 * 0.9412 96 = 13.9%, or 1 in 7.2. E(X) = np = 100 * 0.0588 = 5.88. s = √(100 * 0.0588 * 0.9412) = 2.35. So, out of 100 hands, you’d typically get about 5.88 pocket pairs, +/- around 2.35.

6. Geometric Random Variables. Suppose now X = # of trials until the first occurrence. (Again, each trial is independent, and each time the probability of an occurrence is p.) Then X = Geometric (p). e.g. the number of hands til you get your next pocket pair. [Including the hand where you get the pocket pair. If you get it right away, then X = 1.] Now X could be 1, 2, 3, …, up to ∞. pmf: P(X = k) = p1 qk - 1. e.g. say k=5: P(X = 5) = p1 q 4. Why? Must be 0 0 0 0 1. Prob. = q * q * q * q * p. If X is Geometric (p), then µ = 1/p, and s = (√q) ÷ p. e.g. Suppose X = the number of hands til your next pocket pair. P(X = 12)? E(X)? s? X = Geometric (5.88%). P(X = 12) = p1 q11 = 0.0588 * 0.9412 ^ 11 = 3.02%. E(X) = 1/p = 17.0. s = sqrt(0.9412) / 0.0588 = 16.5. So, you’d typically expect it to take 17 hands til your next pair, +/- around 16.5 hands.

7) “Unbeatable Texas Holdem Strategy” http://www.freepokerstrategy.com : all in with AK-AT or any pair. P(getting such a hand) = 4 x [16/1326] + 13 x [6/1326] = 4 x 1.2% + 13 x 0.45% = 10.7%. Say you’re dealt 100 hands. Pay ~11 blinds = $55. Expect 10.7 (~ 11) such good hands. Say you’re called by 88-AA, and AK, for $100 on avg. P(player 1 has one of these) = 7 x 0.45% + 1.2% = 4.4%. P(of 8 opponents, someone has one of these) ~ 1 - (95.6%)8 = 30%. So, you win pre-flop 70% of the time. (Say $10 on avg.) = 11 x 70% x $10 = $77 profit. Other 30%, you’re on avg about a 65-35 underdog, so you win 11 x 30% x 35% x $100 = $115.50 lose 11 x 30% x 65% x $100 = $214.50. Total: exp. to win $77 + $115.50 - $55 - $214.50 = -$77/ 100 hands.

if((crds1[1,1] == crds1[2,1]) || ((crds1[1,1] > 13.5) && 8. More example code for project A unbeatable1 = function(numattable1, crds1, board1, round1, currentbet, mychips1, pot1, roundbets, blinds1, chips1, ind1, dealer1, tablesleft){ ## any pair, or AT-AK, a1 = 0 if((crds1[1,1] == crds1[2,1]) || ((crds1[1,1] > 13.5) && (crds1[2,1]>9.5))) a1 = mychips1 a1 } ## end of unbeatable

timemachine = function(numattable1, crds1, board1, round1, currentbet, mychips1, pot1, roundbets, blinds1, chips1, ind1, dealer1, tablesleft){ ## any pair 7 or higher ## AK, AQ ## AJ if nobody's all in yet. ## if less than 3 times bb & one card is Ten or higher, then 75% a1 = 0 x = runif(1) if((crds1[1,1] == crds1[2,1]) && (crds1[1,1] > 6.5)) a1 = mychips1 if((crds1[1,1] == 14) && (crds1[2,1] > 11.5)) a1 = mychips1 if((crds1[1,1] == 14) && (crds1[2,1] == 11) && (currentbet <= blinds1)) a1 = mychips1 if((mychips1 < 3*blinds1) && (crds1[1,1] >= 10) && (x<.75)) a1 = mychips1 a1 } ## end of timemachine

zebra = function(numattable1, crds1, board1, round1, currentbet, mychips1, pot1,roundbets, blinds1, chips1, ind1, dealer1, tablesleft){ ## if pair of 10s or higher, all in for sure, no matter what. If AK or AQ, all in with probability 75%. ## if pair of 7s or higher and there are 6 or fewer players at your table (including you), then all in. ## if your chip count is less than twice the big blind, go all in with any cards. ## if nobody's raised yet ... and there are 3 or fewer players left behind you, go all in with any pair or ace. ## ... and there's only 1 or 2 players behind you, then go all in with any cards. a1 = 0 x = runif(1) ## x is a random number between 0 and 1. y = max(roundbets[,1]) ## y is the maximum bet so far. big1 = dealer1 + 2 if(big1 > numattable1) big1 = big1 - numattable1 z = big1 - ind1 if(z<0) z = z + numattable1 ## the previous 4 lines make it so z is the number of players left to act behind you. if((crds1[1,1] == crds1[2,1]) && (crds1[2,1] > 9.5)) a1 = mychips1 if((crds1[1,1] == 14) && (crds1[1,2]>11.5) && (x<.75)) a1 = mychips1 if((crds1[1,1] == crds1[2,1]) && (crds1[2,1] > 6.5) && (numattable1 < 6.5)) a1 = mychips1 if(mychips < 2*blinds1) a1 = mychips1 if(y <= blinds1){ if((z < 3.5) && ((crds1[1,1] == crds1[2,1]) || (crds1[1,1] == 14))) a1 = mychips1 if(z < 2.5) a1 = mychips1 } a1} ## end of zebra