One topic in mathematics and computer science that always confused me were random numbers. I tried searching for the exact meaning but it feels kind of abstract and incomplete.

Mathematically random numbers are defined as

Random numbers are numbers that occur in a sequence such that two conditions are met: (1) the values are uniformly distributed over a defined interval or set, and (2) it is impossible to predict future values based on past or present ones.

I have no problem with 2nd point but 1st feels kind of abstract because we can't specify the defined interval or set. Not just that but if all the values are to be equally distributed it kind of isn't truly random any more.

Supposing true random number generator(generating numbers between 1-9) generates 100 numbers with no 9s. In this case we can say that the probability of 9 appearing is high in the next 10 numbers. But if the probability is high how are the numbers truly random ?

Also supposing a true random number generator(generating numbers between 1-9) generates 1million consecutive 3s. Is this random ? Most people will say probably not, but what if that same generator generated over 100 million numbers and found uniform distribution among numbers between 1 and 9. This comic illustrates this point.

For me the first point is pointless as we can't define an interval or set. This basically means that for truly random numbers the probability of 1 million consecutive 3 is as equally likely as an equal distribution of numbers.

I guess in the real world you would define numbers as random only as long you can't find a sequence to tell what the next number will be. Many articles say the digits inside irrational(√2, pi) numbers can be treated as random. In my opinion they are only treated as random as long as we don't know the right sequence. That essentially means no numbers are truly random, we just don't know their sequence.

TLDR How does the mathematical world define random numbers ?

  • $\begingroup$ 'Generating random numbers between 1-9' means that the interval is 1,2,..,9 and the chance that you will get '4' is equal to the chance of getting any other number in that interval. That is the translation of (1) to a more real problem. So what do you mean with 'we can't define an interval or set' ? $\endgroup$ – Ryan Apr 11 '15 at 8:12
  • $\begingroup$ @Ryan my point is something that is improbable doesn't mean it won't happen. Supposing we generate 1 million random numbers but 9 doesn't appear in them.That is incredible unlikely but not impossible. Maybe in the next 3 million generations 9 appears enough number of times to satisfy (1).But at first glance anyone who looks 1st 1 million generations would say its not random as it invalidates (1), but that maybe different when we increase the interval or set to see if it evens out. So numbers may seem not random in some interval or sets yet appear random when that interval or set is increased. $\endgroup$ – minusSeven Apr 11 '15 at 8:53
  • $\begingroup$ Ok, there seems to be some confusion (for me or for you). You seem to be asking how we can recognize a random number generator, instead of discussing the definition of a (theoretic) random number generator. First: Do you agree that the definition you gave, is a good one? I'm not asking if you would be able to recognize one, but do you agree that those two conditions determine a random number generator? Example: We have the interval 1,...,9 and each number has equal chance of being shown/produced (this is condition one). And then condition two. That would be random, right? $\endgroup$ – Ryan Apr 11 '15 at 9:20
  • 1
    $\begingroup$ Testing whether something is random is harder. Your example shows that we cant really be sure if something is random or not. However, we can gather evidence. Lets say our machine gives us a sequence of one million '9'. Then this would give us the idea that the machine is not random, but just spits out '9'. But how strong is this evidence? Look also at en.wikipedia.org/wiki/Randomness_tests $\endgroup$ – Ryan Apr 11 '15 at 9:20
  • 1
    $\begingroup$ In mathematics, sequences are generally infinite. $\endgroup$ – celtschk Apr 11 '15 at 9:21

OK, your problem with 1st point is your wrong interpretation of that. As I see, it means if you take a fixed number of outcomes the probability of every outcome is equal, i.e. if you generate 100 true-random numbers from 0-9 there are 10 0's, 10 1's and 10 of each (the values are uniformly distributed over a defined interval or set). This probability never changes, so your view that it might not give any 9's in first 100 outcome is, uh according to me, wrong. Even if we suppose no 9's came in first 100 outcomes (assumption, so just assume.) then you can't say what will happen in next generation since it must at least follow point 2 according to you. In real world there is nothing as random, but anything which is too complicated or difficult to establish a series is generally termed as random. In mathematical study of probability we assume true randomness, however there is nothing as such. There is the butterfly effect, because of which even if a butterfly flapped it's wing in different direction, it would lead to a storm. So every minor thing counts, even the air that is a kilometer far away from the place of tossing the coin, hence no accurate predictions can be done. If we are given godly (infinitely powerful) computer that could calculate that, we could predict the future. But there's something more, even if you take real world variables and repeat the experiment many times (say n times), then you find the probability of an event, you get that approaching true-random variable's probability when n tends to infinity, i.e. $n\to\infty$. You can look up an example of a probability calculation that I just did with the computer (yes computer are not truly random) for Coupon Collector's problem and repeated it a crore times (yes computers are fast) and I got 14.6999 or so which actually is 14.7. Think if we repeated it many many more times? (infinite indeed to be accurate, maybe since debatable) There are many other examples of such calculations which you can easily find.

I think that explains my view of random to all. :D


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.