Lesson Explainer: Standard Deviation of Discrete Random Variables Mathematics

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, Var(𝑋), is defined by 𝜎=(𝑋)=𝐸(π‘‹βˆ’πΈ(𝑋)),Var 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 Var(𝑋) 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 Var(𝑋)=πΈο€Ήπ‘‹ο…βˆ’(𝐸(𝑋)).

The standard deviation is 𝜎=𝜎=√(𝑋).Var

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.

π‘₯123456
𝑃(𝑋=π‘₯)161616161616

We recall that the expected value of a discrete random variable 𝑋 taking values from {π‘₯,π‘₯,…,π‘₯} is given by 𝐸(𝑋)=π‘₯𝑃(𝑋=π‘₯)+π‘₯𝑃(𝑋=π‘₯)+β‹―+π‘₯𝑃(𝑋=π‘₯).

Since 𝑋 takes values from {1,2,3,4,5,6}, we have 𝐸(𝑋)=1β‹…16+2β‹…16+3β‹…16+4β‹…16+5β‹…16+6β‹…16=72.

This gives one part of the formula above: 𝐸(𝑋)=72. Next, we need to compute the expected value of π‘‹οŠ¨. Since 𝑋 takes the values 1,2,3,…,6,π‘‹οŠ¨ should take the values 1,4,9,…,36. The probability distribution for π‘‹οŠ¨ is inherited from that of 𝑋. For our example, 𝑃𝑋=36=𝑃(𝑋=6)=16, 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 𝑋.

π‘₯149162536
𝑃𝑋=π‘₯ο…οŠ¨οŠ¨161616161616

The expected value of π‘‹οŠ¨ is computed as 𝐸𝑋=1β‹…16+4β‹…16+9β‹…16+16β‹…16+25β‹…16+36β‹…16=916.

We note that the formula for πΈο€Ήπ‘‹ο…οŠ¨ can be obtained from that of 𝐸(𝑋) by substituting the outcomes {1,…,6} with their squares {1,…,6}. 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, π‘₯=1 and π‘₯=βˆ’1). This allows us to omit the step of constructing the probability distribution for π‘‹οŠ¨ in order to compute πΈο€Ήπ‘‹ο…οŠ¨. Hence, we get Var(𝑋)=πΈο€Ήπ‘‹ο…βˆ’(𝐸(𝑋))=916βˆ’ο€Ό72=3512.

Taking the square root of the variance, we get 𝜎=ο„ž3512β‰ˆ1.71.

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:

  1. Compute 𝐸(𝑋).
  2. Compute πΈο€Ήπ‘‹ο…οŠ¨.
  3. Compute Var(𝑋)=πΈο€Ήπ‘‹ο…βˆ’(𝐸(𝑋)).
  4. Compute 𝜎=√(𝑋)Var.

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.

π‘₯οŽβˆ’5βˆ’4βˆ’3βˆ’1
𝑓(π‘₯)131814724

Answer

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

  1. Compute 𝐸(𝑋).
  2. Compute πΈο€Ήπ‘‹ο…οŠ¨.
  3. Compute Var(𝑋)=πΈο€Ήπ‘‹ο…βˆ’(𝐸(𝑋)).
  4. Compute 𝜎=√(𝑋)Var.

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 {βˆ’5,βˆ’4,βˆ’3,βˆ’1}. Then, we can calculate 𝐸(𝑋)=(βˆ’5)β‹…13+(βˆ’4)β‹…18+(βˆ’3)β‹…14+(βˆ’1)β‹…724=βˆ’7724.

We also recall that if the discrete random variable 𝑋 takes values from {π‘₯,π‘₯,…,π‘₯}, then πΈο€Ήπ‘‹ο…οŠ¨ is given by 𝐸𝑋=π‘₯𝑃(𝑋=π‘₯)+π‘₯𝑃(𝑋=π‘₯)+β‹―+π‘₯𝑃(𝑋=π‘₯).

