# 4.2: Mean / Expected Value and Standard Deviation of Discrete Random Variable


The expected value is often referred to as the “long-term” average or mean. This means that over the long term of doing an experiment over and over, you would expect this average.

You toss a coin and record the result. What is the probability that the result is heads? If you flip a coin two times, does probability tell you that these flips will result in one heads and one tail? You might toss a fair coin ten times and record nine heads. Probability does not describe the short-term results of an experiment. It gives information about what can be expected in the long term. To demonstrate this, Karl Pearson once tossed a fair coin 24,000 times! He recorded the results of each toss, obtaining heads 12,012 times.
In his experiment, Pearson illustrated the Law of Large Numbers.

The Law of Large Numbers states that, as the number of trials in a probability experiment increases, the difference between the theoretical probability of an event and the relative frequency approaches zero (the theoretical probability and the relative frequency get closer and closer together). When evaluating the long-term results of statistical experiments, we often want to know the “average” outcome. This “long-term average” is known as the mean or expected value of the experiment and is denoted by the Greek letter μ. In other words, after conducting many trials of an experiment, you would expect this average value.

 Expected Value, $\mu$ = ${x}_{1}*P({x}_{1})$ + ${x}_{2}*P({x}_{2})$ + ${x}_{3}*P({x}_{3})$ + …. = sum of all (x * P(x) ) Variance, $\sigma$2 =  sum of all ((x – μ)2 ⋅ P(x)) Standard deviation, $\sigma$ = $\sqrt{{\sigma}^{2}}$

## Example 1

A men’s soccer team plays soccer zero, one, or two days a week. The probability that they play zero days is 0.2, the probability that they play one day is 0.5, and the probability that they play two days is 0.3.
Find the long-term average or expected value, μ, of the number of days per week the men’s soccer team plays soccer.

### Solution:

To do the problem, first let the random variable X = the number of days the men’s soccer team plays soccer per week. X takes on the values 0, 1, 2. Construct a PDF table adding a column xP(x). In this column, you will multiply each x value by its probability.

Expected Value Table. This table is called an expected value table. The table helps you calculate the expected value or long-term average.

x P(x) x P(x)
0 0.2 (0)(0.2) = 0
1 0.5 (1)(0.5) = 0.5
2 0.3 (2)(0.3) = 0.6

Add the last column xP(x) to find the long term average or expected value: (0)(0.2) + (1)(0.5) + (2)(0.3) = 0 + 0.5 + 0.6 = 1.1.

The expected value is 1.1. The men’s soccer team would, on the average, expect to play soccer 1.1 days per week. The number 1.1 is the long-term average or expected value if the men’s soccer team plays soccer week after week after week. We say μ = 1.1.

## Example 2

The probability that a newborn baby does not cry after midnight is $\frac{2}{50}$.
The probability that a newborn baby cries once after midnight is $\frac{11}{50}$.
The probability that a newborn baby cries twice after midnight is $\frac{23}{50}$.
The probability that a newborn baby cries thrice after midnight is $\frac{9}{50}$.
The probability that a newborn baby cries for 4 times after midnight is $\frac{4}{50}$.
The probability that a newborn baby cries for 5 times after midnight is $\frac{1}{50}$.

1. Find the expected value of the number of times a newborn baby’s crying wakes its mother after midnight.
(The expected value is the expected number of times per week a newborn baby’s crying wakes its mother after midnight. )
2. Calculate the standard deviation of the variable as well.

### Solution:

1. You expect a newborn to wake its mother after midnight 2.1 times per week, on the average.
x (Number of times a newborn baby crying after midnight) P(x) x P(x) (xμ)2P(x)
0 $\displaystyle{P}{({x}={0})}=\frac{{2}}{{50}}$ $\displaystyle{({0})}{(\frac{{2}}{{50}})}=\frac{{0}}{{50}}$ $\displaystyle { ( { 0 } - { 2.1 } ) } ^{ { 2 } } \cdot { 0.04}={0.1764}$
1 $\displaystyle{P}{({x}={1})}=\frac{{11}}{{50}}$ $\displaystyle{({1})}{(\frac{{11}}{{50}})}=\frac{{11}}{{50}}$ $\displaystyle{({1}-{2.1})}^{{2}}\cdot{0.22}={0.2662}$
2 $\displaystyle{P}{({x}={2})}=\frac{{23}}{{50}}$ $\displaystyle{({2})}{(\frac{{23}}{{50}})}=\frac{{46}}{{50}}$ $\displaystyle{({2}-{2.1})}^{{2}}\cdot{0.46}={0.0046}$
3 $\displaystyle{P}{({x}={3})}=\frac{{9}}{{50}}$ $\displaystyle{({3})}{(\frac{{9}}{{50}})}=\frac{{27}}{{50}}$ $\displaystyle{({3}-{2.1})}^{{2}}\cdot{0.18}={0.1458}$
4 $\displaystyle{P}{({x}={4})}=\frac{{4}}{{50}}$ $\displaystyle{({4})}{(\frac{{4}}{{50}})}=\frac{{16}}{{50}}$ $\displaystyle{({4}-{2.1})}^{{2}}\cdot{0.08}={0.2888}$
5 $\displaystyle{P}{({x}={5})}=\frac{{1}}{{50}}$ $\displaystyle{({5})}{(\frac{{1}}{{50}})}=\frac{{5}}{{50}}$ $\displaystyle{({5}-{2.1})}^{{2}}\cdot{0.02}={0.1682}$
sum of all (x P(x) ) = 2.1  sum of all ( (xμ)2P(x) ) = 1.05

