Take the 2-minute tour ×

I am building a program using various methods of generating psudo random numbers. With reasonable results. I of course get better results (statistically speaking), if I use either the inbuilt random number generator in visual C#, or some other formal psudo random code where the method is not known to me. This is not my question.

My question is, given any of the methods used, and given the fact that any computer generated random number is done according to a specified formula and code logic, it is not by definition truly random. Hense the term psudo random.

Given that fact, is it possible to accurately predict what the number will be. Or at least predict it more accurately than a good guess. My research says that anything guessed correctly up to 73% of the time is really only good guessing. So in order to be considered accurate prediction, it must be able to show correct "guesses" more than 73% of the time in order to say it is not a guess.

Assume we dont know the seed, or if we do know the seed, then we dont know the formula used to get the result from the seed.

The below was edited after I accepted an answer and is for future people woundering what I meant.

up to 73% is a "good guesser" - the accepted answer says there is no such thing. So I will clarify.

In the context of the documentary that I watched they weighted things as follows (my words not direct quotes of the program):

Below 37% is just plain wrong (or a poor guesser).
37% to 63% is the expected range of a normal persons ability to guess, some poorly some well. On average it comes to around 50%.
Really "good guessers", were able to break the 63% barrier and sometimes by a large amount either because they knew what their counterparts (in the case of twins) might answer and therefore answered likewise, or had some other system (in the case of fortune tellers and the like).

Tests were done to determine these systems and it was found that comming close to the 73% barrier by anyone was almost impossible, and it was simply impossible to do it on a regular basis (i.e. more than once) showing that they got lucky the first time round. So anyone who got more than 63% but less than 73% on a regular basis was simply labeled a "good guesser".

One of the answers below suggest if you flip a coin 4 times and you guess right 3 out of 4 times you get 75%. But to do it 10 or 100 times is much more difficult. In the explanation above, the first case would show you were able to predict the future accurately enough to make a difference. Continuing with the same test under the same conditions, ie another 4 flips, and another 4. Would almost always bring the person well below the 73% mark showing them to be at best a "good guesser".

I only mention this to clarify. Its not actually part of the question. Thank you all for your answers and suggestions.

share|improve this question
Even if the program is generating either 0 or 1 (as opposed to a number between 1 and a trillion), the ability of someone to "guess" correctly with 51% accuracy over a sufficiently long series of trials is strong evidence the program is not behaving randomly, since the probability that someone could guess a truly random (50/50) number this accurately for a long run of trials is minuscule. (Emphasis on the "long"). So where are you getting 73%? –  Seth Aug 18 '11 at 1:54
@Seth, see the comment further down by andrew cooke. All I know is, if I flip a fair coin 10 times in a row, over 10 days, I most certantly can guess much better than 51%, in fact usually closer to 61% over the 100 throws. I dont consider myself to be a good guesser. Funny enough, I get worse (but not much) when my girlfriend threw the coin. On a 6 sided dice, I get somewhere like a lowley 10% right. But I think (not sure) that does equate somehow to well in excess of 51% when the numbers are crunched properly. Something to do with the six sides as opposed to two. Thanks for your answer. –  Francis Rodgers Aug 18 '11 at 2:18

3 Answers 3

up vote 2 down vote accepted

Based on the conversations in the comments, I think there may be some misconceptions about probability at work here.

You mentioned being able to guess coin flips correctly about 61% over a fairly large (100) number of trials. This suggests your coin flips are probably biased -- not truly 50/50. The fact that you don't do as well when your girlfriend flips the coin also points to this conclusion. If the coin toss is fair, it cannot be influenced by your guess any more than your guess can be influenced by a (future) coin toss. If you guess heads, there is a 50% chance you will be right. Same if you guess tails.

There is no such thing as a "good" guesser, but guesses are sometimes lucky.

You also wrote that a 10% correct-guess rate on a dice roll "equates somehow to well in excess of 51% when the numbers are crunched properly".

