TITLE: So what really is a random variable?
QUESTION [21 upvotes]: I've been confused about the definition of a stochastic (random) variable for an embarrassingly long amount of time.
From the Wikipedia entry on Stochastic Processes, I could gather that a random variable is a map from a probability space $(\Omega,F,P)$ to a space $S$. And if there is one such map $X(t)$ for each $t\in T$ (where $T$ is some indexing set), then we have a stochastic process.
Is this definition correct? So if $(\Omega,F,P)$ is the probability space {Heads,Tails} with $P(Heads)=\frac{1}{2}$ and $P(Tails)=\frac{1}{2}$, and the space $S$ is $\{1,0\}$, then $X(heads)=1$ and $X(tails)=0$ is one such random variable, and $X(heads)=0$ and $X(tails)=1$ is another random variable.
Both of these random variables are possible with a probability of $\frac{1}{2}$ each.
Am I understanding random variables correctly? That they're maps, out of many possible maps?

REPLY [2 votes]: I would strongly urge you not to consider the set
$\{ \mathrm{heads}, \mathrm{tails} \}$ to be your $\Omega.$
You just can't do much with an $\Omega$ that has only two elements in it.
When I flip a coin I expect the result to be either "heads" or "tails",
which would be signified by the value of a random variable.
Either I say the space $S = \{ \mathrm{heads}, \mathrm{tails} \}$
so that the value of the random variable is literally heads or tails,
or I might say that $S = \{ 0, 1 \}$, that $X(1) = 1$ means that flip number $1$ is heads, and that $X(1) = 0$ means that flip number $1$ is tails.
If I want to model a sequence of three tosses of a fair coin, then I want something like the variables $X(1),$ $X(2),$ $X(3),$ where each $X(t)$ has equal chance of being heads or tails and each $X(t)$ is independent from the other two.
In particular, there are eight different possible sequences of outcomes:
$$ HHH, HHT, HTH, HTT, THH, THT, TTH, TTT. $$
In order for this to be possible, I need $\Omega$ to have at least eight elements,
because each element of $\Omega$ determines the values of all three variables $X(1),$ $X(2),$ and $X(3).$ No one element of $\Omega$ can produce more than one of the sequences of outcomes listed above.