A group of dice rolling
Photo by Robert Stump on Unsplash

Nothing is Random, Not Even Rolling a Die

Kaveh Bakhtiyari
Apr 30 · 13 min read

In ancient history, the concepts of chance and randomness were intertwined with that of fate. Many ancient people threw dice to determine fate, and this later evolved into games of chance. Today, we are still using randomness in our daily life explicitly or implicitly. It is however very crucial to understand the underlying concept of randomness and its importance. Firstly, we should understand what defines random value as random. Randomness has multiple applications in finance, game theory, cryptography, artificial intelligence, and many more. So, one of the challenging questions is how likely we can predict it? The answer can bring us to the next level of possibilities in the world. For the moment, we should learn how these random phenomena can affect our life, and how we can make a benefit from that.

Randomness in our life

We deal with randomness almost every day in different contexts. We see and interpret the events around us as random, and sometimes we make a random decision, and more interestingly other times we ask others to make a random decision for us.

To name a few examples of randomness in our life, we can mention almost everything that we call “Good luck” or “Bad luck”; winning a lottery; playing a game of chance such as backgammon, poker, etc. [1]; watching games such as a football match; selecting an arbitrary decision among many without any priority; interpreting someone else’s behavior; and so on.

If you want to make sure the event was random, just ask yourself “Why?”. If you could come with a reasonable argument to answer, then that was not random.

In the rest, we are going to discuss a few important questions, such as:

  • What is randomness?
  • How is a random number selected?
  • Is a random event (truly) random?
  • Why should I care about it?
  • What can I do with it?
  • Can I predict a random result?
  • What should I be aware of?

In literature, randomness is defined as:

“Randomness is the apparent lack of pattern or predictability in events. Individual random events are by definition unpredictable, but since they often follow a probability distribution, the frequency of different outcomes over numerous events (or trials) is predictable.” [2]

Professor Theodore Motzkin pointed out that “while disorder is more probable in general, complete disorder is impossible [3].” For example, when we are throwing two dice, the outcome of any particular roll is unpredictable, but we can calculate and predict that a sum of 7 will occur twice as often as 4. Later in this article, we will discuss this in the random generation section.

History

Photo by Joey Huang on Unsplash

The Chinese people of 3,000 years ago were perhaps the earliest people to formalize odds and chance. The Greek philosophers discussed randomness at length. It was only in the 16th century that Italian mathematicians began to formalize the odds associated with various games of chance. The invention of calculus had a positive impact on the formal study of randomness. Although randomness had often been viewed as an obstacle and a nuisance for many centuries.

In the 20th century, computer scientists began to realize that the deliberate introduction of randomness into computations can be an effective tool for designing better algorithms. The early part of the 20th century saw a rapid growth in the formal analysis of randomness, as various approaches to the mathematical foundations of probability were introduced. In the mid-to-late-20th century, ideas of algorithmic information theory introduced new dimensions to the field via the concept of algorithmic randomness. As a result, some of the randomized algorithms even outperform the best deterministic methods.

Applications

Randomness has many applications in different fields and domains such as, but not limited to:

Physical Sciences

In the 19th century, scientists used the idea of random motions of molecules in the development of statistical mechanics to explain phenomena in thermodynamics and the properties of gases.

Biology

Several authors also claim that evolution (and sometimes development) requires a specific form of randomness, namely the introduction of qualitatively new behaviors. Instead of the choice of one possibility among several pre-given ones, this randomness corresponds to the formation of new possibilities.

Information Science

In information science, irrelevant or meaningless data is considered noise. Noise consists of numerous transient disturbances, with a statistically randomized time distribution.

Mathematics

The mathematical theory of probability arose from attempts to formulate mathematical descriptions of chance events, originally in the context of gambling, but later in connection with physics. Statistics is used to infer the underlying probability distribution of a collection of empirical observations. For the purposes of simulation, it is necessary to have a large supply of random numbers — or means to generate them on demand.

Statistics

