• Quick note - the problem with Youtube videos not embedding on the forum appears to have been fixed, thanks to ZiprHead. If you do still see problems let me know.

Moderated Coin Flipper

...
I still believe it is better to have a programmable edge probability so that your app can meet anybody's edge probability preference.


I need to give a very thankful and grateful shoutout to you my dear chap.

Your contribution and comments and suggestion have resulted in Coin Flipper 4 being so much better than I would have done without your suggestion and advise and contributions.

You are indeed a peer worthy of my respect and thanks.

:th:
 
Last edited:
Sigh, if you perform 10 runs, for v4 each of 10k and each of those 10 runs favours tails, then there would have been a 1 in 2^10 chance that it was a fair program evenly balanced between heads and tails.

If the app is "fair," the probability that a 10K-flip run would favor tails is 0.5 and would favor heads, 0.5. The probability that the majority of flips would be the same for 10 such runs would be 0.5^9 = 1/512. The probability that the majority of all 10 runs would specifically be tails is 0.5^10 = 1/1024. The number of flips per run doesn't enter the calculation, as long as that number is large enough that the probability of getting exactly 50% heads is negligible.

The inverse probability, that is, the probability that the flipper is "fair" given the outcome, can't be calculated without specifying a prior probability.
 
Last edited:
And an easy way to check it would be to run another ten runs of the V4, treating each run as a single event and working out the odds of the distribution of heads and tails assuming a binomial distribution of ten events. If you felt a bit more funky, one could look at the initial 4 runs all favouring tails as indicating a prior probability.

Do enough runs, and you could reasonably generalize about the likelihood of bias in the code. But this generalization would not be hasty.

Meanwhile, saying "I see indications of possible X" is not the same as saying "I am making a general claim about X, with too little data".

And of course examining the code will probably address the possibility of bias a lot quicker than trying to generalize from N runs of the app.
 
No... no... that won't do... how can one continue to be CONCERNED when one's concerns can be alleviated by just EXPERIMNETIMNG with things instead of doing bare assertions and hasty generalizations in order to remain CONCERNED.

And why 10 runs only... why not 100 or 200 and not just at 10M but also at 10K and 100K and 1M and do it 100 or 200 times for each and then SEE FOR ONESELF stuff that one cannot do in real life.

Why not just look at the code?
 
Why not just look at the code?


Thanks for your concern... I appreciate it...

Now tell me in which of the three RNGs you noticed the "bias"?

And did you run the app at all to test for yourself if indeed there is a bias or you just looked at the screen shots I gave?

Can you give me the screen shots of the trials you ran so that I can see what is what?

But... why are you so concerned? I thought that it all is meaningless rubbish anyway since it "eschews having any relationship to reality"... isn't that what you said? If so then why are you so concerned?

Just do your own real coin trials and see if you might get a bias or not.
 
And when you do not... then you cannot... which is what happens in genuine random events.... no?

So when you use a random seed... it is random.

That is not random. That is with hidden variables.

I could run this post through a simulator of an Enigma machine, convert the subsequent letters into ASCII numbers and use that as a seed value for a pseudorandom number generator. The only way I could predict what the sed would be would be to actually do that, but it would be entirely deterministic and completely repeatable.

That is, by definition not the case with random numbers.
 
If the app is "fair," the probability that a 10K-flip run would favor tails is 0.5 and would favor heads, 0.5. The probability that the majority of flips would be the same for 10 such runs would be 0.5^9 = 1/512. The probability that the majority of all 10 runs would specifically be tails is 0.5^10 = 1/1024. The number of flips per run doesn't enter the calculation, as long as that number is large enough that the probability of getting exactly 50% heads is negligible.

The inverse probability, that is, the probability that the flipper is "fair" given the outcome, can't be calculated without specifying a prior probability.

I sort of agree, thinking about it from a process SPC pov.