Add the values in the third column of the table to find the expected value of X:

μ = Expected Value = $\displaystyle\frac{0}{50}$ + $\displaystyle\frac{11}{50}$$\displaystyle\frac{46}{50}$ + $\displaystyle\frac{27}{50}$ + $\displaystyle\frac{16}{50}$ + $\displaystyle\frac{5}{50}$ =  $\displaystyle\frac{{105}}{{50}}$ = 2.1

2. Use μ to complete the table. The fourth column of this table will provide the values you need to calculate the standard deviation. For each value x, multiply the square of its deviation by its probability. (Each deviation has the format xμ).

Add the values in the fourth column of the table:

variance of X = 0.1764 + 0.2662 + 0.0046 + 0.1458 + 0.2888 + 0.1682 = 1.05

The standard deviation of X is the square root of this sum: $\displaystyle \sigma = \sqrt{{1.05}} \simeq {1.0247}$

### Try It

A hospital researcher is interested in the number of times the average post-op patient will ring the nurse during a 12-hour shift. For a random sample of 50 patients, the following information was obtained. What is the expected value?

[practice-area rows=”1″][/practice-area]

x P(x)
0 $\displaystyle{P}{({x}={0})}=\frac{{4}}{{50}}$
1 $\displaystyle{P}{({x}={1})}=\frac{{8}}{{50}}$
2 $\displaystyle{P}{({x}={2})}=\frac{{16}}{{50}}$
3 $\displaystyle{P}{({x}={3})}=\frac{{14}}{{50}}$
4 $\displaystyle{P}{({x}={4})}=\frac{{6}}{{50}}$
5 $\displaystyle{P}{({x}={5})}=\frac{{2}}{{50}}$

($\displaystyle{0})\frac{{4}}{{50}}+{({1})}\frac{{4}}{{50}}+{({2})}\frac{{16}}{{50}}+{({3})}\frac{{14}}{{50}}+{({4})}\frac{{6}}{{50}}+{({5})}\frac{{2}}{{50}}={0}+\frac{{8}}{{50}}+\frac{{32}}{{50}}+\frac{{42}}{{50}}+\frac{{24}}{{50}}+\frac{{10}}{{50}}=\frac{{116}}{{50}}={2.32}$

The expected value is 2.32. [/hidden-answer]

## Example 3

Suppose you play a game of chance in which five numbers are chosen from 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. A computer randomly selects five numbers from zero to nine with replacement. You pay $2 to play and could profit$100,000 if you match all five numbers in order (you get your $2 back plus$100,000). Over the long term, what is your expected profit of playing the game?

### Solution:

To do this problem, set up an expected value table for the amount of money you can profit.

Let X = the amount of money you profit. The values of x are not 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.

If you purchase a ticket, you will either make a profit of $100,000 or lose$2.
Since you are interested in your profit, the values of x are 100,000 dollars and −2 dollars.

To win, you must get all five numbers correct, in order. The probability of choosing one correct number is $\frac{{1}}{{10}}$ because there are ten numbers. You may choose a number more than once. The probability of choosing all five numbers correctly and in order is

$\displaystyle{(\frac{{1}}{{10}})}{(\frac{{1}}{{10}})}{(\frac{{1}}{{10}})}{(\frac{{1}}{{10}})}{(\frac{{1}}{{10}})}={({1})}{({10}^{{-{5}}})}={0.00001}$

Therefore, the probability of winning is 0.00001 and the probability of losing is $\displaystyle{1}-{0.00001}={0.99999}\\$

The expected value table is as follows:

x P(x) x P(x)
Loss –2 0.99999 (–2)(0.99999) = –1.99998
Profit 100,000 0.00001 (100000)(0.00001) = 1

Αdd the value of xP(x). Expected value, $\mu$ = –1.99998 + 1 = –0.99998 $\simeq$ 1

Since –0.99998 is closed to –1, you would, on average, expect to lose approximately $1 for each game you play. However, each time you play, you either lose$2 or profit $100,000. The$1 is the average or expected LOSS per game after playing this game over and over.

