Two Plus Two Newer Archives  

Go Back   Two Plus Two Newer Archives > General Gambling > Probability
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 02-16-2007, 12:10 AM
jason1990 jason1990 is offline
Senior Member
 
Join Date: Sep 2004
Posts: 932
Default Bayesian winrates

Many people have learned from this forum how to compute a confidence interval for their winrate. If you are not one of them but would like to be, the search function is your friend. The creation of confidence intervals is a classical and fairly straightforward procedure. However, I do not recall ever seeing a post which described how to do a Bayesian analysis of your winrate. I will provide a somewhat complete derivation of the analysis here. But if you simply want the formulas, you should skip to the end of this post.

Suppose I have some prior opinion about my winrate. That is, I have some range of winrates that I believe are reasonable. For example, say I have a firmly established winrate of 1.5BB/100, but then I move to another site. I'm not sure what my winrate at the new site will be. I make a conservative estimate that it will be 1BB/100. To get a range around this, I reason as follows. I'm fairly confident that I will be a winning player at the new site, but I suspect it's relatively unlikely that my winrate will be more than 2BB/100. So one way to model my unknown winrate is to say that it is a normal random variable with mean 1 and standard deviation 0.5.

I now play 40,000 hands at the new site and have a winrate over those 40,000 hands of 2BB/100, and a standard deviation of 15BB/100. What should my new estimated winrate be? Classically, I would construct a confidence interval. For example, a 95% confidence interval would be [0.5,3.5]. But this classical method does not take into account my prior opinion. This opinion is not entirely subjective. It is based on my play at the other site. So one could argue that it should not be ignored. So how do we take it into account?

Let X_j be the result of my j-th session at the new site. For simplicity, assume each session is 100 hands long. Then

X_j = W + sY_j,

where W is my winrate, s=15 is my standard deviation, and Y_j are independent normal(0,1). Using my prior opinion, I can model W as a normal(w,t^2), where w=1 and t=0.5. I also assume W is independent of the sequence Y_j. The question I want to answer is: what is the conditional distribution of W given X_1,...,X_n, where n=400.

Knowing the distribution of a random variable W is the same as knowing how to compute E[f(W)] for all functions f. So let me try to calculate E[f(W)|X], where X=(X_1,...,X_n) and f is an arbitrary function. Let M=(X_1+...+X_n)/n. The first step to solving this problem is to find a constant c such that W-cM is independent of X. Since W-cM and X are jointly normal, this means I simply want to solve

E[(W - cM)X_j] = E[W - cM]E[X_j] for all j.

It requires a fair bit of algebra to simplify this equation and I will leave it to the reader to verify that this is equivalent to

(1 - c)(t^2 + w^2) - cs^2/n = (1 - c)w^2.

Solving this gives

c = nt^2/(nt^2 + s^2).

Now let U=W-cM, so that U and X are independent. We then have

E[f(W)|X = x] = E[f(U + cM)|X = x] = E[f(U + cm)],

where m=(x_1+...+x_n)/n is my observed winrate at the new site. We see that U+cm is normal, so we only need to calculate its mean and variance. Note that we can rewrite U as

U = (1 - c)W - (cs/n)(Y_1 + ... + Y_n).

From here, we see that U has mean (1-c)w and variance (1-c)^2(t^2)+c^2(s^2)/n. The variable U+cm will have the same variance, and a mean of (1-c)w+cm. I leave it as another algebraic exercise to show that these simplify to

E[U + cm] = (mnt^2 + ws^2)/(nt^2 + s^2)
var(U + cm) = (st)^2/(nt^2 + s^2).

Take note of the limits of these expressions as n goes to infinity. The mean tends to m, which means that the more hands you play, the closer your revised estimate gets to your true winrate. The variance tends to 0, which means that the more hands you play, the more certain your estimate will become.

<ul type="square">
To summarize, my prior opinion was that my winrate was a normal random variable with mean w and standard deviation t. I played n 100-hand sessions and observed a winrate of m and a standard deviation of s. This new information gives me a revised opinion on my winrate. I now conclude that my winrate is normal with mean

(mnt^2 + ws^2)/(nt^2 + s^2)

and standard deviation st/sqrt{nt^2 + s^2}.[/list]
Let us plug in the original numbers. They were w=1, t=0.5, n=400, m=2, and s=15. This gives a new mean of

(200 + 225)/(100 + 225) = 1.31

and a new standard deviation of

7.5/sqrt{100 + 225} = 0.416.

