Let
be a sample space, let
be an event and denote by
the probability assigned to the event
.
The indicator function of the event
(or indicator random variable of the event
),
denoted by
,
is a random variable defined as
follows:
In
other words, the indicator function of the event
is a random variable that takes value
when the event
happens and value
when the event
does not happen.
Example_
We toss a die and one of the six numbers from
to
can appear face up. The sample space
is:
Define
the event
i.e.
is the event "An odd number appears face up". A random variable that takes
value
when an odd number appears face up and value
otherwise is an indicator of the event
.
From the above definition, it can easily be seen that
is a discrete random
variable with
support
and
probability mass
function:
Indicator functions are often used in probability theory to simplify notation and to prove theorems.
Indicator functions enjoy the following properties.
The
-th
power of
is equal to
:
because
can be either
or
and:
The expected value of
is equal to
:
The variance of
is equal to
.
Thanks to the usual variance
formula and the powers property above, we
obtain:
If
and
are two events,
then:
In
fact:
Let
be a zero-probability event and
an integrable random
variable.
Then:
While
a rigorous proof of this fact is beyond the scope of this introductory
exposition, this property should be intuitive. The random variable
is equal to zero for all sample points
except possibly for the points
.
The expected value is a weighted average of the values
can take on, where each value is weighted by its respective probability. The
non-zero values
can take on are weighted by zero probabilities, so
must be zero.
Below you can find some exercises with explained solutions:
Exercise set 1 (use of the indicator function)