In statistics, randomness is commonly used to create simple random samples. This allows surveys of completely random groups of people to provide realistic data that is reflective of the population. Common methods of doing this include drawing names out of a hat, or using a random digit chart (a large table of random digits).

Politics

Random selection can be an official method to resolve tied elections in some jurisdictions.

Medicine

Random allocation of a clinical intervention is used to reduce bias in controlled trials.

Religion

That can be conflicting to have the concept of randomness in a deterministic era of religions. However, in some sectors of religions, there are some concepts and practices which are aligned with randomness such as “Free Will” or “Cleromancy”.

Randomness Predictability

Random must be unpredictable or at least very difficult to be predicted. Most of the randomness that we observe is more “Chaotic” rather than “Random”. All these randomnesses are based on some complex reasons. Theoretically, if we can access the randomness features, we can predict that.

Why should I care?

Randomness and its predictability have a huge impact on our daily life. So that if anyone can predict the next random value,

  • they can win the games in the casino
  • they can win the lotteries
  • there would be no security whatsoever
  • Online Security
  • Banking/Card/Online payments
  • there would be no optimized algorithms
  • there would be no powerful artificial intelligence (AI)
  • we will have noisy telecom communications (if there would be any)
  • … and many more.

The interesting thing about random numbers is that they allow you to encrypt data. They let you do mathematical operations which are very easy in one direction but very hard in another. But the problem is that if your numbers are not random, then an attacker may be able to guess what your sequence of numbers is and eventually can get into your system.

Random Generation

One of the usual random number generators is a die. A 6-sided die is the most common type of die which can be used to generate a random number between 1 to 6. Here, we would like to discuss the differences between throwing 1 die, 2 dice, and n dice. In this section, the default assumption is a 6-sided die.

1 Die

The chance of appearing a number in 1 die (top figure) vs 2 dice (bottom figure).

If we roll a die, the chance for each number to show up is ⅙ = 0.1666 which is almost 16.66% of the chance for each number.

If we throw a fair die “n” times, there is an equal chance of seeing all numbers.

2 Dice

When you throw 2 dice, the total number is between 2 and 12. And there are six combinations for the sum of “7” [(6–1), (5–2), (4–3), (3–4), (2–5), (1–6)].

The chance of seeing a total number of 7 is much higher than other numbers.

n-Dice:

After rolling 50 six-sided dice, the mean and standard deviation to expect is equal to:

As we increase the number of dice, the probability distribution of numbers shown up is becoming more like a Gaussian normal distribution.

The chance of appearing the summation after 20 rolls

So, obviously, we can see that the chance of having a generated number using two 6-sided dice is not equal to using a 12-sided die.

The chance of having a number between 1 and 12 is not equal by throwing 2 6-sided dice vs 12-sided dice.

Let’s look at rolling a dice

Now, let’s dig deeper into our random number generator, and see how effective this is in random number generation.

When you throw a die, the rules of physics apply to the die’s motion. Some of the important factors are the shape of dice; the amount and angle of force throwing the dice; velocity and acceleration of hand while throwing; vertical distance to the surface; viscosity of the air; friction and elasticity factors of the table; the initial position of the die.

“The die throw is neither random nor chaotic.” [4]

If you can control all these factors, you can accurately predict and control the outcome of the dice roll. This is not limited to dice rolling, but that would be the same for other random-looking events such as casino roulette.

Random Thought Process in Human

Let’s assume that someone asks you to choose a random number between 0 and 10. Now, you have selected a number, let’s say it is “8”. How did you select your number? What was your thought process?

Nobody knows exactly how a person can develop a random generator to select or generate a random number. One possible scenario might be that people tend to select an “uncommon” number. The factors involved can be mood, fatigue, recent conversation, past experiences [5]. So if the external factors are being involved in picking up a random number, so how fair a person can be in randomly selecting a number.

The following distribution is the result of an experiment asking 8,500 students to pick a random number [6].

The distribution of random numbers selected by the students. — Number 7 is the most selected number between 0 to 10.

