- Topic: Randomness
- Authors: Douglas Blank, Bryn Mawr College;
- Dependencies: Python, Statistics
- License(s): Creative Commons, Share, with attribution;
- Audience: Undergraduate;
- Development Status: In development
- Lectures: 2 lectures
- Keywords: information, entropy
This module explores the idea of randomness from a variety of perspectives.
What is randomness?
What is randomness? In everyday usage, we often mean that an event is random if it is unexpected or unpredictable. For example, if someone came up to you and spontaneously said "I like ice cream," you might say "That was random!" Or if a picture frame suddenly fell off a wall, then we might call that random. People have an ability to detect randomness. But how good is this ability?
A Random Magic Trick
For this trick, you will be the magician. You need an audience and a volunteer. Have your volunteer go up to the front of the classroom. You, magician, will turn around with your back to the front of the room. Have your volunteer write down a sequence of 20 H's and T's, from left to right across the board. They should try as hard as they can to make the sequence look random.
After the completing the first sequence, now have your volunteer write down (either above or below the first sequence) a second sequence. However, this time, they should flip a coin and write down exactly the results of the toss, in order, from left to right.
After the completing the second sequence, your task, magician, is to identify which row is the one from the coin tosses, and which one is from the volunteers mind. Can you do it? Take a look at the sequences below, and try to tell which one is which:
H T H H T H T T T H T H T T H H H T H T H H T T T H H H H H H H H T T H H H H T
It turns out that it is usually very easy to tell them apart! Humans (who don't know the trick) will often create a pattern that is more mixed up than what one finds in "real" randomness. For example, look for the row with the longest run of H's or T's. That will be the row from the coin tosses. In this example, the second row has a series of 8 heads, and it was created "randomly" by flipping a coin. A human would never let that stand, and would shuffle those up. Ironically, by shuffling the sequence to make it look more random, the volunteer exposes that they are really a human creating a sequence to look random, and thus gives away the secret that it isn't random at all!
Also, a human would not create the following sequences:
H T H T H T H T H T H T H T H T H T H T H H H H H H H H H H T T T T T T T T T T
Those are much too ordered and predictable. So, a random sequence of H's and T's can't be too mixed up, and can't be too ordered.
By the way, does this trick always work? No, but you would be surprised how often it does!
Probability and Predictability
The Random Magic Trick provides a good example of many of the ideas that involve randomness.
- This is a reference
- This is a reference
- C.E. Shannon, "A Mathematical Theory of Communication", Bell System Technical Journal, vol. 27, pp. 379–423, 623-656, July, October, 1948