### Try It

You are playing a game of chance in which four cards are drawn from a standard deck of 52 cards. You guess the suit of each card before it is drawn. The cards are replaced in the deck on each draw. You pay $1 to play. If you guess the right suit every time, you get your money back and$256.
What is your expected profit of playing the game over the long term?

Let X = the amount of money you profit. The x-values are –$1 and$256.

The probability of guessing the right suit each time is

$\displaystyle{(\frac{{1}}{{4}})}{(\frac{{1}}{{4}})}{(\frac{{1}}{{4}})}{(\frac{{1}}{{4}})}=\frac{{1}}{{256}}={0.0039}$

The probability of losing is
$\displaystyle{1}-\frac{{1}}{{256}}=\frac{{255}}{{256}}={0.9961}$

Expected profit of playing the game over the long term = (0.0039)256 + (0.9961)(–1) = 0.9984 + (–0.9961) = 0.0023 or 0.23 cents.

## Example 4

Suppose you play a game with a biased coin. You play each game by tossing the coin once.
P(heads) = $\displaystyle\frac{{2}}{{3}}$
If you toss a head, you pay $6. If you toss a tail, you win$10.

1. Define a random variable X.
2. Complete the following expected value table.
x ____ ____
WIN 10 $\displaystyle \frac{{1}}{{3}}$ ____
LOSE ____ ____ $\displaystyle \frac{{-12}}{{3}}$
3. What is the expected value, μ?  Do you come out ahead?

1. X = amount of profit
2. x P(x) x P(x)
WIN 10 $\displaystyle \frac{{1}}{{3}} \\$ $\displaystyle \frac{{10}}{{3}} \\$
LOSE –6 $\displaystyle \frac{{2}}{{3}} \\$ $\displaystyle \frac{{-12}}{{3}} \\$
3. The expected value μ = sum of all (xP(x)) = $\frac{10}{3}$ + $\frac{-12}{3}$ = $\displaystyle \frac{{-2}}{{3}}$.
You lose, on average, about 67 cents each time you play the game so you do not come out ahead. [/hidden-answer]

## Example 5

Suppose you play a game with a spinner. You play each game by spinning the spinner once.
P(red) = $\displaystyle\frac{{2}}{{5}}$.
If you land on red, you pay $10. If you land on blue, you don’t pay or win anything. If you land on green, you win$10.

Complete the following expected value table.

 x P(x) x ⋅ P(x) Red – $\frac{{20}}{{5}}$ Blue $\frac{2}{5}$ Green 10

x P(x) x P(x)
Red –10 $\frac{{2}}{{5}}$ $-\frac{{20}}{{5}}$
Blue 0 $\frac{{2}}{{5}}$ $\frac{{0}}{{5}}$
Green 10 $\frac{{1}}{{5}}$ $\frac{{10}}{{5}}$

Like data, probability distributions have standard deviations. To calculate the standard deviation (σ) of a probability distribution, find each deviation from its expected value, square it, multiply it by its probability, add the products, and take the square root. To understand how to do the calculation, look at the table for the number of days per week a men’s soccer team plays soccer. To find the standard deviation, add the entries in the column labeled (xμ)2P(x) and take the square root.

x P(x) x P(x) (xμ)2⋅ P(x)
0 0.2 (0)(0.2) = 0 (0 – 1.1 )2(0.2) = 0.242
1 0.5 (1)(0.5) = 0.5 (1 – 1.1 )2(0.5) = 0.005
2 0.3 (2)(0.3) = 0.6 (2 – 1.1 )2(0.3) = 0.243

Variance, $\sigma$ = sum of all ((xμ)2P(x)) = 0.242 + 0.005 + 0.243 = 0.490.
The standard deviation, σ = $\sqrt{0.49}$ = 0.7

Generally for probability distributions, we use a calculator or a computer to calculate μ and σ to reduce rounding error. For some probability distributions, there are short-cut formulas for calculating μ and σ.

## Example 6

Toss a fair, six-sided die twice.

Let X = the number of faces that show an even number.

Construct a table and calculate the mean μ and standard deviation σ of X.

Tossing one fair six-sided die twice has the same sample space as tossing two fair six-sided dice. The sample space has 36 outcomes:

 (1, 1) (1, 2) (1, 3) (1, 4) (1, 5) (1, 6) (2, 1) (2, 2) (2, 3) (2, 4) (2, 5) (2, 6) (3, 1) (3, 2) (3, 3) (3, 4) (3, 5) (3, 6) (4, 1) (4, 2) (4, 3) (4, 4) (4, 5) (4, 6) (5, 1) (5, 2) (5, 3) (5, 4) (5, 5) (5, 6) (6, 1) (6, 2) (6, 3) (6, 4) (6, 5) (6, 6)

Use the sample space to complete the following table:

