Discrete random variables#
Discrete random variables are random variables whose images are countable sets. We define discrete random variables and probability mass functions and present some examples. The (conditional) expectation and variance are important summary statistics of random variables.
Discrete random variables#
We are often interested in the value of a function of elementary events. For example we might be interested in the profit of a gambling game as a function of the elementary outcomes of the game.
Definition 22 (Discrete random variable)
A discrete random variable
The image
is a countable subset ofFor every
we have
By defining discrete random variables as functions of elementary events, we separate the ideas of experimental outcomes and of functions of these outcomes.
Condition (1) specifies that a discrete random variable can only take countably many values. Condition (2) specifies that every set that is mapped to a certain value
Probability mass functions#
Once we have defined the continuous random variable, we can make statemets about the probability that it will take a certain value, using its probability mass function.
Definition 23 (Probability mass function)
Let
where
Reviewing the definitions leading up to the pmf, we defined: elementary events, event spaces and probability measures, followed by random variables and the probability mass function.
This was a rigorous build-up of what a discrete random variable is, however in many cases we need not consider this construction at all, instead declaring that “
Theorem 10 (pmf
Let
There exists a probability space
The proof for this theorem is that we can take
Lastly defining
is a valid event space. is a valid probability measure. is a valid discrete random variable and has the pmf from the theorem statement.
Fundamental discrete distributions#
Here are some examples of fundamental discrete distributions. Appealing to the theorem above, we can forget about probability spaces and consider only the values taken by the pmf of the random variable in question.
Bernoulli#
Also called the coin toss, the Bernoulli distribution is the simplest discrete distribution.
A random variable
Binomial#
A random variable
The sum of
Poisson#
A random variable
The Poisson distribution is an appropriate model for point data. For example, if buses arrive at a local stop such that
Each bus arrival occurs at a single point in time.
Arrivals are independent of each other.
The number
of buses arriving within an infinitesimal time interval follows
then the number of events occuring within any time interval are Poisson-distributed.
Geometric#
A random variable
The geometric distribution naturally models random variables such as “the number of i.i.d. trials up to and including the first occurence of A”. For example, the number of i.i.d. coin tosses required until heads is obtained the first time, is geometrically distributed.
Negative binomial#
A random variable
The number of i.i.d. coin tosses up to and including the
Note also that from the definition of this distribution, if
Expectations#
Although random variables are not perfectly determined, we can reason about the values they could attain. The expectation of a random variable captures the value that we expect the variable will have on average - as weighted by the probability measure.
Definition 24 (Expectation)
The expectation of a discrete random variable
whenever this sum converges absolutely, i.e.
The need for the last statement in this definition is that the expectation of a discrete random variable may not always exist. For example, if
where
Theorem 11 (Law of the subconscious statistician)
If
whenever this sum converges absolutely.
The above can be shown by defining
Theorem 12 (Two results for discrete random variables)
Let
If
and , then . .
Appart from the expectation, the variance is another central quantity that captures information about a random variable, particularly about its spread.
Definition 25 (Variance)
The variance of a discrete random variable
Conditional expectations#
We are often interested in the expectation of a random variable conditioned on some event. For example, the event we are conditioning on could be some observed data, based on which we would like to update our beliefs about the random variable, and compute its expectation.
Definition 26 (Conditional expectation)
If
whenever this sum converges absolutely.
As with conditional probabilities, there is a partition theorem associated with conditional expectations, also known as the law of total expectation.
Theorem 13 (Partition theorem for conditional expectations)
If
whenever this sum converges absolutely.