5.3: Expectation, Variance and Standard Deviation
- Page ID
- 26059
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)
( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\id}{\mathrm{id}}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\kernel}{\mathrm{null}\,}\)
\( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\)
\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\)
\( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)
\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)
\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)
\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vectorC}[1]{\textbf{#1}} \)
\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)
\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)
\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)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. As you learned in Chapter 3, 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 \(\mu\). In other words, after conducting many trials of an experiment, you would expect this average value.
To find the expected value or long term average, \(\mu\), simply multiply each value of the random variable by its probability and add the products.
Example \(\PageIndex{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, \(\mu\), 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 \(x*P(x)\). In this column, you will multiply each \(x\) value by its probability.
\(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 \(x*P(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. \nonumber\]
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 \(\mu = 1.1\).
Example \(\PageIndex{2}\)
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. Calculate the standard deviation of the variable as well.
\(x\) | \(P(x)\) | \(x*P(x)\) | (x – \(\mu)^{2} ⋅ P(x)\) |
---|---|---|---|
0 | \(P(x = 0) = \dfrac{2}{50}\) | \((0)\left(\dfrac{2}{50}\right) = 0\) | (0 – 2.1)^{2} ⋅ 0.04 = 0.1764 |
1 | \(P(x = 1) = \dfrac{11}{50}\) | \((1)\left(\dfrac{11}{50}\right) = \dfrac{11}{50}\) | (1 – 2.1)^{2} ⋅ 0.22 = 0.2662 |
2 | \(P(x = 2) = \dfrac{23}{50}\) | \((2)\left(\dfrac{23}{50}\right) = \dfrac{46}{50}\) | (2 – 2.1)^{2} ⋅ 0.46 = 0.0046 |
3 | \(P(x = 3) = \dfrac{9}{50}\) | \((3)\left(\dfrac{9}{50}\right) = \dfrac{27}{50}\) | (3 – 2.1)^{2} ⋅ 0.18 = 0.1458 |
4 | \(P(x = 4) = \dfrac{4}{50}\) | \((4)\left(\dfrac{4}{50}\right) = \dfrac{16}{50}\) | (4 – 2.1)^{2} ⋅ 0.08 = 0.2888 |
5 | \(P(x = 5) = \dfrac{1}{50}\) | \((5)\left(\dfrac{1}{50}\right) = \dfrac{5}{50}\) | (5 – 2.1)^{2} ⋅ 0.02 = 0.1682 |
Add the values in the third column of the table to find the expected value of \(X\):
\[\mu = \text{Expected Value} = \dfrac{105}{50} = 2.1 \nonumber\]
Use \(\mu\) 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 – \mu\).
Add the values in the fourth column of the table:
\[0.1764 + 0.2662 + 0.0046 + 0.1458 + 0.2888 + 0.1682 = 1.05 \nonumber\]
The standard deviation of \(X\) is the square root of this sum: \(\sigma = \sqrt{1.05} \approx 1.0247\)
The mean, μ, of a discrete probability function is the expected value.
\[μ=∑(x∙P(x))\nonumber\]
The standard deviation, Σ, of the PDF is the square root of the variance.
\[σ=\sqrt{∑[(x – μ)2 ∙ P(x)]}\nonumber\]
When all outcomes in the probability distribution are equally likely, these formulas coincide with the mean and standard deviation of the set of possible outcomes.
Example \(\PageIndex{2}\)
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?
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. Since you are interested in your profit (or loss), 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 \(\dfrac{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
\[\begin{align*} \left(\dfrac{1}{10}\right) \left(\dfrac{1}{10}\right) \left(\dfrac{1}{10}\right) \left(\dfrac{1}{10}\right) \left(\dfrac{1}{10}\right) &= (1)(10^{-5}) \\[5pt] &= 0.00001. \end{align*}\]
Therefore, the probability of winning is 0.00001 and the probability of losing is
\[1−0.00001=0.99999.1−0.00001 = 0.99999.\nonumber\]
The expected value table is as follows:
\(x\) | \(P(x)\) | \(xP(x)\) | |
---|---|---|---|
Loss | –2 | 0.99999 | (–2)(0.99999) = –1.99998 |
Profit | 100,000 | 0.00001 | (100000)(0.00001) = 1 |
Since –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.
Example \(\PageIndex{4}\)
Suppose you play a game with a biased coin. You play each game by tossing the coin once. \(P(\text{heads}) = \dfrac{2}{3}\) and \(P(\text{tails}) = \dfrac{1}{3}\). 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 \(X\).
- Complete the following expected value table.
- What is the expected value, \(\mu\)? Do you come out ahead?
Solutions
a.
\(X\) = amount of profit
\(x\) | ____ | ____ | |
---|---|---|---|
WIN | 10 | \(\dfrac{1}{3}\) | ____ |
LOSE | ____ | ____ | \(\dfrac{-12}{3}\) |
b.
\(x\) | \(P(x)\) | \(xP(x)\) | |
---|---|---|---|
WIN | 10 | \(\dfrac{1}{3}\) | \(\dfrac{10}{3}\) |
LOSE | –6 | \(\dfrac{2}{3}\) | \(\dfrac{-12}{3}\) |
c.
Add the last column of the table. The expected value \(\mu = \dfrac{-2}{3}\). You lose, on average, about 67 cents each time you play the game so you do not come out ahead.
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) – \mu^{2}P(x)\) and take the square root.
\(x\) | \(P(x)\) | \(x*P(x)\) | \((x – \mu)^{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 |
Add the last column in the table. \(0.242 + 0.005 + 0.243 = 0.490\). The standard deviation is the square root of 0.49, or \(\sigma = \sqrt{0.49} = 0.7\)
Generally for probability distributions, we use a calculator or a computer to calculate \(\mu\) and \(\sigma\) to reduce roundoff error. For some probability distributions, there are short-cut formulas for calculating \(\mu\) and \(\sigma\).
Example \(\PageIndex{5}\)
Toss a fair, six-sided die twice. Let \(X\) = the number of faces that show an even number. Construct a table like Table and calculate the mean \(\mu\) and standard deviation \(\sigma\) of \(X\).
Solution
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:
\(x\) | \(P(x)\) | \(xP(x)\) | \((x – \mu)^{2} ⋅ P(x)\) |
---|---|---|---|
0 | \(\dfrac{9}{36}\) | 0 | \((0 – 1)^{2} ⋅ \dfrac{9}{36} = \dfrac{9}{36}\) |
1 | \(\dfrac{18}{36}\) | \(\dfrac{18}{36}\) | \((1 – 1)^{2} ⋅ \dfrac{18}{36} = 0\) |
2 | \(\dfrac{9}{36}\) | \(\dfrac{18}{36}\) | \((1 – 1)^{2} ⋅ \dfrac{9}{36} = \dfrac{9}{36}\) |
Add the values in the third column to find the expected value: \(\mu\) = \(\dfrac{36}{36}\) = 1. Use this value to complete the fourth column.
Add the values in the fourth column and take the square root of the sum:
\[\sigma = \sqrt{\dfrac{18}{36}} \approx 0.7071.\]
Example \(\PageIndex{6}\)
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(\text{win}) = P(\text{one moderate earthquake will occur}) = 21.42%\)
\(P(\text{loss}) = P(\text{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\)? Construct a table similar to Table and Table to help you answer these questions.
Answer
\(x\) | \(P(x)\) | \(xP(x)\) | \((x – \mu^{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.
Standard Deviation \(= \sqrt{648.0964+176.6636} \approx 28.7186\)
Some of the more common discrete probability functions are binomial, geometric, hypergeometric, and Poisson. Most elementary courses do not cover the geometric, hypergeometric, and Poisson. 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.
Summary
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: \(\mu = \sum_{x \in X}xP(x)\)
- Standard Deviation: \(\sigma = \sqrt{\sum_{x \in X}(x - \mu)^{2}P(x)}\)
WeBWorK Problems
Query \(\PageIndex{1}\)
Query \(\PageIndex{2}\)
Query \(\PageIndex{3}\)
Query \(\PageIndex{4}\)
Query \(\PageIndex{5}\)
Query \(\PageIndex{6}\)
Query \(\PageIndex{7}\)
Query \(\PageIndex{8}\)
Query \(\PageIndex{9}\)
Query \(\PageIndex{10}\)
Query \(\PageIndex{11}\)
Query \(\PageIndex{12}\)
Glossary
- Expected Value
- expected arithmetic average when an experiment is repeated many times; also called the mean. Notations: \(\mu\). For a discrete random variable (RV) with probability distribution function \(P(x)\),the definition can also be written in the form \(\mu = \sum{xP(x)}\).
- Mean
- a number that measures the central tendency; a common name for mean is ‘average.’ The term ‘mean’ is a shortened form of ‘arithmetic mean.’ By definition, the mean for a sample (detonated by \(\bar{x}\)) is \(\bar{x} = \dfrac{\text{Sum of all values in the sample}}{\text{Number of values in the sample}}\) and the mean for a population (denoted by \(\mu\)) is \(\mu = \dfrac{\text{Sum of all values in the population}}{\text{Number of values in the population}}\).
- Mean of a Probability Distribution
- the long-term average of many trials of a statistical experiment
- Standard Deviation of a Probability Distribution
- a number that measures how far the outcomes of a statistical experiment are from the mean of the distribution
- The Law of Large Numbers
- As the number of trials in a probability experiment increases, the difference between the theoretical probability of an event and the relative frequency probability approaches zero.
References
- Class Catalogue at the Florida State University. Available online at apps.oti.fsu.edu/RegistrarCo...archFormLegacy (accessed May 15, 2013).
- “World Earthquakes: Live Earthquake News and Highlights,” World Earthquakes, 2012. www.world-earthquakes.com/ind...thq_prediction (accessed May 15, 2013).
Contributors and Attributions
Barbara Illowsky and Susan Dean (De Anza College) with many other contributing authors. Content produced by OpenStax College is licensed under a Creative Commons Attribution License 4.0 license. Download for free at http://cnx.org/contents/30189442-699...b91b9de@18.114.