# Defintion of a random variable

##### New Member
I have read two defintions for a random variable.

1. It is a function from the set of all posisible outcomes to the real line. For example Y("male")=0
2. A variable where known probabilities are associated with sample outcomes.

Which one is correct? Defintion 1 does not include a probability, while defintion 2 does.

#### Dason

Different definitions get used in different contexts. I prefer the measure theoretical definition which mostly matches up with that first definition you give. It's basically just a function that allows us to map an element of some set (be it humans, pigs, voters, etc...) to some element of the real number line. We typically don't require any sort of probability measure to be assigned directly to the random variables. Probability can be derived from these once we assign a probability measure to the original set. This might seem overly complicated but it actually is quite freeing and allows us to think much more naturally about how we actually deal with these types of problems in the real world.

https://en.wikipedia.org/wiki/Random_variable

#### hlsmith

##### Less is more. Stay pure. Stay poor.
A haven't committed a good definition to memory.

My favorite conceptualization example is that it is a function, so that if your have a variable of die rolls, that is not a random variable but a realization.

Thanks for posting, this helps me to think about the concept more.