Transcript document

Stat 35b: Introduction to Probability with Applications to Poker
Project A due Thu Feb 6, 8pm, by email to me at
[email protected].
See http://www.stat.ucla.edu/~frederic/35/W14/teams.txt for teams.
Read up through Chapter 5.
Outline for the day:
1. zebra().
2. unbeatable() and expected winnings.
3. Midterm.
4. Gold/Benyamine.
5. Bernoulli random variables.
6. Binomial random variables.
1. 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
2. “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.
3. Midterm.
The midterm is Fri Feb 21, in class.
It will be on chapters 1-5.
I will be lecturing on some stuff in chapter 6 before then, but the
midterm will only cover ch 1-5.
It will be mostly multiple choice, plus a few short answer questions.
You can use the book, plus just one page (double sided) of 8.5 x 11
paper with notes on it. Keep that page of notes after the test.
4. Gold/Benyamine.
u 

u
5. Bernoulli Random Variables, ch. 5.1.
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.
6. Binomial Random Variables, ch. 5.2.
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).
6. 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.