Author Topic: A Test for Randomness  (Read 4671 times)

0 Members and 1 Guest are viewing this topic.

Bayes

  • Moderator
  • Veteran Member
  • *****
  • Posts: 688
  • Thanked: 558 times
  • roulettician.com
Re: A Test for Randomness
« Reply #15 on: May 28, 2016, 08:57:04 AM »
Hi Kav,

"random" is a difficult word to define and is the source of many pointless arguments on the forums. For me (I and I believe it's the only fruitful definition) "random" just means unknown. What's random for me may not be random for you, so in a way it's subjective.

The runs test just tests to see if a sample is Normally distributed with regard to the number of runs (does it follow the bell curve). The random aspect concerns the independence or regularity of the outcomes in the sample. In fact, it doesn't even test for non-regularity, because the number of runs could be within the "belly" of the bell curve and yet the outcomes could still be regular.

The runs test is known as a test for "randomness" in the literature (https://en.wikipedia.org/wiki/Wald%E2%80%93Wolfowitz_runs_test) but to be precise it's really a test which compares the number of runs in a sample with what they "should" be according to the bell curve.

 I do emphasise that if a sample "fails" the test (that is, the hypothesis of non-randomness is not disproved at some level) then this isn't necessarily an indication of randomness - it could just just be, and in fact is much more likely to be in Roulette, an unusual event which occurs once every 20 or 100 samples, or whatever.

Quote
If we believe that the result of each spin is totally independent, then every possible spin sequence is equally probable.
This means that this sequence: 5,5,5,5,5,5,5,6,6,6,6,6,7,7,7,7,7,7,8,8,8,8,8,......
is equally probable with this sequence: 36,30,1,1,4,9,17,17,4,30,30,36,18,22,6,7.....

Then on what grounds is it possible to evaluate a spin sequence and give a verdict on its randomness?

Every possible sequence of a given length has the same probability, but not in every respect. With respect to the order of outcomes, they are identical because the probabilities are both 1/37 x 1/37 x 1/37 ...

But in other respects they don't have the same probability. In the first sequence the number of runs is highly unlikely. Same for even money sequences. RRRRR has the same probability as RR B R B as a sequence, i.e. 1/2 x 1/2 x 1/2 x 1/2 x 1/2, but not in terms of the number of reds and blacks. The first sequence is relatively rare because it consists only of R.

So you have to look at the way the outcomes are distributed, not just the "raw" probabilities.

Quote
In your post, what you did is that you looked in past spins (400 zeros) to evaluate the next spins. In principle  this is "gambler's fallacy".
If one says that a wheel that consistently shows black numbers is not random, then one basically adopts a gambler's fallacy approach.

Merely looking at past spins isn't the gambler's fallacy. A biased wheel player also does this. Is he committing the gambler's fallacy?
If someone were to say "there have been 15 reds in a row and because outcomes are equally likely it means that black must come up soon", that *would* be the gambler's fallacy. Without an explicit argument which involves a contradiction you can't say that just using past spins to predict future spins is the GF.
 
The following users thanked this post: kav, MrPerfect.

Bayes

  • Moderator
  • Veteran Member
  • *****
  • Posts: 688
  • Thanked: 558 times
  • roulettician.com
Re: A Test for Randomness
« Reply #16 on: May 28, 2016, 09:15:01 AM »
If something is random it means it is unknown. It does not follow rules. If it followed rules then those rules would limit its randomness. If it is unknown and does not follow rules then I can not evaluate it.

I just noticed this. I agree with "If something is random it means it is unknown."  Absolutely!

Then you go on to say "it doesn't follow rules".

But it may well follow rules, it's just that you don't know what they are. It's the not knowing that makes it random, not the "not following rules".

The problem is that most think that "random" is something "out there" to be discovered rather than a state of knowledge. Put in philosophical terms, randomness and probability are epistemological rather than ontological.

http://wmbriggs.com/post/2227/
« Last Edit: May 28, 2016, 09:27:37 AM by Bayes »
 
The following users thanked this post: kav

kav

  • www.Roulette30.com
  • Administrator
  • Hero Member
  • *****
  • Posts: 1936
  • Thanked: 925 times
  • Gender: Male
Re: A Test for Randomness
« Reply #17 on: May 28, 2016, 09:37:05 AM »
Bayes,
Thanks for your (always interesting) reply.
Quote
For me "random" just means unknown. What's random for me may not be random for you, so in a way it's subjective.
Quote
I do emphasise that if a sample "fails" the test (that is, the hypothesis of non-randomness is not disproved at some level) then this isn't necessarily an indication of randomness
Good points to keep in mind.

Quote
I agree with "If something is random it means it is unknown."  Absolutely!
Then you go on to say "it doesn't follow rules".
But it may well follow rules, it's just that you don't know what they are. It's the not knowing that makes it random, not the "not following rules".
You are right. I mean we do not know the rules.

Quote
...it's really a test which compares the number of runs in a sample with what they "should" be according to the bell curve.
In fact this is analogous (reverse) to what I do. But if I tell so, then I could be "accused" of gambler's fallacy. The only difference is that I take randomness for granted and I bet on the formation of the Bell curve instead of testing. But the underlying logic is the same. We have a reference to which we compare random outcomes.

My main point is one either has "expectations" of the wheel or one doesn't.
If you have expectations from the wheel, then you can test and bet according to those expectations.
If you have no expectations, then you can not bet or test.

To me saying that "after too many Blacks the Reds are expected to make a come back sooner or later" is the same in principle to saying that over time the results will conform to the Bell curve. And it also the same in principle to saying that the house edge will eventually eat your profits. In all three arguments we have an expectation what the sum of outcomes will look like.

At least we can all agree that simply betting Black after Red offers no advantage :-)
 

Bayes

  • Moderator
  • Veteran Member
  • *****
  • Posts: 688
  • Thanked: 558 times
  • roulettician.com
Re: A Test for Randomness
« Reply #18 on: May 28, 2016, 09:37:57 AM »
I've read through your piece - interesting. I think it would be useful to add a snapshot of the sector of the wheel with the six numbers showing to add some context to the example; it's not immediately clear with simply the words and numbers (IMHO).

Thanks for the suggestion. I did think of doing this at the time, but couldn't find a suitable graphic. I'll look into it again.
 

Bayes

  • Moderator
  • Veteran Member
  • *****
  • Posts: 688
  • Thanked: 558 times
  • roulettician.com
Re: A Test for Randomness
« Reply #19 on: May 28, 2016, 02:54:20 PM »

In fact this is analogous (reverse) to what I do. But if I tell so, then I could be "accused" of gambler's fallacy. The only difference is that I take randomness for granted and I bet on the formation of the Bell curve instead of testing. But the underlying logic is the same. We have a reference to which we compare random outcomes.

Yes but the point of the test is to find out whether outcomes are random (or at least, unusual) or not. If they aren't, then you would bet *for* the non-randomness, not against it. If you're betting *for* the bell curve and randomness, having taken it for granted that outcomes are unbiased and independent - random - then that *is* the gambler's fallacy.

Quote
My main point is one either has "expectations" of the wheel or one doesn't.
If you have expectations from the wheel, then you can test and bet according to those expectations.
If you have no expectations, then you can not bet or test.

I think it's important to distinguish between the psychological attitude of "expectation" and the mathematical definition of it. They're not at all the same.

Quote
To me saying that "after too many Blacks the Reds are expected to make a come back sooner or later" is the same in principle to saying that over time the results will conform to the Bell curve. And it also the same in principle to saying that the house edge will eventually eat your profits. In all three arguments we have an expectation what the sum of outcomes will look like.

There shouldn't be any argument that the house edge will eventually eat your profits on the assumption that outcomes are unbiased and independent. You seem to be arguing that it's because outcomes *are* random (meaning anything can happen) that it's not necessarily the case that you will lose to the house edge, because if *anything* can happen, why must it happen that the house edge will prevail - yes?

But the house edge is just an unfair payout, so it's only if outcomes *are* unbiased and independent that the house edge will do its job. It's in the casino's interest to make sure that wheels are as random as possible. But if randomness meant "anything is possible" then no casino games would exist.

I think you're attacking a straw man. Who actually says that random means what you say it does?

If you agree that randomness is lack of information then how do you conclude that from "lack of information"  that anything can happen"? knowing that "anything can happen is a lot of information!
 
The following users thanked this post: kav, MrPerfect.

Reyth

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3971
  • Thanked: 1278 times
Re: A Test for Randomness
« Reply #20 on: May 28, 2016, 04:04:54 PM »
Quote from: Bayes
So you have to look at the way the outcomes are distributed, not just the "raw" probabilities.

I'm a big fan of this idea.  Its not fair when analysts ignore distribution.

 
The following users thanked this post: Sputnik

UK-21

  • New
  • **
  • Posts: 115
  • Thanked: 39 times
  • Gender: Male
Re: A Test for Randomness
« Reply #21 on: May 28, 2016, 06:15:04 PM »
This is exactly what I'm examining within my recent results. Overall, the distribution of numbers fall within statistical norms (barring one, which is still worryingly sitting at around 3.5 StdDev after 839 trials) - but when you start to examine subsets of the data, you find that the outcomes aren't quite so matter of fact.

For example, this afternoon I've played a session of 256 spins, using a system that only leaves a 2/37 probability of losing all chips on the electronic felt each spin. So I would expect to see this happen c14 times for a session of this length, and in actual fact it happened 15. All well and good. But 6 of these incidents happened within a run of just 20 spins, and another 5 within a run of 24 spins. The distribution within the range of the session is far from equally distributed, and the question is whether the "clumping" of these results within relatively short runs falls within statistical norms? Issue is that at this moment in time I don't know how to test for this (but I'm willing to learn).

One could be forgiven for thinking that roulette is as streaky as Danish bacon?   :D

 
The following users thanked this post: Reyth

Reyth

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3971
  • Thanked: 1278 times
Re: A Test for Randomness
« Reply #22 on: May 28, 2016, 06:23:01 PM »
I take randomness for granted and I bet on the formation of the Bell curve instead of testing. But the underlying logic is the same. We have a reference to which we compare random outcomes.

Quote from: Kav
To me saying that "after too many Blacks the Reds are expected to make a come back sooner or later" is the same in principle to saying that over time the results will conform to the Bell curve. And it also the same in principle to saying that the house edge will eventually eat your profits. In all three arguments we have an expectation what the sum of outcomes will look like.



 

Reyth

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3971
  • Thanked: 1278 times
Re: A Test for Randomness
« Reply #23 on: May 28, 2016, 06:32:20 PM »
I think you're attacking a straw man. Who actually says that random means what you say it does?

The straw man is in the eye of the beholder?

The problem with theory/fantasy based arguments is they only apply statistical governance to the half of the expected wheel results that suit their own world view.

A balanced approach that at once takes into account the full picture, has no self-serving world view; it simply points to actual spin results that it can see and prove.

Quote from: Reyth
There is no contradiction in my mind at all.  The odds of an individual spin remain at 1/37 AND streaks produced by those odds diminish and minimum occurrences of groups of numbers will consistently tend towards a practical target.
Yes, there's no contradiction in that. But if I understand you correctly you're taking an extra leap and concluding that after a streak the chance of the next single outcome has increased. That would mean that outcomes aren't independent.
Quote from: Reyth
I bet the other 36 numbers from the first spin...
Like Dobble has said, serious gamblers don't speak about and bet on individual spins but groups of spins.  I have not denied the chances of a single spin and am very clear on the fact that it is 1/37 which means each spin is independent AND affected by the force of equal distribution -- BOTH apply to each spin.Its not a contradiction, it is just reality which I have no need to deny.


Theory/fantasy guys try and say "of course successive streaks diminish & aggregate results tend towards an expected limit but that cannot possibly have ANYTHING to do with the current spin we are looking at" -- so we are supposed to believe unless we ignore provable phenomena we are positing a straw man?  I mean how short of an attention span do we need to have in order to forget that each of the spins that led up to our current spin were actually part of the series?


We simply need to face actual facts and reality:

Successive results of 1/37 are limited and have practical expectations. 

I don't need any theory whatsoever to prove my point:



This is a single number bet multiple successive times with each hit recorded in the spot designated (by spin number) as an aggregate total.  We see that 11,743 times our number hit on the 1st spin, 11383 times on the second spin, etc.

So the fact that the lower in this list we go, the lower the number of results we receive has nothing to do with the preceding results and the collective number of misses, its just a random phenomenon that repeats itself over and over without fail and has no significance?  This is why I refuse to believe fantasy/theory based arguments; I am not willing to disbelieve my own eyes.

I mean if the theory/fantasy arguments were completely correct, I wouldn't bother playing roulette.  Reasonable fantasy/theory guys will just break down and say "ya but so what you can't use this to make a profit" which is now a totally acceptable argument (even if I think it is wrong)  but alas, an entirely different one.

I think we can all agree here that this whole argument, both sides, is simply stupid.  I personally think the whole issue was designed and fostered by casinos to discourage system play (i.e. to encourage play for the "thrill of gambling" with a certain admixture of hopeless abandon), but w/e...
« Last Edit: May 28, 2016, 08:22:53 PM by Reyth »
 
The following users thanked this post: december

Sheridan44

  • Mature Member
  • ***
  • Posts: 273
  • Thanked: 232 times
  • Gender: Male
Re: A Test for Randomness
« Reply #24 on: June 10, 2016, 09:03:52 AM »
Bayes,

I've scoured the net for this, and I can't find what I'm looking for ( I guess I'm not using the right keywords).
What I'm searching for is determining the probabilities of a particular sequence repeating in it's exact order of occurrence.

Example: Last 4 numbers results in order ....

17
12
36
4

What is the probability of those numbers repeating in the exact same order over the next 4 spins? (You can use 2 or 3 numbers if the calculation gets astronomical)... I'm assuming the odds are going to be fairly hefty.

I'm interested in the equation to calculate this.

Regards......Sheridan
« Last Edit: June 10, 2016, 09:08:35 AM by Sheridan44 »
 

Bayes

  • Moderator
  • Veteran Member
  • *****
  • Posts: 688
  • Thanked: 558 times
  • roulettician.com
Re: A Test for Randomness
« Reply #25 on: June 10, 2016, 09:14:57 AM »
Hi Sheridan,

This is very simple; you just multiply the probabilities of the single outcomes to get the probability that the sequence will repeat exactly.

For numbers, the probability of any given number is 1/37, so for your sequence of 4 the probability would be (1/37)4

In general terms, the probability of any sequence is Pn, where P is the probability of success in a single trial, trials are independent, and n is the number of trials (length of sequence).
 
The following users thanked this post: december, Reyth, Sheridan44

Sheridan44

  • Mature Member
  • ***
  • Posts: 273
  • Thanked: 232 times
  • Gender: Male
Re: A Test for Randomness
« Reply #26 on: June 10, 2016, 09:24:34 AM »
Thank you sir. I didn't quite know how to "phrase" what I was looking for....and google sent me in all different ways (even to some numerology and occult sites...LOL). 

BTW.....I just glanced at your new article, it looks fascinating...will give it a good reading in a while!

Have a good day my friend..... Sheridan
 

Real

  • Fighting the war on absurdity one foolish idea at a time.
  • Hero Member
  • ******
  • Posts: 1416
  • Thanked: 211 times
  • Gender: Male
Re: A Test for Randomness
« Reply #27 on: June 10, 2016, 07:02:27 PM »
For a sector, four standard deviations isn't all that significant unless you've pre selected the area as being the best area and have found it to be that strong in an "out of sample test".  If you've just tracked the sample and have found that the best area is running at four standard deviations in the initial sample, then the true standard deviation of the section is actually a little closer to 2.5 ish or 2.8. 

If the section is indeed biased, then the standard deviation will move a little up and down, but the general trend will be for the standard deviation to grow larger and larger as the spin sample grows.

Best of luck!
 
The following users thanked this post: kav, Sheridan44, MrPerfect.

kav

  • www.Roulette30.com
  • Administrator
  • Hero Member
  • *****
  • Posts: 1936
  • Thanked: 925 times
  • Gender: Male
Re: A Test for Randomness
« Reply #28 on: June 10, 2016, 10:47:46 PM »
Real,
Is it more common for a section or specific numbers to be biased in today's wheels?
 

BioBrick

  • Mature Member
  • ***
  • Posts: 169
  • Thanked: 94 times
Re: A Test for Randomness
« Reply #29 on: May 17, 2017, 03:19:07 PM »
This is a good read if RNG testing and randomness interesting. But the think I noticed there that they have that ideal  randomness that the RNG must obey to be valid. All kinds of test and it's quite eye opening. For me this means that the randomness of RNGs are limited and not truly random.

https://www.random.org/analysis/
 
The following users thanked this post: MrPerfect.