Open Side Menu Go to the Top
Register
Win rate CI question Win rate CI question

07-24-2018 , 03:09 AM
sportsbettingcalcs has a CI calc which I like. I'm trying to recreate this in google spreadsheets.

I'd like to know how this website calculates their standard deviation.

Example :

Total Bets: 60

Win %: 35.00%

T-value:2.00

Standard Deviation: 6.16%

Win % Confidence Interval:
22.68% - 47.32%
Win rate CI question Quote
07-24-2018 , 09:03 AM
It's the standard deviation of a binomial distribution and it's calculated through:

sqrt(Win%*(1-Win%)/N)

(N is the number of bets, 60 in your case).

It has to be stressed that the "confidence interval" is ill defined, since it seems that they assume a normal distribution (?) and the calculate the 95%CI as [Win% - 2*sd;Win% + 2*sd]. It's ill defined since it leads to absurd intervals (try putting 1 for "Wins" and 2 for "Losses" and it returns -83.77% ;150.44%).
Win rate CI question Quote
07-24-2018 , 11:45 AM
Nick, is there a better way to create a ci in google sheets ? And thx for the help
Win rate CI question Quote
07-24-2018 , 12:57 PM
The use of the normal distribution approximation to calculate a confidence interval for a proportion is quite common. The typical restriction that np > 5 and n(1-p) > 5 precludes getting impossible results, I believe.

There are other methods including the so-call exact method (Clopper – Pearson). Check Wikipedia or many relevant articles on the net
Win rate CI question Quote
07-24-2018 , 10:35 PM
When I was in school many moons ago, the guideline for using the normal approximation of the binomial case I was taught was np > 10 and n(1-p) > 10.
Win rate CI question Quote
07-25-2018 , 11:53 AM
Inflation
Win rate CI question Quote
07-26-2018 , 03:33 AM
The practice of using the normal distribution basically for every task is totally outdated especially nowadays that you have everywhere software that implement a wide variety of statistic functions. It was necessary when you needed to solve problems with just pencil, paper and a set of tabulated values. Plus, the concept of "confidence interval" could be easily misunderstood. OP, what do you think it means?

For this problem you are trying to infer your win rate and it's a simple exercise of bayesian inference. Long story short, in R you could obtain your belief interval with the following code (there should be more to be said about the priors):

Code:
beliefInterval<-function(wins,losses) 
    cbind(lower=qbeta(0.025,wins+1,losses+1), upper=qbeta(0.975,wins+1,losses+1))
beliefInterval(21,39)
giving:
Code:
         lower     upper
[1,] 0.2416017 0.4769485
You can check the above function changing the values of the arguments and see that it never leads to absurd intervals as the sports betting one.

Last edited by nickthegeek; 07-26-2018 at 03:43 AM.
Win rate CI question Quote

      
m