In this explainer, we will learn how to calculate the standard deviations and coefficients of variations of discrete random variables.

Standard deviation of a random variable is a measure of spread of the probability distribution. Given a random variable , the standard deviation is denoted or . Its square, which is called the variance, , is defined by where denotes the expected value of the random variable . The standard deviation is obtained by taking the positive square root of the variance. Examining this formula a little closer, we see that is the average value of the squared distance of data points from the expected value. The unit of this average would be the square of the original variableβs unit, so we take the square root to ensure the unit agrees with the original variable . In short, the standard deviation represents how far, on average, outcomes of the random variable are from the expected value.

In the picture above, the probability distribution of the random variable is given. denotes the expected value, and denotes the standard deviation.

The formula given above for standard deviation is cumbersome to use in practice, so we introduce a variant of this formula. Since this alternative formula is simpler to use, we will use it instead as the definition.

### Definition: Standard Deviation

Given a random variable , the variance of is given by

The standard deviation is

The subscript in is used when more than one random variable is involved in a problem. For the random variable , will denote its standard deviation. If there is one random variable to consider, the subscript is omitted and the simpler symbol is preferred

To compute the standard deviation using this formula, we first need to compute the expected values of and . Let us practice this using a die roll. Let be a random variable representing the outcomes of rolling a fair die. Then, we have the probability distribution shown.

1 | 2 | 3 | 4 | 5 | 6 | |

We recall that the expected value of a discrete random variable taking values from is given by

Since takes values from , we have

This gives one part of the formula above: . Next, we need to compute the expected value of . Since takes the values should take the values . The probability distribution for is inherited from that of . For our example, , so the probability of the squared value agrees with that of the original outcome. Likewise, we can see that the second row of the probability distribution for is identical to that of .

1 | 4 | 9 | 16 | 25 | 36 | |

The expected value of is computed as

We note that the formula for can be obtained from that of by substituting the outcomes with their squares . In general, for the discrete random variable taking values from , we have

This formula is valid even when two different outcomes have the same squared values (for instance, and ). This allows us to omit the step of constructing the probability distribution for in order to compute . Hence, we get

Taking the square root of the variance, we get

The standard deviation of a die roll is approximately 1.71, which means that, on average, a die roll is approximately 1.71 away from 3.5. We outline this process below.

### How To: Computing the Standard Deviation of a Discrete Random Variable

Let be a discrete random variable. The standard deviation is obtained by the following process:

- Compute .
- Compute .
- Compute .
- Compute .

We note that we have omitted the step of constructing the probability distribution for . Although it is beneficial to keep this in mind when carrying out the listed steps, it is not necessary to obtain the correct final answer.

It should be noted, however, that two different outcomes may have the same squared value. Let us look at a few examples to familiarize ourselves with different contexts.

### Example 1: Determining the Standard Deviation for a Discrete Random Variable

The function in the given table is a probability function of a discrete random variable . Find the standard deviation of . Give your answer to two decimal places.

### Answer

We remember the four-step process used to obtain the standard deviation :

- Compute .
- Compute .
- Compute .
- Compute .

We recall that the expected value of the discrete random variable taking values from is given by

We are given that the random variable takes values from . Then, we can calculate

We also recall that if the discrete random variable takes values from , then is given by

So,

Next, we compute the variance:

Taking the square root,

So, the standard deviation is 1.61 approximated to two decimal places.

### Example 2: Determining the Standard Deviation for a Discrete Random Variable from Word Description

Let denote the discrete random variable that can take the values 0, 2, 4 and 6. Given that , , and , find the standard deviation of , giving your answer to two decimal places.

### Answer

We notice that, while there are four possible values for , only three of the outcomes have their associated probabilities given. In particular, the probability for the outcome 6 is missing. Using the fact that the probabilities of all outcomes must sum to 1, we know that

This means which leads to .

We recall the steps for computing the standard deviation:

- Compute .
- Compute .
- Compute .
- Compute .

So, we begin by computing

We also compute

Then,

Finally, taking the square root,

So, the standard deviation rounded to two decimal places is 2.06.

In the following two questions, we will look at examples involving unknown parameters in the probability distribution.

### Example 3: Determining the Standard Deviation for a Discrete Random Variable

