# Are “random variables” really just probability distribution functions?

Say $X_{1} = \{ -3,-2,-1,0,1,2,3 \}$ is a random variable; say we are asked to find the expectation $E(X_{1})$. Mathematically $X_{1}$ is just a set. To calculate the expectation we need the probability distribution function $p_{1}$ that maps set $X_{1}$ to $P_{1}$: $$E(X_{1}) = \sum_{i=1}^{|X_{1}|} \Big( x_{i} \cdot p_{1}(x_{i}) \Big)$$. Set $X_{1}$ is just the domain of the function $p_{1}$ (its attribute). Would it therefore not be more correct to write $E(p_{1})$? Also we can have two identical sets (random variables) $X_{1}$ and $X_{2}$, but they could have entirely different probability distributions $p_{1}$ and $p_{2}$. Would it therefore not be more correct to refer to "random variables" as $p_{1}$ and $p_{2}$ rather than $X_{1}$ and $X_{2}$?

• A random variable is a measurable mapping, not a set. – user223391 Jun 12 '17 at 7:28
• A set on its own is not a random variable (assuming it has more than one element; if not then it is not very random) – Henry Jun 12 '17 at 7:30
• @ZacharySelk well... any function can be described as a set. Of course in the context of this question the provided set seems not the representation of a measurable mapping. – Masacroso Jun 12 '17 at 7:33
• @Masacroso Not every set is a function though. – YoTengoUnLCD Jun 12 '17 at 7:35