A Quick Note about Randomness

The word “random” appears very frequently in statistics, machine learning and AI in general. The random variable, random sampling, random number generator, just to name a few. But what exactly is randomness and how random numbers are generated are two very interesting questions for beginners who first encounters the idea of randomness to think about.

They’re not easy to explain and myself by running through several textbooks about statistics, I find that none has really made a serious effort to explain the idea behind randomness.

Disclaimer: My intention in this quick-and-easy-but-not-so-dirty post is not to go into detail(s) about randomness but rather than to set forth the topic and raise the awareness (especially of those who are taking it for granted) as well as to provide some related ideas and concepts so that the vigilant reader can elaborate on them and further reach out to the the internet and find a more complete and satisfying answer.

Broadly speaking, randomness implies unpredictability. You can find this definition from the Oxford Dictionary. And suppose for a moment that we’d all agree on this definition then how do we go about measuring or quantifying unpredictability.

Now because there are many systems rely on randomness and in some cases precise method to assess and testing it is critical. Imagine that you run a jackpot concern and the random number generation algorithm you’re using is deterministic (or predictable)!!

If the main idea of randomness is to eradicate determinism then how we can do that? Is there any math function that can help us to achieve this deceptively simple goal?

One method called the pseudorandom number generator is fabricated to generate almost random numbers. Almost because given a long list of generated numbers, it still can be very hard to predict the algorithm to generate them. However, the algorithm is still deterministic and thus not truly random.

Though it’s impossible to generate truly random numbers purely based on maths or any human-defined pattern, one can resort to the state of nature (some may prefer to say physics) to create randomness cause it’s believed that the nature is random, (think of the consequence of the opposite!). For example, the state of the computers, the atmospheric noise or radioactive decay in the surrounding environment or the state of the atoms, etc. The science behind those ideas belongs to a branch of physics called thermodynamics. Exactly how it works is beyond the scope of this post (and my pay grade too), but you can always find more information about it on the internet.

A very useful, though somewhat rough, description of the entropy of a substance is as a measure of the randomness or disorder of the 

atoms and molecules which constitute that substance. In these terms the second law of thermodynamics is seen as a tendency for the disorder of the universe to increase. 


As a quick note, recent algorithm uses quantum computers to generate truly random numbers. The algorithm is called the Quantum True Random Number Generator (or QTRNG for short). Though some argue that the generated numbers are still not perfectly truly random.

The other related concept to random is chaos, for which I hope I can write about it in another post.






Leave a Reply

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