# Lesson Explainer: Discrete Random Variables Mathematics

In this explainer, we will learn how to identify a discrete random variable and define its corresponding probability distribution.

In order to understand what a discrete random variable is, it is helpful to discuss what a random variable is first.

### Definition: Random Variables

A random variable is a variable that can take on multiple different values (that are assigned at random), each with an associated probability.

As with probabilities of mutually exclusive events, the probabilities associated with all the values that the random variable can take must all add up to 1. Moreover, each probability must lie within the interval .

A random variable can be either discrete or continuous. For a discrete random variable, the values of the random value must be discrete. Typically, they will take integer values, but this is not necessarily the case.

### Definition: Discrete Random Variable

A discrete random variable is a random variable that can take on multiple different discrete values, each with an associated probability.

One example of a discrete random variable are outcomes of rolling of a fair die. The values the discrete random variable can take are 1, 2, 3, 4, 5, and 6, with being the associated probability for each value.

We can represent a discrete random variable using a probability distribution function. This is a function that maps the values of the discrete random variable to their associated probabilities.

### Definition: Probability Distribution Function

A probability distribution function is a function that generates probabilities of value given an outcome of value and must hold the following properties:

• for all values of in the domain of the probability distribution function,
• each value of must lie in the interval .

In the same way that we can represent inputs and outputs of a function in different ways, can we also represent a probability distribution function in different formats. In the first two examples, we will consider questions where the probability distribution function is represented in a table. The first demonstrates how to check if a function is a probability distribution function by using facts related to probability.

### Example 1: Checking if a Function in a Table is a Probability Distribution Function

Can the function in the given table be a probability distribution function?

 𝑥 𝑓(𝑥) 0 1 4 5 0.17 0.43 0.69 0.36

We know that for any probability distribution function,. Therefore, if the function in the table is a probability function, then all the probabilities in the table will sum to 1:

Since this is not the case, as they summed to 1.65, then is not a probability distribution function.

Note that even if all the probabilities summed to 1, we would also need to check that each probability was in the interval .

The second example also uses a table to represent a probability distribution function, but demonstrates how to find an unknown value in the table using facts associated with probability.

### Example 2: Finding an Unknown Value of a Probability Distribution Function in a Table

The function in the given table is a probability distribution function of a discrete random variable . Find the value of .

 𝑥 𝑓(𝑥) 1 2 3 4 5 15 110 310 110 𝑎

We know that for any probability distribution function, , so we can use this in order to determine the unknown value of :

Since the value of is in the interval , then we know that is an appropriate value.

In addition to representing a probability distribution function in a table, we can represent each value and its associated probability using the notation , where represents the value of the discrete random variable and is the associated probability of that value. Using this notation, we can say that and all values of must lie in the interval .

In the following example, we will consider how to find an unknown probability when the probability distribution function is presented in the format .

### Example 3: Finding an Unknown Value given Other Values of a Probability Distribution Function

Let denote a discrete random variable that can take the values 0, 1, 2, and 3. Given that , , , and , find the value of .

As all probabilities in a probability distribution function add up to 1, we know that

By substituting the associated probabilities, we get

Then, simplifying, rearranging, and solving for gives us

As the value of is in the interval , then is an appropriate answer.

As we saw in example 2, the probability distribution function can be represented as a function of , where is the value the discrete random variable can take and is its associated probability. We therefore know that for all values of the random variable can take. Further, each value of must lie in the interval .

The following example uses the properties of and all values of lying in the interval in order to determine whether a probability distribution function is valid or not for a given set of values of .

### Example 4: Determining Which Probability Distribution Function Could Represent a Discrete Random Variable

Let denote a discrete random variable that can take the values 3, 5, and 6. Which of the following functions could represent the probability function of ?

For a probability distribution function to be able to represent the discrete random variable , which can take the values 3, 5, and 6, and each value of must lie in the interval . We will check each function in turn.

For , we will first calculate the associated probabilities for each value of the discrete random variable by substituting 3, 5, and 6 into .

When ,

As is outside of the interval , then we can already deduce that cannot be a valid probability distribution function for the discrete random variable .

Similarly, for , we will first calculate the associated probabilities for each value of the discrete random variable, 3, 5, and 6, by substituting into .

When ,

When ,

When ,

As each value lies in the interval , then so far is a valid probability distribution function for the discrete random variable .

We will now check if :

Since , then is a valid probability distribution function for the discrete random variable .

### Note:

We can check the other functions, but since we have already determined the correct answer, then this is not necessary.

In the next example, we can use the properties of and all values of lying in the interval to determine an unknown coefficient within the function of given the values the random variable can take.

### Example 5: Finding an Unknown Coefficient in a Probability Distribution Function given Values the Discrete Random Variable Can Take

Let denote a discrete random variable that can take the values 1, 2, 3, 4, 5, and 6. Given that has probability distribution function , find the value of .

For a probability distribution function to be able to represent the discrete random variable , which can take the values 1, 2, 3, 4, 5, and 6, and each value of must lie in the interval .

First, we need to substitute 1, 2, 3, 4, 5, and 6 into .

For ,

For ,

For ,

For ,

For ,

For ,

Next, we use the property to create an equation in terms of :

Then, simplifying, rearranging, and solving for gives us

Although we have found the value of , it is good practice to check that for each value of the random variable, the associated probability is in the interval . We do this by substituting into , , and so on.

For ,

For ,

For ,

For ,

For ,

For ,

As each value of for all values of the random variable lies in the interval , then we know that , where , is a valid probability distribution function.

