Pages

Tuesday, 30 July 2013

14.4 Some notes about Just-Dice.com gambling probabilities part 2


27th July 2013

Other posts in series

Suggested reading:

0. Introduction
 In the last post I introduced some of the basics of loss-run probability:

a) The probability of exactly k losses before a win:


b) The probability of at most k losses before a win:


c) The probability of at least k losses before a win:


d) The expected (or average) number of losses before a win:



These - especially the last - can help plan a betting strategy. If you know the expected number of losses before a win, then you have some idea of how long your bitcoin might last. Unfortunately it does not provide an indication of how many runs until a long run appears, how many very long runs there might be, or the longest expected run per k runs. In this post I'll be introducing the first; I'll explain the latter two in upcoming posts.


1. What is the average number of loss runs until the next expected number of losses in a row?
This question seems simple but involves three separate and differently distributed random variables, so I'll start with a concrete example.

Imagine you're playing 25% chance to win. You've just won after the expected number of losses in a row - in this case 1/p -1 = 3 losses in a row. Assuming you play the same chance to win, how long on average until the next run of three losses in a row?

1. Win = 1, lose = 0
0 0 0 1 0 1 0 0 0 0 1 0 1 0 0 1 1 0 0 0 1 0 0 0 0 0 1 0 0 1 0 1 0 0 0 0 0 1 0 1 0 0 0 1

2. Losses in a row:
3 1 4 1 2 0 3 5 2 1 5 1 3

3. Loss runs until a loss run occurs that consists of 3 losses in a row:
1 6 6

The first two sets of random variables are ones with which you should already be familiar - the first are binomially distributed random variables and the second are geometrically distributed random variables, both with probability of 0.25. What about the third group, "Loss runs until the expected number of loss runs occur"?

If you think about it for a moment, you'll realise that this is another group of Bernoulli trials measuring the number of times something fails to occur before that something does occur - a geometrically distributed variable, in this case shifted so that the minimum variable is 1 instead of zero, and the expected value is 1/p instead of 1/p -1 (I'll leave the derivation of that up to you). The probability of "success" is the same as the probability of the expected number of losses in a row occurring,so the distribution probability is the same as the probability of the expected number of losses occurring within a run.

Below, X is the "losses in a row per loss run" random variables, and Y the "number of loss runs until the expected number of losses in a run" random variables, and pX is the probability of variable X occurring, pY the probability of Y occurring. The sequence shows how the expectation of probability and expectation of X is related to the probability and expectation of Y.




Although p can't be 0 or 1, the values E(X) approaches asymptotically can be determined. As pX approaches 1, both pX and (1 - pX)^(1 - 1/pX) approach 1, so E(Y) approaches 1. The value E(Y) approaches as p approaches 0 is a little harder to determine. 

Start by substituting r  = -1/pX :

 
Since:


Then:


So as pX approaches 0, the expected  number of loss runs until the expected number of losses in a run is e multiplied by the expected number of losses in a run. 

The intuitive reason for this is that as pX approaches 0 the size and number of random variables increase, and the chance of one particular random variable occurring becomes very small - hence E(Y) becomes very large.




2. This is where it gets interesting.
Finding the average number of loss runs until the average number of losses in a run is somewhat limited. The average number of loss runs until n losses in a run occurs might be somewhat more useful, and it can be derived in the same way by finding the probability of n losses in a run and using that to determine the average number of loss runs until the next n losses in a run.




The chart below plots E(Y) for various n and pX.


As pX approaches 0, the average number of loss runs until n losses in a run increases; and as   pX approaches 1 the average number of loss runs until n losses in a run also increases. Why such a significant difference from average number of loss runs until the average number of losses in a run? 

The reason for the increase as pX approaches 0 is the same as in the last section - the chance of one particular X occurring becomes very small and E(Y) becomes large.

The answer lies in the nature of the "average number of losses in a run", which can be any real number greater than 0. By comparison n can only be an integer. As pX approaches 1,  E(X) approaches 0. Any larger n become increasingly unlikely, and E(Y) increases. 

3. This is where is gets really interesting.
Even though the results of section two are more useful than that of section 1,  when it comes to planning how much to bet and how much bank you need, knowing the average number of loss runs until exactly n losses in a run is not as handy as knowing the number of loss runs until greater than n losses in a run.

Assigning a limit to the number of losses in a row that you can handle and then knowing the expected number of loss runs until that occurs is much more useful.

Deriving the expected number of loss runs until more than n losses in a run occurs is done in much the same way as E(Y) was derived in previous sections:










This is what we want: a monotonically increasing function that intuitively seems correct, since E(Y) increases with both n and the probability to win, pX. When the probability to win the game is very low, the probability of more than n = 0, ...,  5 losses in a row is large and E(Y) is 1/{large} = small, and as the probability to win increases the probability of more than = 0, ...,  5 losses in a row is small, and the expected number of loss runs until  more than = 0, ...,  5 losses in a row is 1/{small} = large.

A handy dandy csv table of values.

4. Summary

  • The average number of loss runs until the next expected number of losses in a row.



  • The average number of loss runs until the next n losses in a row.

  • The average number of loss runs until the next greater than n of losses in a row.


This and the handy table of values should be enough to get you started. However wouldn't it be better to condition the average number of loss runs on probability rather than n runs? That way you wouldn't have to calculate which n is sufficiently unlikely, and allow you to set a limit of, for example, a 1% probability loss run? That and more next time.



organofcorti.blogspot.com is a reader supported blog

BTC:  12QxPHEuxDrs7mCyGSx1iVSozTwtquDB3r

For notification of new posts, follow @oocBlog

Math published using QuickLaTeX and code cogs.


<fourteenpoint four>

No comments:

Post a Comment

Comments are switched off until the current spam storm ends.