A random variable $$X: \Omega \to E$$ is a measurable function from a set of possible outcomes $$\Omega$$ to a measurable space $$E$$. The technical axiomatic definition requires $$\Omega$$ to be a sample space of a probability triple. Usually $$X$$ is real-valued.
The probability that $$X$$ takes on a value in a measurable set $$S \subseteq E$$ is written as :
$$Pr(X \in S) = P(\{ \omega \in \Omega|X(\omega) \in S\})$$
where $$P$$ is the probability measure equipped with $$\Omega$$.