Random Variables#
Definition#
Definition 75 (Random Variables)
A random variable
which maps an outcome
We denote the range of
Definition 76 (Pre-image of a Random Variable)
Given a random variable
which is equivalent to
Examples#
Example 22 (Coin Toss)
Consider a fair coin and define an experiment of throwing the coin twice.
Define the random variable
What is the probability of getting 1 head in an experiment, i.e.
Solution
We define the sample space
We enumerate each outcome
It is important to note that the codomain of
With that, this random variable
However,
So we need to map this expression to an event
We verify that
More concretely, given an expression
and this coincides with the pre-image of
Example 23 (Dice Roll)
Consider a fair dice and define an experiment of rolling the dice once.
The sample space is then
If we roll two fair dice, then the sample space is
So the probability of rolling say
Probability Measure #
In the chapter on Probability Space, we have
defined a probability measure
as per Probability Law (Definition 68).
The question initially is that
Variable vs Random Variable#
Example 24 (Variable vs Random Variable)
Professor Stanley Chan gave a good example of the difference between a variable and a random variable.
The main difference is that a variable is deterministic while a random variable is non-deterministic.
Consider solving the following equation:
Then, if
However, if
Tie back to the example in Example 22, we note that
Summary#
A random variable
is a function that has the sample space as its domain and the real space as its codomain. is the set of all possible values that can take and the mapping is not necessarily a bijective function since can take on the same value for different outcomes .The elements in
are denoted as (i.e. ). They are often called the states of .It is important to not confused
and . is a function while are the states of .When we write
, we are describing the probability of the random variable taking on a particular state . This is equivalent to .Random variables need not be bijective, see here.