Discrete Random Variables
Definition of a discrete random variable
A discrete random variable is a function that assigns a real number to each element of a discrete sample space. In other words, it maps the possible outcomes of a random experiment to numerical values that can be analyzed statistically. Formally, a discrete random variable is a function:
\[X : \Omega \rightarrow \mathbb{R}\]where $\Omega$ is a discrete sample space.
When the sample space is continuous, composed of infinitely many infinitesimally close outcomes, we speak of continuous random variables.
To illustrate the concept in a simple way, consider an experiment where a single die is rolled twice, and let the random variable $X$ represent the number of sixes obtained. The possible values of $X$ are 0, 1, and 2 where $0$ means that no six appears in the two rolls, $1$ means that exactly one six appears, and $2$ means that both rolls show a six.
| $x$ | 0 | 1 | 2 |
|---|---|---|---|
| \(f ( x )\) | \(\frac{25}{36}\) | \(\frac{10}{36}\) | \(\frac{1}{36}\) |
where $x$ represents the possible outcomes of the random variable $X$ and $f ( x )$ represents the probability associated with each outcome. The probabilities satisfy:
\[\sum f ( x ) = 1\]This is consistent with the law of total probability, which states that the sum of the probabilities of all mutually exclusive outcomes of a random variable must equal $1$. It ensures that the probability distribution accounts for every possible event in the experiment.
Since probability calculations can be tricky at first, the following shows how the values of $f ( x )$ for 0, 1, and 2 are obtained.
\[P ( X = 0 ) & = (( \frac{5}{6} ))^{2} = \frac{25}{36} \\ P ( X = 1 ) & = 2 \cdot \frac{1}{6} \cdot \frac{5}{6} = \frac{10}{36} \\ P ( X = 2 ) & = (( \frac{1}{6} ))^{2} = \frac{1}{36}\]- In the case of $x = 0$, both dice show numbers other than six. Since the probability of not getting a six on a single roll is $\frac{5}{6}$, the probability that this happens twice in a row is $(( \frac{5}{6} ))^{2}$.
- In the case of $x = 1$, exactly one six appears in the two rolls. There are two possible ways this can happen: the first die shows a six and the second does not, or the first does not show a six and the second does. Each event has a probability of $\frac{1}{6} \cdot \frac{5}{6}$, so the total probability is $2 \cdot \frac{1}{6} \cdot \frac{5}{6}$.
- Finally, in the case of $x = 2$, both dice show a six. Since the probability of rolling a six on a single die is $\frac{1}{6}$, the probability that this occurs twice in a row is $(( \frac{1}{6} ))^{2}$.
Discrete probability distribution
A discrete random variable has a certain probability of taking each of its possible values. This probability is described by a function $f ( x )$, called the probability mass function or discrete probability distribution. For such a distribution, the following conditions must hold:
\[& f ( x ) \geq 0 \\ & \underset{x}{\sum} f ( x ) = 1 \\ & P ( X = x ) = f ( x )\]These conditions ensure that all probabilities are non-negative, that their total equals one, and that the probability of a specific value $x$ is exactly given by its corresponding $f ( x )$.
When dealing with a discrete random variable $X$, it is often useful to describe the probability that $X$ takes a value up to a certain threshold (x). This leads to the definition of the cumulative distribution function, denoted by $F ( x )$:
\[F ( x ) = P ( X \leq x ) = \underset{t \leq x}{\sum} f ( t )\]The function $F ( x )$ expresses the total probability accumulated up to $x$. It is defined for all real values of $x$ and increases step by step as new probability mass is added. Being cumulative by nature, $F ( x )$ is always non-decreasing and never exceeds $1$. To better illustrate the concept, let us return to the example of rolling two dice and show how the cumulative distribution function is constructed. The random variable $X$ represents the number of sixes obtained. Its probability mass function is:
| $x$ | 0 | 1 | 2 |
|---|---|---|---|
| \(f ( x )\) | \(\frac{25}{36}\) | \(\frac{10}{36}\) | \(\frac{1}{36}\) |
The cumulative distribution function (F(x)) is obtained by adding the probabilities up to each value of $x$:
| $x$ | 0 | 1 | 2 |
|---|---|---|---|
| \(F ( x )\) | \(\frac{25}{36}\) | \(\frac{35}{36}\) | \(1\) |
In fact, we have:
\[F ( 0 ) & = P ( X \leq 0 ) = f ( 0 ) = \frac{25}{36} \\ F ( 1 ) & = P ( X \leq 1 ) = f ( 0 ) + f ( 1 ) = \frac{25}{36} + \frac{10}{36} = \frac{35}{36} \\ F ( 2 ) & = P ( X \leq 2 ) = f ( 0 ) + f ( 1 ) + f ( 2 ) = 1\]The function $F ( x )$ shows how probability accumulates as $x$ increases. It starts at $\frac{25}{36}$ when no sixes are obtained and reaches 1 when all possible outcomes have been included.
Joint probability distributions
In cases where the sample space is multidimensional, meaning that each outcome depends on two or more random variables, the corresponding probabilities are described by joint probability distributions for discrete random variables. In some experiments, two discrete random variables can occur together, each taking specific values within the same outcome. The probability of this combined occurrence is described by a function $f ( x , y )$, which assigns a probability to every possible pair $( x , y )$. We have:
\[f ( x , y ) = P ( X = x ; Y = y )\]This function expresses how likely it is that $X$ takes the value $x$ while, at the same time, $Y$ takes the value $y$. For joint probability distributions, the following conditions must hold:
\[& f ( x , y ) \geq 0 \forall ( x , y ) \\ & \underset{x}{\sum} \underset{y}{\sum} f ( x , y ) = 1 \\ & P ( X = x ; Y = y ) = f ( x , y )\]These conditions state that all probabilities are non-negative, that their total sum over all possible pairs $( x , y )$ equals one, and that each joint probability $P ( X = x , Y = y )$ is represented by the value of $f ( x , y )$.
Example 1
To better illustrate the concept of a joint probability distribution for discrete random variables, consider the following simple example.Consider a small box containing 4 balls, 2 white and 2 black. Two balls are drawn at random without replacement. Let:
- $X$ = the number of black balls drawn
- $Y$ = the number of white balls drawn
The possible pairs $( x , y )$ represent all combinations of black and white balls that can be drawn. Since only two balls are extracted, $x + y = 2$, and the possible pairs are:
\[( 0 , 2 ) , ( 1 , 1 ) , ( 2 , 0 )\]The joint probability distribution $f ( x , y )$ is given by:
\[f ( x , y ) = \frac{( \frac{2}{x} ) ( \frac{2}{y} )}{( \frac{4}{2} )}\]By representing the values assumed by each pair $( x , y )$, we obtain the following table showing the joint probability distribution $f ( x , y )$:
\[f ( x , y ) & 0 & 1 & 2 & \text{Totals} \\ 0 & \frac{0}{6} & \frac{0}{6} & \frac{1}{6} & \frac{1}{6} \\ 1 & \frac{0}{6} & \frac{4}{6} & \frac{0}{6} & \frac{4}{6} \\ 2 & \frac{1}{6} & \frac{0}{6} & \frac{0}{6} & \frac{1}{6} \\ \text{Totals} & \frac{1}{6} & \frac{4}{6} & \frac{1}{6} & 1\]This example helps visualize how probabilities can be distributed across two discrete random variables. Each cell in the table represents the likelihood of a specific combination of black and white balls being drawn. By summing across rows and columns, we obtain the marginal probabilities of $X$ and $Y$, confirming that the total probability of all possible outcomes equals one.