# What is a random variable?

Author
Samuel Nellessen
Tags
Statistics
Date
Nov 4, 2022
For real, I keep forgetting what a random variable is.
I mean like, what is it exactly? I often get confused with that.

### Intuitive understanding:

A random variable is a variable that is dependent on a random event. It is not the random event itself. For example, if I am throwing a coin, then the random variable is not heads or tails, but rather the amount of money I bet on each, the outcomes of the experiment in a way.
The random variable is a function that is mapping the possible outcomes of the experiment to the consequences of the outcomes. Now, to get a formal unterstanding:

### Formal understanding:

A random variable is a measurable function from a set of possible outcomes to a measurable space .
The probability that takes on a value in a measurable set is written as:
This means that we have a function X that is taking in a value from , and points it towards some value in which is in the measurable subset of . Then the probability for X taking said value is given by (given that is in ).