Lesson Explainer: Standard Deviation of Discrete Random Variables | Nagwa Lesson Explainer: Standard Deviation of Discrete Random Variables | Nagwa

Lesson Explainer: Standard Deviation of Discrete Random Variables Mathematics • Third Year of Secondary School

Join Nagwa Classes

Attend live Mathematics sessions on Nagwa Classes to learn more about this topic from an expert teacher!

In this explainer, we will learn how to calculate the standard deviation and coefficient of variation 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.

Join Nagwa Classes

Attend live sessions on Nagwa Classes to boost your learning with guidance and advice from an expert teacher!

  • Interactive Sessions
  • Chat & Messaging
  • Realistic Exam Questions

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