# Lesson Explainer: Expected Values of Discrete Random Variables Mathematics

In this explainer, we will learn how to calculate the expected value of a discrete random variable from a table, a graph, and a word problem.

### Definition: Discrete Random Variable

A discrete random variable is a variable that can only assume a countable number of numerical values. The value that the variable takes on is determined by the outcome of a random phenomenon or experiment. Such a variable is often denoted by an upper case , with the value that the variable takes on denoted by a lower case .

Each value that a discrete random variable can assume has an associated probability. For example, consider the graph below, which gives the probabilities of a spinner landing on 1, 2, 3, and 4:

It shows that

• the probability of the spinner landing on 1 is 0.2 (written as ),
• the probability of the spinner landing on 2 is 0.3 (written as ),
• the probability of the spinner landing on 3 is 0.3 (written as ),
• the probability of the spinner landing on 4 is 0.2 (written as ).

In table form, we would give these probabilities as follows:

 𝑥 𝑃(𝑋=𝑥) 1 2 3 4 0.2 0.3 0.3 0.2

Together, the probabilities of each of the possible values of represent a probability distribution.

### Definition: Probability Distribution

A probability distribution is a function that gives the likelihood of obtaining each of the possible values that a discrete random variable can assume. It is often represented with a graph or with a table of values. Some properties of a probability distribution include the following:

• The probability that takes on a specific value is . You may also use the notations , , and for this probability.
• for all real numbers .
• , where is the number of possible values of and takes values .

Hence, from the second and third points, we know that .

Applying this to our spinner probability distribution above, the sum of all of the probabilities is equal to 1. That is,

Since this will always be the case, if we know all of the probabilities except one in a distribution, we can subtract the sum of the known probabilities from 1 to find the unknown probability.

The law of large numbers states that as the sample size grows, the mean of all of the outcomes gets closer to the mean of the whole population, or closer to the mean that we would expect. Thus, using a probability distribution, we can calculate the most likely mean of all of the outcomes when a large number of trials are conducted. For example, suppose we spun our spinner 10‎ ‎000 times. The most likely number of times each of the possible values would come up out of these 10‎ ‎000 trials is the product of 10‎ ‎000 and the probability of getting that value. That is,

• the most likely number of 1s to come up would be ,
• the most likely number of 2s to come up would be ,
• the most likely number of 3s to come up would be ,
• the most likely number of 4s to come up would be .

If these were the frequencies of each of the values, we could find the mean, , of all of the outcomes by multiplying each value by its frequency, finding the sum of the products, and then dividing by the total number of possible outcomes. This would give us a mean of

Note that we would have got the same answer had we performed our calculations in a slightly different way. Multiplying each value of by its probability and adding the products together, we obtain

This is actually , so we have

This is the same result that we got when we first found the mean of the 10‎ ‎000 outcomes and it leads us to the definition of expected value.

### Definition: Expected Value

The expected value, or expectation, , of the discrete random variable is the most likely of all the outcomes for the variable when a very large number of trials are conducted. That is, where is the mean and is the number of trials. The formula for expected value is where is each of the possible values of and is the probability of each of these outcomes occurring.

Now that we have a formula for the expected value of a discrete random variable, let’s use it to solve problems. We will start with an example in which the probability distribution of a discrete random variable is given in a table.

### Example 1: Calculating Expected Values

An experiment produces the discrete random variable that has the probability distribution shown. If a very high number of trials were carried out, what would be the likely mean of all the outcomes?

 𝑥 𝑝(𝑥) 2 3 4 5 0.1 0.3 0.2 0.4

### Answer

Recall that the law of large numbers states that as the number of trials approaches infinity, the mean of the results will approach the expected value. That is, where is the mean, is the number of trials, and is the expected value of . Also remember that the formula for the expected value is where is each of the possible values of and is the probability of each of these outcomes occurring.

Thus, to find the likely mean for the experiment above, we substitute the values given in the table into the formula for the expected value. That is, we multiply each possible outcome by its probability and then find the sum of the products:

This tells us that the expected value of is 3.9. Hence, if a very high number of trials were carried out, the likely mean of all the outcomes would be 3.9.

### Note

The expected value of 3.9 is a little more than , which is the value that is halfway between 2 and 5. This is what we would expect, since the sum of the probabilities of 4 and 5 is a little more than the sum of the probabilities of 2 and 3 .

Next, we will calculate the expected value of a discrete random variable that has a uniform probability distribution. In a uniform probability distribution, each outcome has the same probability of occurring.

### Example 2: Calculating the Expected Value from the Probabilities of a Discrete Random Variable

