7.2 Expected Value and Standard Deviation for a Discrete Probability Distribution
Learning Objectives
- Calculate and interpret the expected value of a probability distribution.
- Calculate the standard deviation for a probability distribution.
Formula & Symbol Hub
Symbols Used
- [latex]\sigma[/latex] = standard deviation
- [latex]P(x)[/latex] = probability of [latex]x[/latex]
- [latex]\mu[/latex] = mean or expected value
- [latex]\sum[/latex] = summation symbol
Formulas Used
-
Formula 7.1 – Expected Value
[latex]\begin{eqnarray*}E(x)&=&\sum\left(x\times P(x)\right)\end{eqnarray*}[/latex]
-
Formula 7.2 – Standard Deviation of a Probability Distribution
[latex]\begin{eqnarray*}\sigma&=&\sqrt{\sum\left((x-\mu)^2\times P(x)\right)}\end{eqnarray*}[/latex]
Expected Value of a Probability Distribution
The expected value is often referred to as the “long-term” average or mean. That is, over the long term of repeatedly doing an experiment, you would expect this average.
Suppose 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 the 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. Probability 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 [latex]\mu[/latex] or [latex]E(x)[/latex]. In other words, after conducting many trials of an experiment, you would expect this average value.
The expected value, denoted by [latex]\mu[/latex] or [latex]E(x)[/latex], is a weighted average where each value of the random variable is weighted by the value’s corresponding probability.
[latex]\boxed{7.1}[/latex] Expected Value
[latex]\begin{eqnarray*}{\color{red}{E(x)}}&=&{\color{blue}{\sum}}\left({\color{green}{x}}\times{\color{purple}{P(x)}}\right)\end{eqnarray*}[/latex]
[latex]{\color{red}{E(x)}}\;\text{is the expected value:}[/latex] A weighted average where each value of the random variable is weighted by the value’s corresponding probability.
[latex]{\color{blue}{\sum}}\;\text{is the summation symbol:}[/latex] Indicates that the expression to its right is repeatedly added.
[latex]{\color{green}{x}}\;\text{is a random variable:}[/latex] A variable that holds a random value.
[latex]{\color{purple}{P(x)}}\;\text{is the probability:}[/latex] The probability of the random value occurring.
Example 7.2.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:
First, let the random variable [latex]X[/latex] be the number of days the men’s soccer team plays soccer per week. [latex]X[/latex] takes on the values 0, 1, 2. The table below shows the probability distribution for [latex]X[/latex], and includes an additional column [latex]x \times P(x)[/latex] that we will use to calculate the expected value. In this new column, we will multiply each [latex]x[/latex] value by its corresponding probability.
[latex]x[/latex] | [latex]P(x)[/latex] | [latex]x \times P(x)[/latex] |
0 | 0.2 | [latex]0 \times 0.2=0[/latex] |
1 | 0.5 | [latex]1 \times 0.5=0.5[/latex] |
2 | 0.3 | [latex]2 \times 0.3=0.6[/latex] |
Add the last column to find the long-term average or expected value:
[latex]\begin{eqnarray*}E(x) & = & (0 \times 0.2) +(1 \times 0.5)+ (2 \times 0.3) \\ & = & 0+ 0.5+ 0.6 \\ & = & 1.1 \\ \end{eqnarray*}[/latex]
The expected value is 1.1. The men’s soccer team would, on 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.
NOTE
The expected value does not represent a value that the random variable takes on. The expected value is an average. In this case, the expected value of 1.1 is the average number of times the team plays per week. To understand what this means, imagine that each week, you recorded the number of times the soccer team played that week. You do this repeatedly for many, many, many weeks. Then you calculate the mean of the numbers you recorded (using the techniques we learned previously)—the mean of these numbers equals 1.1, the expected value. The number of trials must be very, very large in order for the mean of the values recorded from the trials to equal the expected value calculated using the expected value formula.
Standard Deviation of a Probability Distribution
Like data, probability distributions have standard deviations. The standard deviation, denoted [latex]\sigma[/latex], of a probability distribution for a random variable [latex]X[/latex] describes the spread or variability of the probability distribution. The standard deviation is the standard deviation you expect when doing an experiment over and over.
[latex]\boxed{7.2}[/latex] Standard Deviation of a Probability Distribution
[latex]\begin{eqnarray*}{\color{red}{\sigma}}&=&\sqrt{{\color{blue}{\sum}}\left(({\color{green}{x}}-{\color{purple}{\mu}})^2\times {\color{Bittersweet}{P(x)}}\right)}\end{eqnarray*}[/latex]
[latex]{\color{red}{\sigma}}\;\text{is the standard deviation:}[/latex] A measure of how much the values tend to deviate from the mean or expected value of the distribution.
[latex]{\color{blue}{\sum}}\;\text{is the summation symbol:}[/latex] Indicates that the expression to which it applies is repeatedly added.
[latex]{\color{green}{x}}\;\text{is a random variable:}[/latex] Represents a possible value within the distribution.
[latex]{\color{purple}{\mu}}\;\text{is the mean:}[/latex] The expected value (average) of the distribution.
[latex]{\color{Bittersweet}{P(x)}}\;\text{is the probability:}[/latex] The probability or likelihood of [latex]x[/latex] having its current value within the distribution.
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.
Example 7.2.2
Let [latex]X[/latex] be the number of times per week a newborn baby’s crying wakes its mother after midnight. The probability distribution for [latex]X[/latex] is:
[latex]x[/latex] | [latex]P(x)[/latex] |
0 | 0.04 |
1 | 0.22 |
2 | 0.46 |
3 | 0.18 |
4 | 0.08 |
5 | 0.02 |
Find the expected value and standard deviation of the number of times a newborn baby’s crying wakes its mother after midnight.
Solution:
For the expected value:
[latex]x[/latex] | [latex]P(x)[/latex] | [latex]x \times P(x)[/latex] |
0 | 0.04 | 0 |
1 | 0.22 | 0.22 |
2 | 0.46 | 0.92 |
3 | 0.18 | 0.54 |
4 | 0.08 | 0.32 |
5 | 0.02 | 0.1 |
[latex]\begin{eqnarray*} \\ \mu & = & 0 +0.22+ 0.92 +0.54 +0.32+ 0.1 \\ & = & 2.1 \\ \\ \end{eqnarray*}[/latex]
On average, a newborn wakes its mother after midnight 2.1 times per week.
For the standard deviation: For each value [latex]x[/latex], multiply the square of its deviation by its probability (each deviation has the format [latex]x-\mu[/latex]).
[latex]x[/latex] | [latex]P(x)[/latex] | [latex](x-\mu)^2 \times P(x)[/latex] |
0 | 0.04 | [latex](0-2.1)^2 \times 0.04=0.1764[/latex] |
1 | 0.22 | [latex](1-2.1)^2 \times 0.22=0.2662[/latex] |
2 | 0.46 | [latex](2-2.1)^2 \times 0.46=0.0046[/latex] |
3 | 0.18 | [latex](3-2.1)^2 \times 0.18=0.1458[/latex] |
4 | 0.08 | [latex](4-2.1)^2 \times 0.08=0.2888[/latex] |
5 | 0.02 | [latex](5-2.1)^2 \times 0.02=0.1682[/latex] |
Sum | [latex]1.05[/latex] |
Add the values in the third column of the table and then take the square root of this sum:
[latex]\begin{eqnarray*}\sigma&=&\sqrt{1.05}\\&=&1.024...\end{eqnarray*}[/latex]
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. Let [latex]X[/latex] be the number of times a post-op patient rings for the nurse. For a random sample of 50 patients, the following information was obtained. What is the expected value? What is the standard deviation?
[latex]x[/latex] | [latex]P(x)[/latex] |
0 | 0.08 |
1 | 0.16 |
2 | 0.32 |
3 | 0.28 |
4 | 0.12 |
5 | 0.04 |
Solution
For the expected value:
[latex]x[/latex] | [latex]P(x)[/latex] | [latex]x \times P(x)[/latex] |
0 | 0.08 | 0 |
1 | 0.16 | 0.16 |
2 | 0.32 | 0.64 |
3 | 0.28 | 0.84 |
4 | 0.12 | 0.48 |
5 | 0.04 | 0.2 |
[latex]\begin{eqnarray*}\\\mu&=&0+0.16+0.64+0.84+0.48+0.2\\&=&2.32\end{eqnarray*}[/latex]
For the standard deviation:
[latex]x[/latex] | [latex]P(x)[/latex] | [latex](x-\mu)^2 \times P(x)[/latex] |
0 | 0.08 | 0.430592 |
1 | 0.16 | 0.278784 |
2 | 0.32 | 0.032768 |
3 | 0.28 | 0.129472 |
4 | 0.12 | 0.338688 |
5 | 0.04 | 0.287296 |
[latex]\begin{eqnarray*}\sigma&=&\sqrt{0.430592+0.27878784+0.032768+0.129472+0.338688+0.287296}\\&=&1.22....\end{eqnarray*}[/latex]
Example 7.2.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 [latex]X[/latex] be the amount of money you profit. The values of [latex]x[/latex] are not 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. Because you are interested in your profit (or loss), the values of [latex]x[/latex] are $100,000 and −$2 dollars.
To win, you must get all five numbers correct, in order. The probability of choosing one correct number is
[latex]\displaystyle{\frac{1}{10}=0.1}[/latex] 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
[latex]\displaystyle{\frac{1}{10} \times\frac{1}{10} \times\frac{1}{10} \times\frac{1}{10} \times\frac{1}{10}=0.00001}[/latex]
Therefore, the probability of winning is 0.00001 and the probability of losing is [latex]\displaystyle{1-0.00001=0.99999}[/latex].
The expected value is as follows:
[latex]x[/latex] | [latex]P(x)[/latex] | [latex]x \times P(x)[/latex] |
[latex]-2[/latex] | [latex]0.99999[/latex] | [latex]-1.99998[/latex] |
[latex]100,000[/latex] | [latex]0.00001[/latex] | [latex]1[/latex] |
[latex]\begin{eqnarray*} \\ E(x) & = & -1.99998 +1 \\ & = & -0.99998 \\ \\ \end{eqnarray*}[/latex]
Because –0.99998 is about –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 from playing the game over the long term?
Solution
Let [latex]X[/latex] be the amount of money you profit. The values of [latex]x[/latex] are –$1 (for a loss) and $256 (for a win).
The probability of winning (guessing the correct suit on each draw) is
[latex]\displaystyle{\frac{1}{4} \times \frac{1}{4} \times \frac{1}{4} \times \frac{1}{4}=0.0039}[/latex]
The probability of losing is
[latex]\displaystyle{1-0.0039=0.9961}[/latex]
The expected value is as follows:
[latex]x[/latex] | [latex]P(x)[/latex] | [latex]x \times P(x)[/latex] |
[latex]-1[/latex] | [latex]0.99961[/latex] | [latex]-0.9961[/latex] |
[latex]256[/latex] | [latex]0.0039[/latex] | [latex]0.9984[/latex] |
[latex]\begin{eqnarray*}E(x)&=&-0.9961+0.9984\\&=&0.0023\end{eqnarray*}[/latex]
Playing the game over and over again means you would average $0.0023 in profit per game.
Example 7.2.4
Suppose you play a game with a biased coin where the probability of heads is [latex]\displaystyle{\frac{2}{3}}[/latex]. You play each game by tossing the coin once. If you toss a head, you pay $6. If you toss a tail, you win $10. If you play this game many times, will you come out ahead?
- Define a random variable [latex]X[/latex].
- Construct the probability distribution for [latex]X[/latex].
- What is the expected value? Do you come out ahead?
Solution:
- Let [latex]X[/latex] be the amount of profit per game. The values of [latex]x[/latex] are –$6 (for a loss) and $10 (for a win).
-
[latex]x[/latex] [latex]P(x)[/latex] [latex]10[/latex] [latex]\displaystyle{\frac{1}{3}}[/latex] [latex]-6[/latex] [latex]\displaystyle{\frac{2}{3}}[/latex] -
[latex]x[/latex] [latex]P(x)[/latex] [latex]x \times P(x)[/latex] [latex]10[/latex] [latex]\displaystyle{\frac{1}{3}}[/latex] [latex]\displaystyle{\frac{10}{3}}[/latex] [latex]-6[/latex] [latex]\displaystyle{\frac{2}{3}}[/latex] [latex]-4[/latex] [latex]\begin{eqnarray*} \\ E(x) & = & \frac{10}{3}+ (-4) \\ & = & -0.67 \\ \\ \end{eqnarray*}[/latex]
On average, you lose $0.67 each time you play the game, so you do not come out ahead.
Try It
Suppose you play a game with a spinner that has three colours on it: red, green, and blue. The probability of landing on red is 40% and the probability of landing on green is 20%. You play a game by spinning the spinner once. If you land on red, you pay $10. If you land on blue, you do not pay or win anything. If you land on green, you win $10. What is the expected value of this game? Do you come out ahead?
Solution
Let [latex]X[/latex] be the amount won in a game. The values of [latex]x[/latex] are –$10 (for red), 0 (for blue) and $10(for a green).
[latex]x[/latex] | [latex]P(x)[/latex] | [latex]x \times P(x)[/latex] |
[latex]-10[/latex] | [latex]0.4[/latex] | [latex]-4[/latex] |
[latex]0[/latex] | [latex]0.4[/latex] | [latex]0[/latex] |
[latex]10[/latex] | [latex]0.2[/latex] | [latex]2[/latex] |
[latex]\begin{eqnarray*} \\ E(x) & = & -4 +0 +2 \\ & = & -2 \\ \\ \end{eqnarray*}[/latex]
On average, you lose $2 per game. So you do not come out ahead.
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%. 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 [latex]X[/latex] be the amount of profit from a bet. Find the mean and standard deviation of [latex]X[/latex].
Solution
[latex]x[/latex] | [latex]P(x)[/latex] | [latex]x \times P(x)[/latex] | [latex](x-\mu)^2 \times P(x)[/latex] |
[latex]100[/latex] | [latex]0.0108[/latex] | [latex]1.08[/latex] | [latex]127.8726[/latex] |
[latex]-10[/latex] | [latex]0.9892[/latex] | [latex]-9.892[/latex] | [latex]1.3961[/latex] |
[latex]\begin{eqnarray*} \\ \mu & = & 1.08+(-9.892) \\ & = & -8.812 \\ \\ \sigma & = & \sqrt{127.7826+1.3961} \\ & = & 11.3696....\end{eqnarray*}[/latex]
Video: “Mean (expected value) of a discrete random variable | AP Statistics | Khan Academy” by Khan Academy [4:32] is licensed under the Standard YouTube License.Transcript and closed captions available on YouTube.
Video: “Variance and standard deviation of a discrete random variable | AP Statistics | Khan Academy” by Khan Academy [6:26] is licensed under the Standard YouTube License.Transcript and closed captions available on YouTube.
Video: “Mean, Standard Deviation, Variance on BA II Plus Calculator | Probability Distribution [latex]\bar{x}[/latex], SD, [latex]\sigma^2[/latex]” by Joshua Emmanuel [2:21] (Transcript Available)
Key Takeaways
Attribution
“4.3 Expected Value and Standard Deviation for a Discrete Probability Distribution” from Introduction to Statistics by Valerie Watts is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License, except where otherwise noted.