With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

No credit card required

Tests on Randomness

To test if a sequence of numbers, occurrences of diseased cases, or other data are randomly drawn from an underlying distribution or not is the topic of this part. Even though this might not sound difficult, it is. Let us assume a coin is tossed 10 times with five times heads and five times tails. This is a result we would expect, at least in the long run. However, if the sequence of (H)eads and (T)ails is HHHHHTTTTT you would argue against the hypothesis that the sample is random. The sequence HTHTHTHTHT looks ‘more’ random, but a little bit artificial. A sequence such as HHTHTHTTTH seems to be ‘more’ random than the two sequences before. So the question remains how to decide on randomness. Computer programs can only produce pseudo-random numbers due to algorithms generating such numbers. Nevertheless, if the cycle is long enough these numbers should appear to be random. A test on randomness can be used to detect if a random number generator works well (do not reject the hypothesis of randomness) or not (reject the hypothesis of randomness).

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

No credit card required