GeekGirlCon Blog

The Riddle of Randomness

Written by guest-blogger and GeekGirlCon participant Jason Thibeault of Free Thought Blogs, @lousycanuck

 

Last year at GeekGirlCon, I had the privilege of participating in the Do-It-Yourself Science Zone teaching kids about probability and randomness.

However, being The Riddler, I had a secret agenda in mind while doing my demonstrations–I have a trio of ten-sided dice that I use to gamble with my fellow super-villains, and I wanted to figure out which of them, if any, had a bias for or against any particular number. What better way to find out than to offload the boring task of rolling those dice over and over again onto unsuspecting passers-by?

More action from the DIY Science Zone at GeekGirlCon '14 at Washington State Conference Center in Seattle, Washington, on Saturday, October 11, 2014. Source: Flickr

More action from the DIY Science Zone at GeekGirlCon ’14 at Washington State Conference Center in Seattle, Washington, on Saturday, October 11, 2014. Source: Flickr

In order to determine whether a particular die has a bias for or against a number, it takes a lot of rolls. If you gently put a die down on the table, you’re adding no entropy to it, and so you can easily predict what face it’ll land on–probably because you’re the one putting the die down, and you can put it on whatever face you want. Shaking the die, throwing it, and throwing it onto a surface that is not particularly smooth, all adds entropy to the throw. Entropy is change, chaos–the opposite of order. It steals energy from the universe and from the precious order that humankind so loves, so shaking the die is putting energy into it to increase the chaos. The more chaotic the roll, the less likely you are to be able to predict where it will land.

Except not all dice are perfectly smooth or have perfectly sharp corners or are weighted exactly uniformly–the corners are rounded, having been tumbled smooth; the faces are carved with the numbers on them; the materials might have pooled in one side of the die more than others. That means that there may already be a bias in the die, that causes it to land on one face more than others.

Humans really don’t understand randomness. If you ask them to put a bunch of dots on a page completely randomly, they try to space them out, to cover as much of the page as possible. You care where you put your next dot after putting your last, because you have to move your arm mechanically from dot to dot to dot, trying also to stay on the page and trying not to cluster them too much. I had the kids who stopped by draw me some dots on a page in order to show them what randomness really looks like. Real randomness doesn’t care about the position of the last dot when it puts its next, using a computer program that–while not truly random, because it’s a computer–is still way better than humans. With real randomness, you’ll get clusters of dots, big empty white spaces, dots that touch or even overlap the edge of the page, and sometimes even one another. It would look something like this:

Randomly placed blue dots, computer generated

Randomly placed blue dots, computer generated

With a truly random die roll, and with a perfectly fair die, you would expect that over time, every single face has exactly the same probability of coming up as any other face. But since we already know that dice are probably not perfectly fair, any one die might land on one face more often than the others. So I had the kids who came along roll one of three special dice, and I recorded the results in my computer in a little program I whipped up to build graphs. I also built a “virtual die” that let the computer pretend to roll a ten-sided die over and over and over again, in order to show what a “fair die” graph might look like with each bar looking roughly the same height. It looked like this:

Graph of randomized fake die rolls over time - pretty close to exactly even

Graph of randomized fake die rolls over time – pretty close to exactly even

If you look at the numbers that it took to make a graph that looks mostly flat, like the randomly generated rolls, it took more than 200,000 rolls to get to that stage. If it was an unfair roll because of a biased die, you would see an obvious spike or valley on that graph. But even with as many rolls as I’ve done on the simulated die, it still has some slight variation — as you can see, there’s a peak of 21194 rolls landing on 1, and 20786 rolls landing on 3. But if I were to run the simulation with another 200,000 rolls, I would expect that it would look similar — mostly flat, with some small bias against some other random set of numbers, not necessarily 1 and 3 again.

Here are the results I had for each of the three dice I had the kids coming by roll for me. I had a red die, a grey die, and a black die. Each of them got separate graphs.

The Red die's rolls

Red die’s rolls

The red die was rolled a total of 1314 times, and has a peak of 152 rolls landing on 6, and a trough of 115 rolls landing on 8.

The Grey die's rolls

Grey die’s rolls

The grey die was rolled a total of 1110 times, and has a peak of 137 rolls landing on 3, and a trough of 86 rolls landing on 9.

Black die's rolls

Black die’s rolls

The black die was rolled a total of 814 times, and has a peak of 87 rolls each landing on 5 and 7, and 68 rolls landing on 8.

My conclusion: I’d need to come back and get many, many more kids to do the demonstration before I could find any sort of bias in any of my dice. I guess gambling Penguin’s umbrella away from him is going to take way more time and careful planning.

If you’re interested in finding out how to determine statistical significance in a study like this, here is possibly the best, most extensive study on dice rolls and entropy. Study up, and maybe one day you too will become a powerful supervillain like me!

 

 

Guest Contributor
“Rock On!”

2 responses to “The Riddle of Randomness”

  1. […] two years, participants have made light, slime, neurons, and raisins dance. They’ve explored the Riddle of Randomness and crime-scene fingerprinting. Scientists and non-scientists alike have learned loads–all […]

Leave a Reply

Your email address will not be published. Required fields are marked *

Join The Discussion #GeekGirlCon

Thanks to the GeekGirlCon GeekGirlCon Super Sponsors

  • SAM
  • EA
  • JONES SODA CO.
  • gay city
  • Microsoft