We want to talk about particular attributes of an outcome, instead of the details of the outcomes themselves. These may be useful to specify events.
Given a sample space $\Omega $, an outcome variable (or random variable) is any function on $\Omega $. In this context, the range of the function is called the set of values of the random variable.
Standard convention denotes outcome random variables by capitals $X, Y, Z$ and elements of their codomain by corresponding lower-case, $x, y, z$. Thus, if $X: \Omega \to V$ is a random variable then the lower case $x$ is often reserved for an element of $V$. The event $\Set{\omega \in \Omega }{X(\omega ) = x}$, where $x \in V$, is often abbreviated $\set{X = x}$. The probability of this event is often abbreviated $P(X = x)$.
Similarly, for a subset $A \subset V$, the event $\Set{\omega \in \Omega }{X(\omega ) \in A}$ is often abbreviated $\set{X \in A}$ and its probability abbreviated $P(X \in A)$.1 If $X: \Omega \to V_1$ and $Y: \Omega \to V_2$, and $A \subset V_1$ and $B \subset V_2$, then the event $\set{X \in A} \cap \set{Y \in B}$ is often written $\set{X \in A, Y \in B}$.
Sum of two dice. Suppose we model rolling two dice. We are interested in the sum of the pips shown facing up. Suppose we take as the set of outcome $\set{1, \dots , 12}$, whose elements correspond to the sum. We interpret $\Set{x \in \Omega }{x \geq 10}$ as the event that the sum of the two dice is greater than or equal to 10.
Alternatively, we may take the usual set of
outcomes $\set{1, \dots , 6}^2$ and define an
outcome variable $s: \set{1, \dots , 6}^2 \to
\set{1, \dots , 12}$ by
\[
s(d_1, d_2) = d_1 + d_2.
\]
As a third alternative, again take the usual
set of outcomes $\Omega = \set{1, \dots , 6}^2$.
Define the outcome variable $X: \Omega \to
\N $ to be the number of pips showing on the
first die, $Y: \Omega \to \N $ to be the
number of pips showing on the second die, and
define $Z: \Omega \to \N $ by
\[
Z(\omega ) = X(\omega ) + Y(\omega ) \quad \text{for all }
\omega \in \Omega
\] \[
P(Z = 4) = p(2,2) + p(1,3) + p(3, 1) = 1/36+1/36+1/36 =
1/12
\]
The preceding three paragraphs highlight that there are several ways of denoting the same situation.
Tossing a fair coin $n$ times.
As before, we model $n$ tosses of a fair coin
with the sample space $\Omega = \set{0,1}^n$.
Define $X_i: \Omega \to \set{0,1}$ by
$X_i(\omega ) = \omega _i$.
We interpret $\Set{\omega \in
\Omega }{X_i(\omega ) = 1}$ as the event that
toss $i$ turns up heads, and likewise
$\Set{\omega \in \Omega }{X_i(\omega ) = 0}$ as
the event that toss $i$ turns up tails, for $i
= 1, \dots , n$.
We can define the function $X: \Omega \to
{0,1}^n$ by $X(\omega ) = \omega $ or by saying
$X = (X_1, \dots , X_n)$.
Suppose we define $H: \Omega \to \N $ by
\[
H(\omega ) = \sum_{i= 1}^{n} X_i(\omega )
\]