 StatLect

Indicator functions

The indicator function of an event is a random variable that takes value 1 when the event happens and value 0 when the event does not happen. Indicator functions are often used in probability theory to simplify notation and to prove theorems. Definition

The following is a formal definition.

Definition Let be a sample space and be an event. The indicator function (or indicator random variable) of the event , denoted by , is a random variable defined as follows: While the indicator of an event is usually denoted by , sometimes it is also denoted by where is the Greek letter Chi.

Example We toss a die and one of the six numbers from 1 to 6 can appear face up. The sample space is Define the event described by the sentence "An even number appears face up". A random variable that takes value 1 when an even number appears face up and value 0 otherwise is an indicator of the event . The case-by-case definition of this indicator is From the above definition, it can easily be seen that is a discrete random variable with support and probability mass function Properties

Indicator functions enjoy the following properties.

Powers

The -th power of is equal to : because can be either or and Expected value

The expected value of is equal to : Variance

The variance of is equal to . Thanks to the usual variance formula and the powers property above, we obtain Intersections

If and are two events, then because:

1. if , then and 2. if , then and Indicators of zero-probability events

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.

Solved exercises

Below you can find some exercises with explained solutions.

Exercise 1

Consider a random variable and another random variable defined as a function of . Express using the indicator functions of the events and .

Solution

Denote by the indicator of the event and denote by the indicator of the event . We can write as Exercise 2

Let be a positive random variable, that is, a random variable that can take on only positive values. Let be a constant. Prove that where is the indicator of the event .

Solution

First note that the sum of the indicators and is always equal to : As a consequence, we can write Now, note that is a positive random variable and that the expected value of a positive random variable is positive: Thus, Exercise 3

Let be an event and denote its indicator function by . Let be the complement of and denote its indicator function by . Can you express as a function of ?

Solution

The sum of the two indicators is always equal to : Therefore, The book

Most of the learning materials found on this website are now available in a traditional textbook format.

Glossary entries
Share