The table shows the probability distribution of a fair six-sided die. Determine .

 𝑥 𝑃(𝑋=𝑥) 1 2 3 4 5 6 16 16 16 16 16 16

### Answer

Let’s begin by substituting the given values into the formula for the expected value, . That is where each of the possible values of is and the probability of each of these outcomes occurring is . Note that since each outcome has the same probability of occurring, we have a uniform probability distribution.

The formula says that, to find the expected value of , we need to multiply each of the possible values of by its probability and then find the sum of the products. When we do this, we get

Therefore, the formula tells us that is equal to 3.5.

Notice that the expected value of 3.5 that we just calculated is exactly halfway between 1 and 6. This leads us to a formula for the expected value, , of a discrete random variable that has a uniform probability distribution.

### Formula: Expected Value of a Discrete Random Variable with a Uniform Probability Distribution

For a uniform distribution where and is the last consecutive integer in the set of possible values of ,

Remember that, for our uniform probability distribution in the example above, . To double-check our work, we can substitute 6 for in the stated formula and simplify as shown:

Just as before, we find the value of to be 3.5.

In the problem that follows, we will be given a probability distribution in graphical form and will be asked to calculate the expected value of the associated discrete random variable.

### Example 3: Calculating Expected Values from the Graph of a Probability Distribution

Work out the expected value of the random variable whose probability distribution is shown.

### Answer

We begin by representing the information given in the graph in table form so that we can more easily calculate the expected value of . Doing so, we get

 𝑥 𝑃(𝑋=𝑥) 1 2 3 4 0.1 0.3 0.4 0.2

Now let’s substitute the given values from the table into the formula for the expected value, . That is, where is each of the possible values of and is the probability of each of these outcomes occurring.

Substituting our -values and their probabilities into the formula gives us

Thus, the expected value of the random variable is 2.7.

Now, we will calculate the expected value of another discrete random variable. This time, the probability distribution is given to us as a function. We must use the fact that the sum of all of the probabilities in a probability distribution is equal to 1 to find an unknown probability.

### Example 4: Finding the Expected Value of a Discrete Random Variable given a Function

Let denote a discrete random variable that can take the values , , and 1. Given that has probability distribution function , find the expected value of .

### Answer

In this problem, we are given the probability distribution function for the discrete random variable and the three possible values that can take. We are asked to find the expected value of .

Before we can calculate the discrete random variable’s expected value, however, we must evaluate the variable’s probability distribution function at each of the possible values of the variable in order to determine the probability associated with each value.

First, evaluating at , we get

Next, evaluating at gives us

Finally, evaluating at , we get

We now know that the probability for is , the probability for is , and the probability for is . Remember that the sum of all of the probabilities in a probability distribution must be equal to 1. This means that we can write the equation and after finding a common denominator for the three fractions on the left side, we get

Simplifying the left side then gives us and after multiplying both sides of the equation by 6, we get

Finally, subtracting 6 from both sides shows us that

Recall that the probability for is . Since we have now determined that the value of is 0, we know that the probability for is

To help us calculate the expected value of , let’s represent our findings so far in table form as shown.

 𝑥 𝑃(𝑋=𝑥) −1 0 1 16 13 12

By checking that all of the probabilities in the probability distribution sum to 1, we can confirm that the probabilities in our table are correct as follows:

Since we have the correct probability for each of the possible values of , we can now use the formula to find the expected value, , of . In the formula, each of the possible values of is , and the probability of each of these outcomes occurring is .

Substituting our values and their probabilities into the formula, we get

Therefore, the expected value of is .

In the example that follows, we again use the fact that the sum of all of the probabilities in a probability distribution is equal to 1 to set up a linear equation. We solve this equation to find a pair of unknown probabilities, which we then use to calculate a discrete random variable’s expected value.

### Example 5: Using the Probability Function of a Discrete Random Variable to Find the Expected Value

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

 𝑥 𝑓(𝑥) 1 3 4 6 1027 8𝑎 6𝑎 19

### Answer

In this problem, we are asked to find the expected value of a discrete random variable by using the information provided in the given table. The are the possible values of ,where, in this case, = 1, 2, 3, and 4, since there are four possible outcomes, and are the probabilities for each of these. Often, is written as .

We can see that the probabilities for and are not given. Rather, they are represented in terms of the unknown constant . Therefore, we must find the value of before we can calculate the expected value.

Recall that the sum of all of the probabilities in a probability distribution must be equal to 1. This means that we can write the equation and after finding a common denominator for the two fractions on the left side, we get

Simplifying the left side then gives us

Now, subtracting from both sides, we get

Finally, after dividing both sides of the equation by 14, we arrive at

Now that we know the value of is , we are able to determine that and also that