Calculating μ and σ.

x P(x) x ⋅ P(x) (xμ)2P(x)
0 $\displaystyle\frac{{9}}{{36}}$ 0 $\displaystyle{({0}-{1})}^{{2}} \cdot \frac{{9}}{{36}}=\frac{{9}}{{36}}$
1 $\displaystyle\frac{{18}}{{36}}$ $\displaystyle\frac{{18}}{{36}}$ $\displaystyle{({1}-{1})}^{{2}} \cdot \frac{{18}}{{36}}={0}$
2 $\displaystyle\frac{{9}}{{36}}$ $\displaystyle\frac{{18}}{{36}}$ $\displaystyle{({2}-{1})}^{{2}} \cdot \frac{{9}}{{36}}=\frac{{9}}{{36}}$

Add the values in the third column to find the Expected Value: $\displaystyle \mu =\frac{{36}}{{36}}={1}$.

Add the values in the fourth column and take the square root of the sum:
Standard deviation = $\displaystyle \sigma =\sqrt {{\frac{{18}}{{36}}}} \simeq {0.7071}$.

## Example 7

On May 11, 2013 at 9:30 PM, the probability that moderate seismic activity (one moderate earthquake) would occur in the next 48 hours in Iran was about 21.42%. Suppose you make a bet that a moderate earthquake will occur in Iran during this period. If you win the bet, you win $50. If you lose the bet, you pay$20.

Let X = the amount of profit from a bet.

P(win) = P(one moderate earthquake will occur) = 21.42%

P(loss) = P(one moderate earthquake will not occur) = 100% – 21.42%

If you bet many times, will you come out ahead? Explain your answer in a complete sentence using numbers.
What is the standard deviation of X?

### Solution:

x P(x) x⋅ P(x) (xμ)2⋅ P(x)
win 50 0.2142 10.71 (50 – (–5.006))2 (0.2142) = 648.0964
loss –20 0.7858 –15.716 (–20 – (–5.006))2⋅ (0.7858) = 176.6636

Mean = Expected Value = 10.71 + (–15.716) = –5.006.

If you make this bet many times under the same conditions, your long term outcome will be an average loss of $5.01 per bet. $\displaystyle \text{Standard Deviation} = \sqrt{{{648.0964}+{176.6636}}} \simeq {28.7186}$ ### Try It On May 11, 2013 at 9:30 PM, the probability that moderate seismic activity (one moderate earthquake) would occur in the next 48 hours in Japan was about 1.08%. As in Example 6, you bet that a moderate earthquake will occur in Japan during this period. If you win the bet, you win$100. If you lose the bet, you pay $10. Let X = the amount of profit from a bet. Find the mean and standard deviation of X. [reveal-answer q=”306554″]Click here to show answer: [/reveal-answer] [hidden-answer a=”306554″] x P(x) x ⋅ (Px) (xμ)2P(x) win 100 0.0108 1.08 [100 – (–8.812)]2 ⋅ 0.0108 = 127.8726 loss –10 0.9892 –9.892 [–10 – (–8.812)]2 ⋅ 0.9892 = 1.3961 Mean = Expected Value = μ = 1.08 + (–9.892) = –8.812 If you make this bet many times under the same conditions, your long term outcome will be an average loss of$8.81 per bet.

$\displaystyle \text{Standard Deviation} = \sqrt{{{127.7826}+{1.3961}}} \simeq {11.3696}$

Some of the more common discrete probability functions are binomial, geometric, hypergeometric, and Poisson. Most elementary courses do not cover these distributions. Your instructor will let you know if he or she wishes to cover these distributions.

A probability distribution function is a pattern. You try to fit a probability problem into a pattern or distribution in order to perform the necessary calculations. These distributions are tools to make solving probability problems easier. Each distribution has its own special characteristics. Learning the characteristics enables you to distinguish among the different distributions.

## References

Class Catalogue at the Florida State University. Available online at https://apps.oti.fsu.edu/RegistrarCo...archFormLegacy (accessed May 15, 2013).

“World Earthquakes: Live Earthquake News and Highlights,” World Earthquakes, 2012. http://www.world-earthquakes.com/ind...thq_prediction (accessed May 15, 2013).

## Concept Review

The expected value, or mean, of a discrete random variable predicts the long-term results of a statistical experiment that has been repeated many times. The standard deviation of a probability distribution is used to measure the variability of possible outcomes.

## Formula Review

Mean or Expected Value:
$\displaystyle\mu=\sum_{{{x}in{X}}}{x}{P}{({x})}\\$

Standard Deviation:
$\displaystyle\sigma=\sqrt{{\sum_{{{x}in{X}}}{({x}-\mu)}^{{2}}{P}{({x})}}}\\$

A YouTube element has been excluded from this version of the text. You can view it online here: http://pb.libretexts.org/esm/?p=78