What is really a random variable?

You just heard about random variable during your lecture but have no idea? Or you are fan of statistics and trying to learn definitions which most of the time seem a bit hard at first.

Along with this post I will try to be as clear as possible without using any fancy term neither from probability theory nor from mathematics.

Let’s get started…  Imagine a number machine which gives a number each time you press its button. A curious and extremely patient boy decides to understand the internal dynamics of the number machine. The only thing he does know is pressing the button.

He presses the button and gets 5, tries again 5, again 5, again 5. He gets 5 in 1000 of his trials, by the way since he is kind of an unusual guy he never gets bored while trying. However, he realizes that the machine’s output will be 5 if he tries again. Suddenly a graph warms up in his mind, here is his graph:

Screen Shot 2016-02-13 at 9.12.32 PM

He describes the y axis as a probability of getting number and x axis as the number that machine outputs. According to his hypothesis, which he also reflects in his graph, this machine always creates 5 from its internal dynamics.

In the second day, he finds another number machine and starts to press its button again, at first he gets 4, at second trial he gets 3, at third trial he gets 4 again and the next gets 3. Finally, after the 1000th trials again, he comes up with the hypothesis : the machine outputs only 3 and 4 and one after another. Here is his graph again:

Screen Shot 2016-02-13 at 9.26.50 PM

Think of random variable as a number created by a machine that you do not have any idea about its internal dynamics but you are trying to gain insights about the behavior of the machine by just looking through its outputs. Statisticians called this numbers discrete random variable if the numbers are not continuous and the graph that our boy build is defined as probability mass function(PMF).

Here are a few books and courses that I recommend if you are totally new comer to probability space:

This edx course and one of its recommended books Introduction to probability is a really good of source I believe.

If you want to go deeper here is a good blog post I found, moreover if you really want to go deeper David Mackay’s book is a perfect reference book for one who wants to learn about the theory of machine learning, information theory etc.

Open ended question:

Let’s assume that two friends have the same process that our boy had with the machine such that one requests another to pick a number and then say it, and the other picks 5 in each of 1000 trials?


Leave a Reply


WordPress.com Logo


Google photo


Twitter picture


Facebook photo


Connecting to %s