andrewr
- 262
- 0
micromass said:No, that's not what's going on here. The deal is: go get a dice and roll it 20x, then see whether you rolled the specific sequence 14325231542341632165. The answer will be no most likely.
Let's continue with the analysis. Let's write a computer program and let's do billions of dice rolls and let's measure whether 14325231542341632165 and 11111111111111111111 is more likely. Are you willing to accept the answer of a computer simulation??
It was a computer simulation that taught me the three shell problem; And I did accept it although I disagreed with my room-mate before I tried the program.
LOL, a sample of 10 games. You know very well that you need to roll it many more times to have something statistically significant.
But, ok, are you prepared to do the computer simulation I proposed?? I'll even code it for you.
Thank you, yes I would like to see how you code the program and verify it is at least algorithmically correct. I had some minor trouble in mine; for much of the tests, it is indeed nearly impossible to get an answer in "10" tries and so it is *very* difficult to verify that I coded the success counting section correctly for a 20x dice (so, if it ever does succeed, the program might just crash -- but I'm generally pretty good at debugging...)
For the 3 shell game I described, 10 runs is sufficient to notice a bias in the randomness, if there is one. I got 50/50 on my first try using the digits of pi mod 2 to choose among the two remaining shells. Not exactly random, but a good enough test.
I include the 3 shell casino, just as an example of how I code a probability demonstration, and a little fun. Let's have everyone play... ! and gather cumulative statistics...
I don't know about the 20x dice throw; but it won't hurt for a few thousand people to see if they can manually outguess python's well tested shuffling randomizer. Mercen? whatever twister core -- but pretty good.
If you catch a bug, let me know where and why it a bug in the code. :)
I'll fix it, if it is indeed a bug.
And, again -- Thank you for your offer to code something for me.
I love integrity, Micromass, it *always* impresses me; and it will save me some time.
I know C,C++,Java,Python,Fortran,Cobol,Snobol,assembly -- but here at the Farm (just a small one) we mostly have power processors free to do number crunching. Don't get me wrong, this isn't IBM's Haupage New York super-computer room; but I do have some spare computing...

If you read my thread on converting a binomial/normal data distribution, you'll note that even at 500,000 data points, that the Python gaussian random number generator has a inexplicable defect near the mean value; it can be seen in all three graphs, although it is a very small bias.
I *do* believe this is a problem with the math co-processors on the Intel platform. I also had to borrow one to run a test of the casino under windows. Intel's fpu has a minor underflow problem in the log function, and when used to produce a univariate random variable by inversion (e**-0.5x**2) by anti/inverse -function-- the problem shows up in the graph.
I tried to work around that in the casino by using shuffling of an unbiased deck in my example program -- and I have commented lines that allow you to see the random numbers generated and verify they are reasonably "fair", or to even replace the random number generator with one of your own. (not that it's really important for a three shell game...)
But for the 20x dice, a bias in the random generator might be suspect, right?
I'm looking forward to your program... I'm sure to learn something about you from it.
:)