Wednesday, February 18, 2009

Predicting the unpredictable...

I'm a little crazy, so this week I started trying to predict numbers in a random sequence. I actually had astonishing results with only a few calculations.

As you know, a 100% random sequence is equiprobable. If you generate numbers from 1 to 50, in the infinite all should have come out infinite/50 times. Furthermore, you can for example analyze the space that took for similar numbers to come out. Its distribution should also be 100% random. Every relationship you establish in the sequence should be random. How does this help us. Well, if there's a pattern occurring, probability says it shouldn't occur anymore to maintain randomness.

I tried this theory with a pseudo-random generator and a "true random" atmospheric noise based generator, generating a sequence of numbers between 0 and 49. As you know, the probability of guessing the next number by pure chance is 1/50 = 2%.

Results (Percentages at which the predictor became stable):

Pseudo-random sequence: 1.4% (-30% than chance)
True random sequence: 2.4% (+20% than chance)

Astonishing isn't it? :) And I think the predictor can be greatly improved yet.

2 comments:

Unknown said...

:)

The probability of throwing a fair coin 1000 times and having all these times the same result is the same as any other pattern. In this case we could think that to keep this randomness, there is a greater probability on the next throw for the other side to come up, but the fact is this equal distribution only happens on infinity and every next throw has the exect same probability as the last one, and is totally independent from the other.

Pedro Caleiro said...

If you knew the position and speed of every particle in the universe at a given instant you could theoretically foresee all the past and future of the same universe.
So, there's no such thing as randomness. :D