= Events determined by a random variable
{title2=$\{X\in D\}=X^{-1}(D)$}
Define the head-count <random variable> $X:\Omega\to\{0,1,2\}$ by
$$
X(TT)=0,\qquad X(HT)=X(TH)=1,\qquad X(HH)=2.
$$
The four <elementary outcomes> are inputs to this <function>; its three numerical values are outputs. Each <fiber of a function> collects all outcomes giving one value. Under the fair <independent> model, adding the masses in each <fiber> gives the <probability mass function>
$$
\mathbb P(X=0)=\frac14,\qquad
\mathbb P(X=1)=\frac14+\frac14=\frac12,\qquad
\mathbb P(X=2)=\frac14.
$$
Consequently the output values are not equally likely, although the inputs are. Using the reduced <sample space> $\{0,1,2\}$ with these masses gives the same head-count <probability distribution>; assigning $1/3$ to each value would describe a different model.
A question about a <random variable>'s value becomes an <event> on the original <sample space> by taking an <inverse image>:
$$
\{X\in D\}=X^{-1}(D)=\{\omega\in\Omega:X(\omega)\in D\}.
$$
For a real-valued <random variable>, this is an <event> whenever $D$ is a <Borel set>, by <measurability>. In this finite example every <subset> of $\{0,1,2\}$ is allowed. In particular,
$$
\{X\geq1\}=X^{-1}(\{1,2\})=\{HH,HT,TH\},\qquad
\mathbb P(X\geq1)=\frac12+\frac14=\frac34.
$$
This is the same “at least one head” <event> counted above, expressed through an observable.<Random: Probability, Mathematical Statistics, Stochastic Processes by Kyle Siegrist>[Probability Spaces, §2 Events and Random Variables, Random Variables: measurable functions and the inverse-image notation for value events]{ref}
\Image[/two-coin-head-count-fibers.png]
{title=Head count merges outcomes into fibers and adds their probabilities}
{description=The <random variable> sends $TT$ to zero, both $HT$ and $TH$ to one, and $HH$ to two. The <inverse image> of $\{1,2\}$ is the highlighted <event> of at least one head. Two arrows meeting at one explain its <probability> $1/2$.}
Every <event> determined by $X$ is a <union> of complete <fibers>. There are $2^3=8$ such <events>, whereas the full <power set> of $\Omega$ has $2^4=16$. In particular, the first-head <event> $A=\{HH,HT\}$ is not determined by $X$: it contains $HT$ but excludes $TH$, although both give $X=1$. Choosing an observable makes calculations simpler precisely by forgetting distinctions; the useful choice is one that retains the distinctions the question needs.
Back to article page