My estimate of my winrate increased by 0.31BB/100. I am also slightly more confident of this estimate than I was of my previous 1BB/100 estimate. Specifically, the standard deviation of my estimate has reduced from 0.5 to 0.416. Previously, I had thought that there was about a 95% chance that my winrate was between 1-2(0.5) and 1+2(0.5), or between 0 and 2. Now, I believe there is about a 95% chance my winrate is between 1.31-2(0.416) and 1.31+2(0.416), or between 0.478 and 2.142. Note how different this is from the classical [0.5,3.5] 95% confidence interval. The difference comes, in part, from the fact that I have incorporated my prior opinion into the analysis.
Reply With Quote
  #2  
Old 02-16-2007, 03:57 AM
PairTheBoard PairTheBoard is offline
Senior Member
 
Join Date: Dec 2003
Posts: 3,460
Default Re: Bayesian winrates

Which result would you bet on?

PairTheBoard
Reply With Quote
  #3  
Old 02-16-2007, 08:25 AM
jason1990 jason1990 is offline
Senior Member
 
Join Date: Sep 2004
Posts: 932
Default Re: Bayesian winrates

[ QUOTE ]
Which result would you bet on?

[/ QUOTE ]
If I was confident enough to bet on my prior opinion before playing on the site, and no new information other than the results of my play has come to me since then (e.g. no new rake structure, I haven't switched limits, my playing style hasn't changed) then I would bet on the Bayesian result after playing.

If you approached me before I played any hands and asked me to bet that the classical confidence interval I was about to create would cover my true winrate, I would take that bet.

But if you approached me after I had played all 40,000 hands and wanted me to bet that my true winrate was in the classical confidence interval, I would not accept the bet without further consideration. For example, if, after those hands, my observed winrate was 4BB/100, I'd know I was running hot and would be less likely to take the bet. In other words, my decision of whether or not to bet would take into account additional information -- specifically, information related to what I know in general about what winrates are possible for me to sustain. In other words, I would accept or decline the bet based in part on my (informed) opinions and not just on the statistical results. Of course, this is exactly the issue that the Bayesian method is trying to address: how do we quantify the way in which the statistical results should be modified on the basis of these opinions?
Reply With Quote
  #4  
Old 02-16-2007, 06:57 PM
PairTheBoard PairTheBoard is offline
Senior Member
 
Join Date: Dec 2003
Posts: 3,460
Default Re: Bayesian winrates

The thing is, you adjusted your normal winrate of 1.5BB/100 down to 1BB/100 to be conservative. If it was me, I think after seeing 2BB/100 for the 40,000 hands I would tend to second guess my conservative estimate of 1BB/100 and if I was going to bet on something I think it would be a Baysian Calculation using my 1.5BB/100 for the prior assumption. After all, the actual evidence of previous experience, 1.5, and the new data, 2.0, are both above the 1.3 calculation. The only thing justifying a figure as low as 1.3 is a nonevidentiary hunch and bias toward the conservative 1.0. There's no real evidence to back up such a conservative bias.

But then you know me. I'm all ready to ignore Kelly and Shoot for the Moon.

PairTheBoard
Reply With Quote
  #5  
Old 02-16-2007, 07:05 PM
PairTheBoard PairTheBoard is offline
Senior Member
 
Join Date: Dec 2003
Posts: 3,460
Default Re: Bayesian winrates

Come to think of it. If you used the 1.5BB/100 for the Baysian calculation, shouldn't you get the same result as you would if you just threw the 40,000 hands into the running total for the 1.5BB/100 and computed a tight confidence interval based on the large number of total hands?

PairTheBoard
Reply With Quote
  #6  
Old 02-17-2007, 12:48 AM
jason1990 jason1990 is offline
Senior Member
 
Join Date: Sep 2004
Posts: 932
Default Re: Bayesian winrates

[ QUOTE ]
The thing is, you adjusted your normal winrate of 1.5BB/100 down to 1BB/100 to be conservative...The only thing justifying a figure as low as 1.3 is a nonevidentiary hunch and bias toward the conservative 1.0. There's no real evidence to back up such a conservative bias.