However I am specifically looking at the chance that there's a bias towards tails. And as you say, the number flips per run is irrelevant. But if someone is happy doing 10k runs, and we suspect only a slight bias (well under 0.1%) then you're unlikely to be able to detect it with small run sizes. And if you are only interested in the situation where tails are predominant, then with 10 runs, you are not just searching for signals but looking for a specific prediction.

My *guess* would be that it will end up as not being significant, but that's something we could work out from the binomial distribution.



Do enough runs, and you could reasonably generalize about the likelihood of bias in the code. But this generalization would not be hasty.

Meanwhile, saying "I see indications of possible X" is not the same as saying "I am making a general claim about X, with too little data". And of course examining the code will probably address the possibility of bias a lot quicker than trying to generalize from N runs of the app.


Yes, that was my point, I thought.

For me, examining the code wouldn't be quicker. Although if the 10 runs of the v4 script all came out in favour of tails, the examination would be the way to identify the cause of the bias.
 
Thanks for your concern... I appreciate it...

Now tell me in which of the three RNGs you noticed the "bias"?

And did you run the app at all to test for yourself if indeed there is a bias or you just looked at the screen shots I gave?

Can you give me the screen shots of the trials you ran so that I can see what is what?

But... why are you so concerned? I thought that it all is meaningless rubbish anyway since it "eschews having any relationship to reality"... isn't that what you said? If so then why are you so concerned?

Just do your own real coin trials and see if you might get a bias or not.

Still just entertained, my dude.

From your screen shots, the bias (if it exists) seems to be RNG agnostic.
 
Still just entertained, my dude.

So it is not a worthless useless bloated window dressing of an app after all.

Ah well... thanks for negating that you are one of the "US".


From your screen shots, the bias (if it exists) seems to be RNG agnostic.


Yes... "my dude"... thanks for your hasty generalization without bothering to run the app and see for yourself.

And I will bet that you will never do so.

But... let me give you a hint... notice there is an Edge case ... these HAVE to take away from either the heads or tails... unless it just happens to be the Edge count is subtracting exactly the same Edge case count from both.

So run the app and try it without an Edge case allowed (put the prob as 1) and see for yourself.

But of course you will never do so... hmmm... I wonder why???

Here is another lot of screen shots for you to be CONCERNED about.

[IMGW=700]http://godisadeadbeatdad.com/CoinFlipper4/images/bias.png[/IMGW]​
 
Last edited:
So it is not a worthless useless bloated window dressing of an app after all.

Ah well... thanks for negating that you are one of the "US".





Yes... "my dude"... thanks for your hasty generalization without bothering to run the app and see for yourself.

And I will bet that you will never do so.

But... let me give you a hint... notice there is an Edge case ... these HAVE to take away from either the heads of tails... unless it just happens to be the Edge count is subtracting exactly the same Edge case count from both.

So run the app and try it without an Edge case allowed (put the prob as 1) and see for yourself.

But of course you will never do so... hmmm... I wonder why???

Here is another lot of screen shots for you to be CONCERNED about.

[IMGW=700]http://godisadeadbeatdad.com/CoinFlipper4/images/bias.png[/IMGW]​

If I generalize from these results, am I making a hasty generalization?
 
However I am specifically looking at the chance that there's a bias towards tails....


The bias is due to hasty generalization of just looking at those screen shots... and... combined with the lack of realization that there is an Edge case being allowed for in those screen shots... and also lack of appreciation of what probability distribution is... especially when it is trinary not binary as the case in those screen shots.
 
If I generalize from these results, am I making a hasty generalization?


You were doing a hasty generalization from little data without any extensive testing or even trying to use the app to get results from it.

And you compounded on top of that fallacy an additional error of not understanding what effect the Edge case has on the distribution.

You would probably have thought of that had you done any testing on the app instead of just armchair looking at screen shots of a few trials.... maybe.

But I thank you for your CONCERNS.

And I will still bet that you will never run the app... hmmm... I wonder why?


ETA: and yes is the answer to your question... can you tell why the answer is yes?
 