You have the right idea here -- it's unreasonable to expect someone to guess a dice roll half the time. In fact, they should guess correctly roughly 1 in 6 times -- about 17%. If someone is able to guess significantly better than 17% over a long series of trials, either they got really lucky (and with a bit of math, you could say exactly how lucky) or the dice are weighted.

So what about this 73% number that's been floating around? Just as you'd expect to predict about 50% of coin tosses or 17% of dice rolls, it's possible the makers of the documentary determined that 73% was the "right number" to use in this particular context. One way they might have come by this number is to have first done a test run to see how well non-twin siblings could predict each others' responses. If these tests showed a 73% success rate, then identical twins would have to beat this to prove they can do better than mere siblings. There are plenty of technical details being glossed over here (in particular, how do we distinguish between twins who are actually better, and twins who just happened to get lucky?), but that's the general idea.

The answer to your actual question: No, you can't predict the next number a cryptographically secure pseudorandom number generator will spit out. If you happen to guess correctly, you just got lucky. (Or you've discovered a previously unknown weakness in the algorithm).

share|improve this answer
Thanks for your answer. Instead of just arguing that the tests are fixed in some way, you explained more about how the tests were conducted and the reason this figure was obtained and used, which I personally found more interesting than the actual answer to my question, and it is helpful in what I am doing. I am going to pick your answer as the choice because it gives more detail than the others on the magical 73% figure which I now feel is more important than the answer to my question. Thank you kindly for your input on this. –  Francis Rodgers Aug 26 '11 at 11:54

where did you get 73% from?! statistics doesn't really work like that. you are ignoring two factors:

  1. what is important is not the percentage, but the numbers of wrong and right. if you guessed a coin toss three times out of four that would be 75% right, but could easily be luck. in contrast, guessing 75 times out of a hundred, while still 75%, is very unlikely to be down to chance.

  2. guessing something from many choices is more impressive than guessing between few options. so guessing whether a coin is heads or tails is relatively easy - you will be right half the time. but guessing a random number, which might have any value from 0 to a million, say, is much harder - even if someone only guess that correctly 1% of the time, it would be very unusual.

anyway, to answer the question, with enough pseudo-random numbers you may start to predict certain patterns (for example, successive numbers may make a pattern in a "space" of some dimension). that might not give you the next number, but may give you enough to say whether it will will be larger or smaller than average, for example.

and if you know the underlying algorithm then, you in some cases you can work backwards from the random number (or a series of values) to find the "internal state". once you have that you can predict all future numbers, because you are effectively running the same program in parallel.

random number generators designed to avoid these two problems (and some others) are called "secure random number generators".

share|improve this answer
"with enough pseudo-random numbers you can start to predict certain patterns". That is not true for cryptographically strong generators. –  Thilo Aug 18 '11 at 1:53
true, i will clarify. –  andrew cooke Aug 18 '11 at 1:55
As you pointed out, it is harder to guess right 75 out of 100 times, than it is 3 out of 4 times, but both are 75%. The figure of 73% for to be considered accurate prediction was from a documentary program I watched to determine if identical twins can accurately predict the responses of each other. They failed, getting scores of 69 and 71%. Putting them in the relm of good guessers as opposed to the "virtual telepaths" they were saying they ware. They also tested fortune tellers and others who claimed they can predict an outcome accurately. –  Francis Rodgers Aug 18 '11 at 2:02
Their research shows that in order to be considered "accurately predicting" something, you must be able to predict greater than 73% of the time. Otherwise you are just good guessing. I assume they were talking about tests with more than 4 questions. Thanks for your repsonse. –  Francis Rodgers Aug 18 '11 at 2:04
ok, so the 73% limit they were using there would have been calculated for the number of guesses that they made in the test - it's not a universal threshold, but one tailored for that particular case. [edit: right, more than 4 guesses, but less than a hundred, i would guess] –  andrew cooke Aug 18 '11 at 2:05


No. To prevent exactly that there are cryptographically strong pseudo random number generators. Even if you know all the parameters (except the seed), you cannot predict the next number. Just like you cannot invert a cryptographic hash, or decrypt an encrypted message without the key.

share|improve this answer

Your Answer