If the randomness process was fair or near to fair, we should expect nearly an equal chance for each number to be picked just like the chance in a fair 6-sided die. But according to the results, the distribution is not even close to being fair, and interestingly number 7 has been selected significantly more often than the other numbers.

What did make number 7 so special?

As it was discussed before, human beings try to pick the uncommon number as random. So we can go through the list to find out which number is the most exotic in the list.

1: well, it is just one, and the first number on the list
2: all even numbers are divisible by 2
3: is a prime, but also available in 6 and 9
4: is a cube
5: we have 5 fingers
6: is 3x2
8: is 4x2 or a power of 2
9: is a cube (3x3)
10: our system is in base 10, and the last number in the list

Here, 7 seems the most exotic number on the list.

Randomness process in Computer

Computers use algorithms to generate a random number. Yes, that’s right, they calculate a random number. Computers can generate random numbers by observing some internal data such as date/time, CPU serial number, hardware specifications, and as well as some outside data, like mouse movements or fan noise, which are not easily predictable. This is known as the “pseudo-random” generation.

In the Oxford dictionary,

“pseudo-random” means: “(of a number) satisfying one or more statistical tests for randomness but produced by a definite mathematical procedure.”

“pseudo” means: non genuine, spurious, or sham.

So, the results appear random, even though they are not. If you have ever been told to wiggle your mouse when you are encrypting a file — well now you know why — to get good random numbers.

If something is truly random, it is impossible to be predicted. If something is pseudo-random, it is designed to be almost impossible or at least super difficult to be predicted.

Is random, truly random?

By a definition of the word random in this context, it means that, in terms of cause and effect, an effect must occur without any cause. In a deterministic universe, at a macroscopic level, this is impossible.

Black Box: Secret Recipe

Photo by Fred Kearney on Unsplash

In computer systems, the algorithm of generating a pseudo-random number is unknown to the public. Usually, production-level pseudo-random generators are a black box, and no one knows what is going on inside. This would make it more difficult to predict the generated number. Also, they usually integrate it into hardware chips to make it more secure such as hardware-based random generator chips by Intel called “RdRand”. In December 2013, FreeBSD’s developers removed support for using RdRand directly as a source of randomness, saying they could not trust it. FreeBSD’s developers called out Via’s chips too. This controversy shows why generating random numbers that are random and not predictable is very important.

Randomness and Artificial Intelligence

Randomness has proven a useful component in machine learning. Any feasible Artificial General Intelligence (AGI) would likely require machine learning, which itself is relying on randomness in some cases. Randomness is necessary to achieve generality in theory. So, basically, AI needs randomness, and if any system (either intelligent or dumb) can predict the randomness, then that was not random first hand.

Real-World Examples

Sometimes, some events have multiple complex features which we may not be aware of. Exactly like rolling a dice. But unlike dice, we do not call them random, because we have some limited knowledge about them. Such as FIFA World Cup. If you want to predict the FIFA World Cup, you can do it, only if you can predict every match correctly. If you fail the prediction in one match, it is very likely that you will fail in the finals. Even for predicting a single match, we should know about the team history, players’ characteristics and strength, personal problems, weather forecast, how likely a player may make a wrong decision leading to a red card or penalty, and so many more. Unless we know about all affecting factors, we can not predict such complex outcomes.

… and that’s why they fall into a “Markov chain”.

Markov Chain

Snake and ladder is an excellent example of the Markov Chain.

A “Markov chain”, named after the Russian mathematician Andrey Markov, is a model describing a sequence of possible events in which the probability of each event depends only on the state attained in the previous event. Markov chains have many applications in real-world processes, such as studying cruise control systems in motor vehicles, queues or lines of customers arriving at an airport, currency exchange rates, and animal population dynamics [7]. Markov chains can be used to model many games of chance. “Snakes and Ladders” is represented exactly by Markov chains.