Last edited:
But... let me give you a hint... notice there is an Edge case ... these HAVE to take away from either the heads or tails... unless it just happens to be the Edge count is subtracting exactly the same Edge case count from both.

"Unless it just happens to be"? If it is not, then the app is biased.
 
"Unless it just happens to be"? If it is not, then the app is biased.


Goodness gracious... wow...:eye-poppi:boggled::covereyes

Do you know what probability means?

If there are 9 Edge counts ... how can you have 9 distributed into heads and tails evenly??

But... tell me again why so much CONCERN about a trivial window dressing that adds nothing to your knowledge???


Maybe you should use your one line of input into R/S and see how the Edge case about which you harped on so repeatedly affects your amazing one line of input into R/S.

Here's my "app," "Coin Flipper R," ver. 0.

Alas, it runs in the console and not on the web, like Leumas's. On the other hand, it is exactly one line of code, not 200, like Leumas's.

Sorry, Leumas, but all you've done is write 199 lines of literal window dressing to implement a one-line program that does nothing more than illustrate the consequences of an elementary probability theorem that was proved over 300 years ago.


... The fact is your app is trivial. Not only does it do nothing more than illustrate a statisitical fact that has been well understood for hundreds of years, it merely implements a rudimentary random number function, which in R (the programming language I know best) requires exactly one line of code.

Your app contributes exactly nothing to our knowledge of anything. And everybody here—including you—knows it.
 
That is not random. That is with hidden variables.


Nope... it is with RANDOM variable just like in nature.

If the seed is an instant in time that you could not determine because it all depends on the instance of a key stroke or the instant when the algorithm is run to milliseconds which you have no way to predict because the OS is multitasking and could have queued the process or not and it could have been third or first etc. etc.

Or the seed could be noise in the machine or in the atmosphere etc. etc.

You know... random... as in unless you are god you cannot possibly predict or determine.


I could run this post through a simulator of an Enigma machine, convert the subsequent letters into ASCII numbers and use that as a seed value for a pseudorandom number generator. The only way I could predict what the sed would be would be to actually do that, but it would be entirely deterministic and completely repeatable.


Your example is faulty... you are not using a random seed.... see above.


That is, by definition not the case with random numbers.


Yes it is not... and the fault is your example... see above.

ETA: the TRNG of my app uses 16K of RANDOM BYTES generated by a hardware that uses atmospheric noise... so they are ALL 16K bytes random and not generated by any algorithm.
 
Last edited:
Yes.
Do you know what bias means?


Ya... here is an example


OK. So, I have asked you three times how you programmed an edge-landing into version 2 of your app. You have refused to answer each time.

Therefore, I am going to assume, as I suspected, that your version 2 app does not allow for an edge landing; rather, it, like your version 1 app, just uses a canned bernoulli (pseudo) random number generator. Worse yet, I don't think you actually understand that your own app can't simulate an edge-landing, which is, actually, pretty sad.
 
ETA: the TRNG of my app uses 16K of RANDOM BYTES generated by a hardware that uses atmospheric noise... so they are ALL 16K bytes random and not generated by any algorithm.


That is very likely not true. Digitized atmospheric noise is very random in appearance in the least-significant bits, but not so much so toward the other end of each value. You do not have 16KB of random values; you more likely have 16K bits.

If that is then used to seed the generator, great. The first value out is random in the same sense the atmospheric noise seed was random. Thereafter, the sequence is fully deterministic.
 
...
If that is then used to seed the generator, great.....


Ok... irrespective of my bloated window dressing useless app which you have been so CONCERNED with despite it not adding to your knowledge whatsoever.... what you have said above is that randomness can easily be obtained out of a computer.... QED!!!
 
Ok... irrespective of my bloated window dressing useless app which you have been so CONCERNED with despite it not adding to your knowledge whatsoever.... what you have said above is that randomness can easily be obtained out of a computer.... QED!!!


No. I didn't say that.
 

Back
Top Bottom