Let denote a discrete random variable that can take the values 0, 2, and 5. Given that has probability distribution function , find the standard deviation of . Given your answer to 2 decimal places.

### Answer

In this problem, the unknown parameter can be found using the fact that the probabilities of all outcomes must sum to 1. Since 0, 2, and 5 are the only possible outcomes, we know that

First, we evaluate , , and :

This leads to

Multiplying both sides of the equation by 36, we get

This leads to , so . Then, the probability distribution is given by

We follow the steps that help us obtain the standard deviation:

- Compute .
- Compute .
- Compute .
- Compute .

First, we have

Next, we compute

Then,

Finally, taking the square root and rounding to the second decimal place,

So, the standard deviation rounded to two decimal places is 1.63.

### Example 4: Determining the Standard Deviation for a Discrete Random Variable

The function in the given table is a probability function of a discrete random variable . Given that the expected value of is 6.5, find the standard deviation of . Give your answer to two decimal places.

3 | 6 | 8 | ||

0.2 | 0.1 | 0.1 | 0.6 |

### Answer

In this problem, we are given the expected value . We can write out the formula for the expected value to identify the unknown parameter :

Setting the right-hand side equal to 6.5, we get , which leads to .

To compute the standard deviation, we recall the steps involved:

- Compute .
- Compute .
- Compute .
- Compute .

is already known, so we do not need to repeat this step. We have

Then, , leading to to two decimal places.

So, the standard deviation rounded to two decimal places is 2.01.

The coefficient of variation gives the standard deviation as a percentage of the expected value.

### Definition: Coefficient of Variation

Let be a discrete random variable with mean and standard deviation . Assume further that . Then, the coefficient of variation is given by

Clearly, is not defined when the mean is equal to zero. Also, the coefficient of variation will be negative when the expected value is negative, since the standard deviation is always positive.

While the standard deviation is an absolute measure of spread, the coefficient of variation is a relative measure of spread. Because variables with larger expected values are more likely to be more spread out, it makes sense to use a relative measure when comparing spreads. The coefficient of variation represents how far, on average, data points are from the mean relative to the size of the mean.

For example, let and , respectively, represent the number of elephants and the number of deer in an African reserve. Say that and have the means and and the standard deviations and . Then, the coefficient of variation for the number of elephants is

On the other hand, the coefficient of variation for the number of deer is

Although has a larger absolute measure of spread than (250 versus 3), it has a smaller relative measure of spread (5% versus 10%). In other words, although the number of deer is more varied than the number of elephants in pure numbers, variability in the number of deer is a smaller percentage of their average number in comparison to the number of elephants.

Let us familiarize ourselves with the coefficient of variation using the following examples.

### Example 5: Computing the Coefficient of Variation of a Discrete Random Variable from Graphs

Work out the coefficient of variation of the random variable whose probability distribution is shown. Give your answer to the nearest percent.

### Answer

We are given the probability distribution as a graph. We recall that the coefficient of variation is given by , where is the standard deviation.

We begin by calculating the mean:

Next, we compute the standard deviation. Since we have already computed , we proceed to compute by

Then, leading to the standard deviation . Taking the ratio with the mean,

So, the coefficient of variation is 40%.

### Example 6: Computing the Coefficient of Variation of a Discrete Random Variable from Word Description

Let denote a discrete random variable that can take the values 2, 3, 5, and 7. Given that , , , and , find the coefficient of variation to the nearest percent.

### Answer

We recall that the coefficient of variation is given by , where is the standard deviation.

We begin by computing the mean:

Next, we compute the standard deviation. Since we have already computed , we proceed to compute by

Then, , and the standard deviation . Finally, taking the ratio with the mean,

Rounding to the nearest percent, the coefficient of variation is 36%.

Let us summarize a few important concepts from this explainer.

### Key Points

- Given the probability distribution of a random variable ,
we can compute the standard deviation by following these steps:
- Compute .
- Compute .
- Compute .
- Compute .

- The probability distribution of is inherited from that of .
- The coefficient of variation represents the standard deviation as a percentage of :
- Standard deviation is an absolute measure of spread, and the coefficient of variation is a relative (percentage) measure of spread.