Timeline for Expected travel of random walk in arbitrary game with multiple payouts
Current License: CC BY-SA 3.0
29 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 29, 2015 at 12:04 | comment | added | Dan W | @ColmBhandal: Okay done! | |
Sep 28, 2015 at 11:56 | comment | added | Colm Bhandal | @DanW that's great. Maybe you could even add the code as an update to the question so that future browser's of the site will see it and it is not lost down here in the murky comments section ;) | |
Sep 25, 2015 at 17:31 | comment | added | Dan W | Sure. Here you go: pastebin.com/985eDTFh - Don't worry about the size - three quarters of it is code for a fast random class I pinched from Stackoverflow. You can use the default Random class if you prefer. Also, if you're not using C#, don't worry too much about converting the convertCSVtoPayoutTable() function as you can hard code the probability and payout arrays yourself if you prefer. | |
Sep 25, 2015 at 12:33 | comment | added | Colm Bhandal | @DanW FANTASTIC! Great to see experiment agreed with calculation. post your code up to github if you have time and send me link, but dont stress about it! | |
Sep 25, 2015 at 7:13 | comment | added | Dan W | Aha, yes I get roughly around 9.38-9.4 after simulating 10M 'universes' (which you call experiments). Let me know if you'd like the code (it's in C# but is easily transferable to other languages). | |
Sep 24, 2015 at 18:30 | history | bounty ended | CommunityBot | ||
Sep 24, 2015 at 11:56 | comment | added | Colm Bhandal | @DanW the modification should be easy: just put one line of code into your program that checks (x > 0) before incrementing the running total (assuming that's how you have things set up) | |
Sep 24, 2015 at 11:53 | comment | added | Colm Bhandal | @DanW: First of all, this question is not bounty worthy. I didn't answer your question, so I don't get the bounty. Please do not falsely award it to me. Secondly, I am a computer programmer. I asked my stat friend to look at this but she is busy at the moment (PhD woes). As for the formula... I haven't given you a closed form. But if you modify your computer program to count only positive values, then divide by $10000$, you should get $9.4$ (half of $18.8$) according to my non-closed-form formula. I would love to see the result! | |
Sep 24, 2015 at 7:22 | comment | added | Dan W | Thanks, great presentation, and probably bounty worthy. The 'tails-not-cancelling' concept made sense too. I'm having a little trouble with interpretation - can you show explicitly plugging in the numbers to the final formula so I can see it more clearly to see how 268.8 is reached (or perhaps rather 18.8 as that's the difference between that and 250). Here they are again: INPUT: outcomes<probability:profit> = {0.75:-1, 0.1:0.5, 0.15:4.5}, mean=-0.025, runs=10000. OUTPUT = 268.8. Excuse the more programmer-like description there. Hopefully it's clear. | |
Sep 21, 2015 at 14:42 | history | edited | Colm Bhandal | CC BY-SA 3.0 |
added 322 characters in body
|
Sep 21, 2015 at 12:04 | comment | added | Colm Bhandal | @DanW I'll work on it. I'm not a statistician (as you can tell) but I find this problem interesting. I'll ask one of my stat friends if I get the chance. The number $n$ is just the number of experiments you do. E.g. the number of times you run your computer simulation. I'm basically taking a frequentist standpoint of the distribution: en.wikipedia.org/wiki/Frequentist_probability | |
Sep 19, 2015 at 20:59 | comment | added | Dan W |
@ColmBhandal: Thanks, any chance for a closed-form version and/or for a more accurate version that solves the tiny error thing? Also the latter two limit equations use n for the variable towards infinity, but it isn't used.
|
|
Sep 19, 2015 at 17:23 | comment | added | Colm Bhandal | @DanW your simulation, and the formula, are fine. The above answer shows why the whole thing goes out the window once the mean starts moving. Your best guess in that case is the mean- plus some tiny error term that you get from the two tails of the distribution. | |
Sep 19, 2015 at 2:35 | comment | added | Dan W |
Okay, I tried and it passed. My new zero-mean test was 0.75:-1, 0.1:0.75, 0.15:4.5 = 156.233 apx travel in the simulation which closely matches the formula $\sqrt{2*3.84375*10000/pi}=156.4$. Also tried 0.5:-1, 0.25:1, 0.25:1 which comes out the same as the coin-toss paytable 0.5:-1, 0.5:1 (= 78.8 approx) as expected. I'm pretty confident the simulation is accurate.
|
|
Sep 18, 2015 at 21:45 | history | edited | Colm Bhandal | CC BY-SA 3.0 |
added 2 characters in body
|
Sep 18, 2015 at 20:14 | history | edited | Colm Bhandal | CC BY-SA 3.0 |
added 176 characters in body
|
Sep 18, 2015 at 20:08 | comment | added | Colm Bhandal | @DanW my answer was way off. Above is an explanation that I think works. | |
Sep 18, 2015 at 20:08 | history | undeleted | Colm Bhandal | ||
Sep 18, 2015 at 20:07 | history | edited | Colm Bhandal | CC BY-SA 3.0 |
added 926 characters in body
|
Sep 18, 2015 at 19:21 | history | deleted | Colm Bhandal | via Vote | |
Sep 18, 2015 at 19:15 | history | edited | Colm Bhandal | CC BY-SA 3.0 |
added 49 characters in body
|
Sep 18, 2015 at 11:20 | comment | added | Colm Bhandal | @DanW, can you run your simulation for a centred distribution, still using 10,000 steps, and check if even the RHS formula $\sqrt{\dfrac{2\sigma^2 N}{\pi}}$ holds? If it doesn't, then the problem is with that. Else the problem is with this sliding average. | |
Sep 18, 2015 at 10:56 | comment | added | Did | ... but that there exists more refined results which guarantee that in the present case, say for $a=-2$ and $b=2$, indeed $P(A_N)$ is close to $p$. Note that here $(a,b)$ are fixed and $N\to\infty$. Note also that CLT says really nothing about the probability that $X_N=\mu N+c\sqrt{2\sigma^2N/\pi}]$ for some fixed $c$, when $N$ is large. Hmmm... Did I just recall some basics about CLT explained everywhere on the internet and in particular on WP? I am afraid I did exactly that. | |
Sep 18, 2015 at 10:54 | comment | added | Did | After a finite number of runs $N$ the result is random. Loosely speaking, the CLT describes the limit of the probability that this random result $X_N$ is around its expectation $E(X_N)=\mu N$ in the $\sqrt{N}$ scale. More rigorously, consider the event $A_N=[\mu N+a\sqrt{2\sigma^2N/\pi}<X_N<\mu N+b\sqrt{2\sigma^2N/\pi}]$, then the CLT asserts that $P(A_N)$ converges to some $p$ in $(0,1)$ when $N\to\infty$, where $p=P(a<Z<b)$ for some standard normal random variable $Z$. Note that, formally, CLT says nothing about the discrepancy between $P(A_N)$ and $p$ when $N$ is large ... | |
Sep 18, 2015 at 10:39 | comment | added | Colm Bhandal | Maybe you have not gone wrong. Maybe I have gone wrong. I will flag this to the expert Did in the comments above, if he is not too exasperated hopefully he will have an insight. | |
Sep 17, 2015 at 17:43 | comment | added | Dan W | I plugged in the numbers $-0.025*10000 + \sqrt{2*3.811875*10000/\pi}$ but got apx 94 (or -405 if I tried using negative instead of positive between the terms). I expected 268.8 (or -268.8) as I detailed in my question. Where I have gone wrong? I presume $\sigma^2$ = 3.811875. | |
Sep 17, 2015 at 10:40 | history | edited | Colm Bhandal | CC BY-SA 3.0 |
added 20 characters in body
|
Sep 17, 2015 at 10:15 | history | edited | Colm Bhandal | CC BY-SA 3.0 |
added 1715 characters in body
|
Sep 16, 2015 at 19:05 | history | answered | Colm Bhandal | CC BY-SA 3.0 |