So, 𝐸𝑋=25β‹…13+16β‹…18+9β‹…14+1β‹…724=30924=1038.

Next, we compute the variance: Var(𝑋)=πΈο€Ήπ‘‹ο…βˆ’(𝐸(𝑋))=1038βˆ’ο€Όβˆ’7724=1487576.

Taking the square root, 𝜎=ο„ž1487576=1.61.totwodecimalplaces

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 𝑃(𝑋=0)=17, 𝑃(𝑋=2)=27, and 𝑃(𝑋=4)=27, 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 𝑃(𝑋=0)+𝑃(𝑋=2)+𝑃(𝑋=4)+𝑃(𝑋=6)=1.

This means 17+27+27+𝑃(𝑋=6)=1, which leads to 𝑃(𝑋=6)=27.

We recall the steps for computing the standard deviation:

  1. Compute 𝐸(𝑋).
  2. Compute πΈο€Ήπ‘‹ο…οŠ¨.
  3. Compute Var(𝑋)=πΈο€Ήπ‘‹ο…βˆ’(𝐸(𝑋)).
  4. Compute 𝜎=√(𝑋)Var.

So, we begin by computing 𝐸(𝑋)=0β‹…17+2β‹…27+4β‹…27+6β‹…27=247.

We also compute 𝐸𝑋=0β‹…17+2β‹…27+4β‹…27+6β‹…27=1127=16.

Then, Var(𝑋)=πΈο€Ήπ‘‹ο…βˆ’(𝐸(𝑋))=16βˆ’ο€Ό247=20849.

Finally, taking the square root, 𝜎=√(𝑋)=ο„ž20849=2.06.Vartotwodecimalplaces

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 𝑓(π‘₯)=π‘Ž6π‘₯+6, 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 𝑓(0)+𝑓(2)+𝑓(5)=1.

First, we evaluate 𝑓(0), 𝑓(2), and 𝑓(5): 𝑓(0)=π‘Ž6Γ—0+6=π‘Ž6,𝑓(2)=π‘Ž6Γ—2+6=π‘Ž18,𝑓(5)=π‘Ž6Γ—5+6=π‘Ž36.

This leads to π‘Ž6+π‘Ž18+π‘Ž36=1.

Multiplying both sides of the equation by 36, we get 6π‘Ž+2π‘Ž+π‘Ž=36.

This leads to 9π‘Ž=36, so π‘Ž=4. Then, the probability distribution is given by 𝑓(0)=46Γ—0+6=23,𝑓(2)=46Γ—2+6=29,𝑓(5)=46Γ—5+6=19.

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

  1. Compute 𝐸(𝑋).
  2. Compute πΈο€Ήπ‘‹ο…οŠ¨.
  3. Compute Var(𝑋)=πΈο€Ήπ‘‹ο…βˆ’(𝐸(𝑋)).
  4. Compute 𝜎=√(𝑋)Var.

First, we have 𝐸(𝑋)=0⋅𝑓(0)+2⋅𝑓(2)+5⋅𝑓(5)=2β‹…29+5β‹…19=1.

Next, we compute 𝐸𝑋=0⋅𝑓(0)+2⋅𝑓(2)+5⋅𝑓(5)=4β‹…29+25β‹…19=113.

Then, Var(𝑋)=πΈο€Ήπ‘‹ο…βˆ’(𝐸(𝑋))=113βˆ’1=83.

Finally, taking the square root and rounding to the second decimal place, 𝜎=ο„ž83=1.63.totwodecimalplaces

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𝐴68
𝑓(π‘₯)0.20.10.10.6

Answer

In this problem, we are given the expected value 𝐸(𝑋)=6.5. We can write out the formula for the expected value to identify the unknown parameter 𝐴: 𝐸(𝑋)=3β‹…0.2+𝐴⋅0.1+6β‹…0.1+8β‹…0.6.

