topic badge

7.03 Centre and spread of discrete random variables

Lesson

 

When analysing the outcomes and probabilities of a discrete random variable, we become interested in some of the statistics we can measure. Typically, we're interested in the measures of central tendency and the measures of dispersion.

 

Expected value or mean

Measures of central tendency include the mean, median and mode, but our focus will be on the mean, or what is commonly called the expected value of our distribution.

Based on the probabilities, the expected value is which outcome we expect to occur on average within the given experiment.

The expected value, denoted $E(X)$E(X), or the mean of the distribution, is calculated as a weighted average.

Expected value of a DRV

The expected value is given the notation $E(x)$E(x) or $\mu$μ. For a discrete random variable $X$X, the expected value can be found as the sum of the product of each outcome and its associated probability. For a discrete random variable $X$X, with outcomes $x_i=\left\{x_1,x_2,x_3,...\right\}$xi={x1,x2,x3,...} and associated probabilities $P(X=x_i)=p_i$P(X=xi)=pi, we can calculate:

$E(x)=\sum_i^{\text{ }}\ x_i\times p_i$E(x)= i xi×pi

 

Worked example

Example 1

Consider the probability distribution of the discrete random variable given in the table below:

$x$x $1$1 $2$2 $3$3 $4$4 $5$5
$P(X=x)$P(X=x) $0.2$0.2 $0.15$0.15 $0.4$0.4 $0.1$0.1 $0.15$0.15

To calculate the expected value, we multiply each outcome by its probability. The probability represents the weighting for each outcome occurring.

$E(X)$E(X) $=$= $1\times0.2+2\times0.15+3\times0.4+4\times0.1+5\times0.15$1×0.2+2×0.15+3×0.4+4×0.1+5×0.15
  $=$= $2.85$2.85

 

Let's consider what this means. Clearly we're not really "expecting" an outcome of $2.85$2.85. All possible outcomes are integers and are listed in the table.

It's just like when they say the average number of children per family is $2.3$2.3. No family will have $0.3$0.3 of a child! But the mean value gives us an idea about how many children we can expect to see in a family; somewhere between two and three, and closer to two.

So in our experiment we don't expect to get $2.85$2.85, but in the long term we expect the average of all our occurrences to come to $2.85$2.85.

The expected value is not to be confused with the most likely outcome. In our distribution above, the most likely outcome is $3$3 since $P(X=3)$P(X=3) has the highest probability of $0.4$0.4. This is also our mode in our distribution.

 

Variance and standard deviation

Just as we can calculate the mean for the probability distribution of a discrete random variable, we can also calculate the variance and standard deviation. These values are a measure of the spread of the outcomes of an experiment performed many times.

We calculate the variance in the exact same way we calculate the variance of a set of data. 

The only difference is including the weights, or the probabilities, into our calculations.

Variance and standard deviation for DRV

For a discrete random variable $X$X, with outcomes $x_i=\left\{x_1,x_2,x_3,...\right\}$xi={x1,x2,x3,...} and associated probabilities $P(X=x_i)=p_i$P(X=xi)=pi, we can calculate:

 

$Var\left(X\right)$Var(X) $=$= $\sum_i^{\text{ }}\left(\left[x_i-E(x)\right]^2\times p_i\right)$ i([xiE(x)]2×pi)
  $=$= $E\left(\left[X-\mu\right]^2\right)$E([Xμ]2)

Alternatively, we can calculate the variance as follows:

$Var\left(X\right)$Var(X) $=$= $\sum_i^{\text{ }}\left(x_i^2\times p_i\right)-E(X)^2$ i(x2i×pi)E(X)2
  $=$= $E(X^2)-\mu^2$E(X2)μ2

And standard deviation, denoted $\sigma$σ can be calculated as:

$\sigma\left(X\right)=\sqrt{Var(X)}$σ(X)=Var(X)

 

As you can see, there are two equivalent versions of the variance formula. We will illustrate the use of the second version in the following worked example.

 

Worked example

Question 2

Let's use the same probability distribution from our previous chapter as an example of how to calculate the variance of a probability distribution.

Consider the probability distribution of a discrete random variable given in the table below:

$x$x $1$1 $2$2 $3$3 $4$4 $5$5
$P(X=x)$P(X=x) $0.2$0.2 $0.15$0.15 $0.4$0.4 $0.1$0.1 $0.15$0.15

Calculate the variance and standard deviation of the distribution.

We already calculated the mean or expected value as $E(X)=2.85$E(X)=2.85

Calculating the variance we get:

$Var\left(X\right)$Var(X) $=$= $\sum_i^{\text{ }}\left(x_i^2\times p_i\right)-E(X)^2$ i(x2i×pi)E(X)2
  $=$= $\left(1^2\times0.2+2^2\times0.15+3^2\times0.4+4^2\times0.1+5^2\times0.15\right)-2.85^2$(12×0.2+22×0.15+32×0.4+42×0.1+52×0.15)2.852
  $=$= $1.6275$1.6275

 

To calculate the standard deviation we simply find the square root of the variance:

$\sigma\left(X\right)$σ(X) $=$= $\sqrt{Var\left(X\right)}$Var(X)
  $=$= $\sqrt{1.6275}$1.6275
  $\approx$ $1.2757$1.2757

 

Practice questions

Question 1

Consider the probability distribution shown.

$x$x $3$3 $5$5 $7$7 $9$9 $11$11
$P\left(X=x\right)$P(X=x) $0.15$0.15 $0.2$0.2 $k$k $0.1$0.1 $0.3$0.3
  1. Find the value of $k$k.

  2. Find the mode.

  3. Find the expected value.

  4. Find the variance.

  5. Find the standard deviation.

    Round your answer to two decimal places.

Question 2

The table below represents a discrete probability distribution.

$x$x $1$1 $2$2 $3$3 $4$4 $5$5
$P$P$($($X=x$X=x$)$) $0.05$0.05 $m$m $0.1$0.1 $n$n $0.15$0.15
  1. Use a property of probability distributions to express $m$m in terms of $n$n.

  2. Use the fact that $E\left(X\right)=3.1$E(X)=3.1 to express $m$m in terms of $n$n.

  3. Hence solve for $n$n.

  4. Hence solve for $m$m.

  5. Calculate the standard deviation of the distribution.

    Give your answer to one decimal place.

Question 3:

A game uses a spinner with numbers from $1$1 to $12$12, each with equal outcome. A player wins $\$9$$9 if the outcome is greater than $9$9, $\$6$$6 if the outcome is less than $5$5 and loses $\$3$$3 for any other outcome.

  1. Let $X$X be the return from one game. Complete the probability distribution table for $X$X.

    $x$x $-$$\$3$$3 $\$6$$6 $\$9$$9
    $P\left(X=x\right)$P(X=x) $\editable{}$ $\editable{}$ $\editable{}$
  2. What is the expected return in dollars?

Outcomes

ACMMM137

use relative frequencies obtained from data to obtain point estimates of probabilities associated with a discrete random variable

ACMMM138

recognise uniform discrete random variables and use them to model random phenomena with equally likely outcomes

ACMMM140

recognise the mean or expected value of a discrete random variable as a measurement of centre, and evaluate it in simple cases

ACMMM141

recognise the variance and standard deviation of a discrete random variable as a measures of spread, and evaluate them in simple cases

ACMMM142

use discrete random variables and associated probabilities to solve practical problems

What is Mathspace

About Mathspace