So far, we have considered examples where no context is given. In the final part of the explainer, we will explore examples where a context is given.

In the following example, we will consider how to use information from a probability distribution in order to answer questions within a context.

### Example 6: Solving Problems in Context about Discrete Random Variables given a Probability Distribution Function

Let be the random variable that represents the number of patients who visit a dental clinic per hour. The probability distribution of is shown in the table below.

 𝑥 𝑓(𝑥) 10 11 12 13 14 15 0.2 0.1 0.15 0.05 0.3 0.2

Find the probability of the following.

1. Exactly 13 patients visiting the clinic in a given hour
2. At least 13 patients visiting the clinic in a given hour
3. At most 13 patients visiting the clinic in a given hour

Part 1

To find the probability that exactly 13 patients visit the clinic in a given hour, we use the probability distribution table.

In this case, represents the number of patients who visit a dental clinic per hour, so . Therefore, the probability of is given by the corresponding value for in the table, which is 0.05.

Part 2

To find the probability that at least 13 patients visit the clinic in a given hour, we again use the probability distribution table.

In this case, can take multiple values, since we are finding the probability that at least 13 patients visited the clinic in a given hour. So, can be any integer greater than or equal to 13, or . As seen in the table, can only take integer values from 10 to 15, so can be 13, 14, or 15.

To find the probability of being 13, 14, or 15, we find the corresponding values for in the table and sum these.

For ,

For ,

For ,

Therefore, .

So, the probability that at least 13 patients visit the clinic in a given hour is 0.55.

Part 3

To find the probability that at most 13 patients visit the clinic in a given hour, we again use the probability distribution table.

As in the previous part, can take multiple values. Since we are finding the probability that at most 13 patients visited the clinic in a given hour, then can be any integer less than or equal to 13, or . As seen in the table, can only take integer values from 10 to 15, so can be 10, 11, 12, or 13.

To find the probability of being 10, 11, 12, or 13, we find the corresponding values for in the table and sum these.

For ,

For ,

For ,

For ,

Therefore, .

So, the probability that at most 13 patients visit the clinic in a given hour is 0.5.

In the last example, we will consider which distribution is most appropriate for a given context.

### Example 7: Choosing a Distribution of a Discrete Random Variable given a Context

In an experiment in which a fair coin is tossed five consecutive times, let be the discrete random variable expressing the number of heads minus the number of tails. Find the probability distribution of .

1.  𝑥 𝑓(𝑥) −5 −3 −1 1 3 5 132 532 1032 1032 532 132
2.  𝑥 𝑓(𝑥) −5 −3 −1 0 1 3 5 132 532 932 232 932 532 132
3.  𝑥 𝑓(𝑥) −3 −1 0 1 3 532 1032 232 1032 532
4.  𝑥 𝑓(𝑥) −4 −3 −1 1 3 4 132 532 1032 1032 532 132
5.  𝑥 𝑓(𝑥) −5 −3 −1 1 3 5 132 1032 532 532 1032 132

In order to determine the probability distribution function for the discrete random variable , we first determine all the possible values that can take, then find the probability, , for each value of .

The questions states that a fair coin is tossed 5 times and is the discrete random variable that represents the number of heads minus the number of tails. Therefore, the possible values of are as follows:

• 5 heads and 0 tails: ,
• 4 heads and 1 tails: ,
• 3 heads and 2 tails: ,
• 2 heads and 3 tails: ,
• 1 heads and 4 tails: ,
• 0 heads and 5 tails: .

So, the values that can take are , , , 1, 3, and 5.

Next, we will calculate the probability, , for each of the values .

In order to calculate the probability, it is helpful to list the possible outcomes for each discrete random variable and then determine the probability once all the outcomes have been determined.

For , there are 5 heads and 0 tails. HHHHH is the only outcome.

For , there are 4 heads and 1 tails. HHHHT, HHHTH, HHTHH, HTHHH, and THHHH are the 5 outcomes.

For , there are 3 heads and 2 tails. HHHTT, HHTHT, HTHHT, THHHT, HHTTH, HTHTH, THHTH, HTTHH, THTHH, and TTHHH are the 10 outcomes.

For , there are 2 heads and 3 tails. HHTTT, HTHTT, THHTT, HTTHT, THTHT, TTHHT, HTTTH, THTTH, TTHTH, and TTTHH are the 10 outcomes.

For , there are 1 heads and 4 tails. HTTTT, THTTT, TTHTT, TTTHT, and TTTTH are the 5 outcomes.

For , there are 0 heads and 5 tails. TTTTT is the only outcome.

By adding all of the outcomes together, we get , so there are 32 outcomes in total.

Therefore, to find the probability of each outcome, we take the number of outcomes for each discrete random variable and divide it by the total number of outcomes, as follows.

For ,

For ,

For ,

For ,

For ,

For ,

When displayed in a table, we have the following.

 𝑥 𝑓(𝑥) −5 −3 −1 1 3 5 132 532 1032 1032 532 132

In this explainer, we have learned about discrete random variables and their probability distribution functions. Let’s recap the key points.

### Key Points

• A discrete random variable is a variable that can take on a set of discrete values, each with an associated probability.
• A probability distribution function maps each value of a discrete random variable to an associated probability.
• The sum of the probabilities of a probability distribution function must equal 1, and each probability must lie in the interval .
• Probability distribution functions can be presented in various ways, including:
• in a table,
• using the notation , where represents the value of the discrete random variable and is the associated probability of that value,
• using a function , where represents the value of the discrete random variable and is its associated probability.