At SSENSE, we use Markov Chain on multiple occasions, such as forecasting inventory levels, optimizing Search Engine Marketing (SEM), and evaluating Customer Lifetime Value. For example, for forecasting the inventory levels, once we have the probability of receiving the inventory at a specific time, we run a random test to simulate the future, and we can test what could be the outcome if different scenarios happen. As time goes on and we get closer to our target future, our assumptions become more rigid and solid, and our simulated future becomes much closer to the realistic future.

Weather Forecast

The other example of the “Markov Chain” is the weather forecast. You can only forecast the weather accurately if you could do it correctly for its previous days.

Weather forecast is another example of the Markov Chain application.

As we try to forecast the weather in the far future, then it could be like predicting the FIFA World Cup winner before it has been started, or even one year in advance. As we get closer and closer to each day, the weather forecast will become more accurate since the number of hidden/unknown factors would be minimized.

Lesson Learned

If there is not enough information or reasoning about an event, the outcome can be defined as random. As discussed, there is nothing truly random, however, sometimes actions may fall into the random definition based on the available knowledge. A football match by itself is not random, and it is mostly based on skills. We can only justify the results when the match is over based on the observations.

Do not expect a precise prediction using AI if your target outcome is near to random.

However, predicting the result of a match or forecasting the weather one year from now, seems random to us. If there is something random or pseudo-random, do not expect any system (either human or AI) to predict it accurately.

Is there anything truly random?

Short answer: Almost-yes

There are few events in the world which based on our current knowledge are random.

The first one is the decay rate of radioactive materials. The time between decays of atoms in a sample of a radioisotope or thermal noise in a resistor. The next, in quantum theory, quantum properties that are random are truly random. As Southpaw Hare brought up, quantum effects are truly random, at least by our current reckoning in physics. An electron does not exist in any one place at any one time, instead, the electron exists in a probabilistic cloud — at the quantum level, particles exist as both particles and waves. These are fundamentally random.

Photo by Kaysha on Unsplash

Next time, when you are in a casino, watch those who seem very lucky, notice that it is not only luck, but they probably know (or feel) more of the hidden factors than the rest of the people there.

FOOTNOTES & REFERENCES

[1] The games mentioned here are not purely games of chance, but a mix of chance and skills.
[2] https://en.wikipedia.org/wiki/Randomness
[3] Hans Jürgen Prömel (2005). “Complete Disorder is Impossible: The Mathematical Work of Walter Deuber”. Combinatorics, Probability and Computing. Cambridge University Press. 14: 3–16. doi:10.1017/S0963548304006674.
[4] Kapitaniak, M., Strzalko, J., Grabski, J., & Kapitaniak, T. (2012). The three-dimensional dynamics of the die throw. Chaos: An Interdisciplinary Journal of Nonlinear Science, 22(4), 047504.
[5] “Human Behavioral Complexity Peaks at Age 25”, N. Gauvrit, H. Zenil*, F. Soler-Toscano, J.-P. Delahaye, P. Brugger. PLoS Comput Biol 13(4): e1005408, 2017. (PLOS)
[6] SOURCE: https://www.reddit.com/r/dataisbeautiful/comments/acow6y/asking_over_8500_students_to_pick_a_random_number/ed9n0i1/
[7] Sean Meyn; Richard L. Tweedie (2 April 2009). Markov Chains and Stochastic Stability. Cambridge University Press. p. 3. ISBN 978–0–521–73182–9.

SSENSE-TECH

Ideas and research from the software, data & product teams…

Kaveh Bakhtiyari

Written by

PhD Candidate in Artificial Intelligence | Data Scientist @SSENSE (Bakhtiyari.com)

SSENSE-TECH

Ideas and research from the software, data & product teams behind the global fashion platform SSENSE.

Kaveh Bakhtiyari

Written by

PhD Candidate in Artificial Intelligence | Data Scientist @SSENSE (Bakhtiyari.com)

SSENSE-TECH

Ideas and research from the software, data & product teams behind the global fashion platform SSENSE.

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store