[/ QUOTE ]
There's no real evidence of anything because the example is entirely hypothetical. But suppose this example took place in the pre-UIGEA world, I earned my 1.5BB/100 winrate at Party, and I was moving to Absolute. Then my supposition of a reduced winrate would not be merely a hunch. It would be based on information obtained from this forum on the differences between the games at the two sites. And, for all you know, I did extensive datamining, identified the screen names of known 2+2 posters, compared their playing styles as inferred from their posts to my own playing style, looked at their winrates, etc. The degree to which the prior winrate assumption is a "hunch" depends on a number of factors. But I still say that, as long as I was willing to bet on my prior assumption before I played the 40,000 hands, then I'd be willing to bet on the Bayesian result afterwards. The question of how "hunchy" the prior is relates to the question of how willing I'd be to bet on it in the first place.

[ QUOTE ]
Come to think of it. If you used the 1.5BB/100 for the Baysian calculation, shouldn't you get the same result as you would if you just threw the 40,000 hands into the running total for the 1.5BB/100 and computed a tight confidence interval based on the large number of total hands?

[/ QUOTE ]
It sounds like you want to compare two things. On the one hand, do my example, but replace w with the observed mean at the old site and t with the observed standard error at the old site. On the other hand, combine the 40,000 hands at the new site with however many hands you had at the old site and do a classical confidence interval on this larger data set. You then want to know if the posterior mean and standard deviation in the Bayesian analysis agree with the observed mean and standard error in the classical analysis on the larger data set.

I think the answer is, in general, no. Suppose I observed the 1.5BB/100 winrate on the old site over 16,900 hands, and I had an observed standard deviation there of 13BB/100. Then my standard error would be 1. So w=1.5 and t=1. For the new site, we still use n=400, m=2, and s=15. Using these numbers, I calculate a Bayesian posterior mean of 1.82. But the actual observed mean over these 56,900 hands is 1.85149... (It may be true that you get the same result when the standard deviation of the two data sets are equal, but I haven't checked that.)

I think what's happening here is pretty clear. The Bayesian analysis is giving more weight to the mean of the first data set, because it has a smaller standard deviation. This brings the overall mean down a little bit. The classical analysis on the large data set doesn't see two separate standard deviations, so every data point gets the same weight.

But philosophically, I think we're comparing apples to oranges. When you use the Bayesian approach, you are postulating a prior opinion. This opinion is a probability distribution. You can't just take a confidence interval and "turn it into" a distribution. They are two different mathematical objects. And besides, when you do this, you are implicitly postulating a belief that the new site will be, in some sense, statistically similar to the old one. This may be true, but it is still a belief and has just as much "hunchiness" potential as any other belief.
Reply With Quote
  #7  
Old 02-17-2007, 02:14 AM
PairTheBoard PairTheBoard is offline
Senior Member
 
Join Date: Dec 2003
Posts: 3,460
Default Re: Bayesian winrates

ok. Good stuff.

PairTheBoard
Reply With Quote
  #8  
Old 02-17-2007, 02:39 PM
PhantomGoose PhantomGoose is offline
Senior Member
 
Join Date: Dec 2006
Posts: 108
Default Re: Bayesian winrates

I'm struggling with the mathematics a little bit (I'm a recreational micro-limit player and a painter so I'm not all that smart really). Can you walk me through my example because, I had this question about my winrate, and dammit I found this thread using the search function.

My WR is 7.5/100 at 18,300 hands. I don't have any saved data beyond that. My SD is 98 big bets/100.

Thanks for any help.
Reply With Quote
  #9  
Old 02-18-2007, 05:20 PM
jason1990 jason1990 is offline
Senior Member
 
Join Date: Sep 2004
Posts: 932
Default Re: Bayesian winrates

I think this thread is not for you. In my opinion, you should be very comfortable using confidence intervals before you try Bayesian methods. What you want is here:

http://forumserver.twoplustwo.com/showfl...e=3#Post7896343

and here:

http://forumserver.twoplustwo.com/showfl...rue#Post4754180
Reply With Quote
  #10  
Old 02-18-2007, 09:06 PM
uDevil uDevil is offline
Senior Member
 
Join Date: Jul 2003
Location: Cloudless climes and starry skies.
Posts: 2,490
Default Re: Bayesian winrates

[ QUOTE ]
I'm struggling with the mathematics a little bit (I'm a recreational micro-limit player and a painter so I'm not all that smart really). Can you walk me through my example because, I had this question about my winrate, and dammit I found this thread using the search function.

My WR is 7.5/100 at 18,300 hands. I don't have any saved data beyond that. My SD is 98 big bets/100.


[/ QUOTE ]

PhantomGoose,

This doesn't deal with Jason's original topic, but you might find this little program helpful:

http://www.castrovalva.com/~la/win.htm

Any comments/criticisms on this page are welcome.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:39 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.