What is a random variable?

A random variable is a function that maps outcomes of an experiment, or process that produces outcomes with some degree of uncertainty, to quantifiable values. It basically translates the raw outcomes, such as Heads or Tails in the context of flipping a coin, into a numerical measure, such as 0 and 1, respectively.

It is common notation in statistics to refer to a stochastic process that generates data as a random variable such as X, where the capital X refers to the random variable itself and lowercase x refers to an instance of the random variable. A random variable can either be discrete, if the sample space consists of a finite number of countable elements (such as rolling a dice or flipping a coin), or continuous, if the sample space consists of an infinite number of events (such as annual rainfall received in a city). 

Author

Help us improve this post by suggesting in comments below:

– modifications to the text, and infographics
– video resources that offer clear explanations for this question
– code snippets and case studies relevant to this concept
– online blogs, and research publications that are a “must read” on this topic

Leave the first comment

Partner Ad
Find out all the ways that you can
Contribute