Reputation: 577
Here is a big question about random numbers: can a series of random numbers contain repetition of numbers?
I am confused about what are called pure random numbers? I suppose if we wanted to generate a series of 20 random numbers in the range 0-9 then obviously there must be repetition, but because of that, we cannot say that the series is pure random numbers, right?
Upvotes: 2
Views: 438
Reputation: 223702
Generally, we do not say that one specific sequence is random. Instead, we talk about random distributions (many possible sequences and their probabilities).
When you flip a coin, it may land heads up or tails up. Heads is not random, and tails is not random. It is the act of flipping a coin that is random.
Random sequences may be drawn (or sampled) from many different distributions. When we choose a distribution, we are often trying to model some physical process. For example, if we want to model several die rolls in order, then we may draw several integers from 1 to 6. Since the die rolls we are modeling could have repetitions, then our draws may have repetitions. The sequence [1, 1, 1] has equal probability of occurring as [2, 5, 3]. Distributions in which each possibility has equal probability are called uniform.
If we want to model shuffling cards, then there cannot be repetitions. When a physical deck of cards is shuffled, each card has exactly one location; it cannot be repeated. In this case, the sequence [1, 1, 1] cannot occur. A distribution for shuffling cards would also be uniform (every possibility has equal probability), but it would not contain sequences with repetitions.
The methods of computation used to select a sequence from the random distribution vary depending on the distribution. To create a sequence without repetition from a generator that does repeat, we can simply collect a sample from the generator, test whether it is a repeat, and, if it is a repeat, discard it and try again. This works, but there are more efficient ways to compute such sequences.
There are also distributions with unequal probabilities, which occur in situations such as finding the average of many samples of a distribution or in samples of arrival times of customers.
Upvotes: 4
Reputation: 2778
Random numbers indeed contain repeating sequences. Your intuition being incorrect here is pretty reasonable because one of the best way to tell the difference between a truly random sequence and a human trying to generate an apparently random sequence is that things repeat fewer times in the human-generated sequences.
Another one of the important properties of randomly generated numbers is that the next number's probability of appearance should ideally be unrelated to the previous numbers observed. For example, flipping 99 coins as heads on a random coin, unlikely as this might be, doesn't affect the odds of the 100th coin coming up heads. You may have a good case that your coin isn't actually balanced, though...
EDIT: In response to a question posed here about determining if a series of numbers is random or not I direct interested readers to the wikipedia article on statistical randomness: http://en.wikipedia.org/wiki/Statistical_randomness
The success or failure of a string of numbers (and so the generator of those numbers) is usually measured by applying a battery of randomness tests. For example, if you see that a large group of numbers has an excessive number of one digit you would reasonably conclude that the distribution of numbers is not uniform. Similarly, if you only count all of the numbers that happen to occur after a 0 in your list of random numbers you should expect these to be a uniform distribution too. You also expect a certain number of double digits (a '00' or a '11) in your distributions as well. There are an unlimited number of these tests which you could throw at a sequence of numbers, and presumably the fewer tests it fails (compared to another source of randomness with the same tests) the 'better' of a job it does approximating a random number sequence.
The ability to determine the output of a random number generator based on the state of a machine or make it reliably produce the output based on the input does not make it more or less random. Only the randomness of the output is important. However, in applications of randomness the ability of an attacker to determine what a random number is commonly is extremely bad for the application. (Cryptography and gambling applications in particular.)
Upvotes: 3
Reputation: 8634
Of course a series of random numbers may contain repetition of numbers. When you throw a purely random dice, it can also fall on the same number twice in a row!
Upvotes: 5