Entering these probabilities into our table then gives us

 𝑥 𝑓(𝑥) 1 3 4 6 1027 827 29 19

We can confirm that our probabilities are correct by checking to make sure that all of the probabilities in the probability distribution sum to 1 as follows:

Now that we have the correct probability for each of the possible values of , we can use the formula to find the expected value of . In the formula, the expected value is , and the number of possible outcomes for is , where, as noted earlier, in our case the value of is 4.

Using the formula, we multiply each of the possible values of by its probability and then calculate the sum of the products to find the expected value of . When we do this, we get

Thus, we find that the expected value of is .

We will also use the fact that the sum of all of the probabilities in a probability distribution must be equal to 1 to find an unknown probability in our next problem. Just as before, we will then use this probability to help determine the expected value of a discrete random variable.

### Example 6: Finding the Expected Value of a Discrete Random Variable

Let denote a discrete random variable that can take the values 4, 5, 8, and 10. Given that , , and , find the expected value of . Give your answer to two decimal places.

### Answer

To summarize the information given, let’s represent it in table form. Doing so, we get

 𝑥 𝑃(𝑋=𝑥) 4 5 8 10 427 527 827 ?

Note that we are not told the probability that the value of is 10, that is, . However, we do know that the sum of all of the probabilities in a probability distribution must be equal to 1. This means that we must subtract the sum of the other probabilities in the table from 1 to find our missing probability. Doing so, we get

Now that we know the probability that the value of is 10, let’s use the formula for the expected value, . Remember that the formula is where is each of the possible values of and is the probability of each of these outcomes occurring.

Using the formula, we multiply each of the possible values of by its probability and then find the sum of the products to find the expected value of :

To convert our fraction to decimal form, we can now divide 205 by 27 to get , which means that the expected value of to two decimal places is 7.59.

Finally, we will work on a problem in which we are given the expected value of a discrete random variable and must find one of the variable’s possible values. Before we can do this, however, we will need to set up a linear equation that we will then solve to help determine three unknown probabilities.

### Example 7: Using the Probability Distribution Function and Expected Value of a Discrete Random Variable to Find an Unknown

The function in the given table is a probability function of a discrete random variable . Given that the expected value of is , find the value of .

 𝑥 𝑓(𝑥) 1 2 𝐵 7 8𝑎 3𝑎 13 8𝑎

### Answer

To find the value of , we first need to find the value of . To do this, we recall that the sum of all of the probabilities in a probability distribution must be equal to 1. This allows us to set up the equation which we can solve for . Adding like terms on the left side of the equation gives us and then, after subtracting from both sides, we get

Finally, dividing both side by 19, we arrive at

Now that we know that the value of a is , we can calculate the probabilities of the outcomes 1, 2, and 7 in our table as shown:

Entering these probabilities into our table then gives us:

 𝑥 𝑓(𝑥) 1 2 𝐵 7 1657 657 13 1657

We can confirm that our probabilities are correct by checking to make sure that all of the probabilities in the probability distribution sum to 1 as follows:

Now that we have the correct probability for each of the possible values of , we can use the formula to find the value of . In the formula, is the expected value, is the number of possible outcomes, is each of these possible outcomes, and is the probability of each of these outcomes occurring. Note that, for this data set, = 1, 2, 3, 4, since there are 4 possible values of , which means that the value of is 4.

According to the formula, we must multiply each of the possible values of by its probability and then find the sum of the products to find the expected value of . However, recall that we were told that the expected value of is . Substituting this expected value, along with the values from our table, into the formula, we get

Now, we can solve the resulting equation for . Multiplying on the right side gives us

Then, adding the fractions with like denominators on the right side, we get

Next, subtracting from both sides of the equation gives us and after multiplying both sides of the equation by 3, we get

Thus, with our value of , we find that must be equal to 6.

Now, let’s finish by recapping some key points.

### Key Points

• A discrete random variable is a variable that can only assume a countable number of numerical values. The value that the variable takes on is determined by the outcome of a random phenomenon or experiment.
• An uppercase often denotes a discrete random variable, with a lowercase denoting the value that the variable takes on.
• A probability distribution is a function that gives the likelihood of obtaining each of the possible values that a discrete random variable can assume.
• The expected value, , of the discrete random variable is the most likely mean of all the outcomes for the variable when a very large number of trials are conducted.
• The formula for expected value is , where is each of the possible values of the discrete random variable and is the probability of each of these outcomes occurring.
• The sum of all of the probabilities in a probability distribution is equal to 1.
• The expected value, , for a discrete random variable that has a uniform probability distribution is , where is the last consecutive integer in the set of possible values of .

Nagwa uses cookies to ensure you get the best experience on our website. Learn more about our Privacy Policy.