Setting the right-hand side equal to 6.5, we get 6+0.1𝐴=6.5, which leads to 𝐴=5.

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

  1. Compute 𝐸(𝑋).
  2. Compute πΈο€Ήπ‘‹ο…οŠ¨.
  3. Compute Var(𝑋)=πΈο€Ήπ‘‹ο…βˆ’(𝐸(𝑋)).
  4. Compute 𝜎=√(𝑋)Var.

𝐸(𝑋) is already known, so we do not need to repeat this step. We have 𝐸𝑋=3β‹…0.2+5β‹…0.1+6β‹…0.1+8β‹…0.6=46.3.

Then, Var(𝑋)=46.3βˆ’6.5=4.05, leading to 𝜎=√4.05=2.01 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 πœ‡β‰ 0. Then, the coefficient of variation 𝑐 is given by 𝑐=𝑐(𝑋)=𝜎𝐸(𝑋)Γ—100(%).ο“ο“οŒ·

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 𝐸(𝑋)=30 and 𝐸(π‘Œ)=5000 and the standard deviations 𝜎=3 and 𝜎=250. Then, the coefficient of variation for the number of elephants is 𝑐(𝑋)=𝜎𝐸(𝑋)Γ—100=330Γ—100=10%.ο“οŒ·

On the other hand, the coefficient of variation for the number of deer is 𝑐(π‘Œ)=𝜎𝐸(π‘Œ)Γ—100=2505000Γ—100=5%.ο“οŒΈ

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 𝜎𝐸(𝑋)Γ—100%, where 𝜎 is the standard deviation.

We begin by calculating the mean: 𝐸(𝑋)=1β‹…110+3β‹…210+5β‹…310+7β‹…410=5.

Next, we compute the standard deviation. Since we have already computed 𝐸(𝑋), we proceed to compute πΈο€Ήπ‘‹ο…οŠ¨ by 1β‹…0.1+3β‹…0.2+5β‹…0.3+7β‹…0.4=29.

Then, Var(𝑋)=πΈο€Ήπ‘‹ο…βˆ’(𝐸(𝑋))=29βˆ’5=4, leading to the standard deviation 𝜎=√4=2. Taking the ratio with the mean, 𝑐=𝜎𝐸(𝑋)Γ—100%=25Γ—100%=40%.

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 𝑃(𝑋=2)=112, 𝑃(𝑋=3)=14, 𝑃(𝑋=5)=13, and 𝑃(𝑋=7)=13, find the coefficient of variation to the nearest percent.

Answer

We recall that the coefficient of variation is given by 𝜎𝐸(𝑋)Γ—100%, where 𝜎 is the standard deviation.

We begin by computing the mean: 𝐸(𝑋)=2β‹…112+3β‹…14+5β‹…13+7β‹…13=5912.

Next, we compute the standard deviation. Since we have already computed 𝐸(𝑋), we proceed to compute πΈο€Ήπ‘‹ο…οŠ¨ by 2β‹…112+3β‹…14+5β‹…13+7β‹…13=1094.

Then, Var(𝑋)=1094βˆ’ο€Ό5912οˆβ‰ˆ3.0764, and the standard deviation 𝜎=√3.0764=1.75…. Finally, taking the ratio with the mean, 𝑐=𝜎𝐸(𝑋)Γ—100=1.75…÷5912Γ—100β‰ˆ35.67(%).

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 Var(𝑋)=πΈο€Ήπ‘‹ο…βˆ’(𝐸(𝑋)).
    • Compute 𝜎=√(𝑋)Var.
  • The probability distribution of π‘‹οŠ¨ is inherited from that of 𝑋.
  • The coefficient of variation 𝑐 represents the standard deviation 𝜎 as a percentage of 𝐸(𝑋): 𝑐=𝜎𝐸(𝑋)Γ—100(%).
  • Standard deviation is an absolute measure of spread, and the coefficient of variation is a relative (percentage) measure of spread.

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