Expected Values and Variance

Lesson Features »

Lesson Priority: VIP Knowledge

 
Objectives
  • Define expected value in terms of practical interpretation
  • Find the expected value, standard deviation, and variance of an empirical distribution
  • Find the expected value and expected squared value of a theoretical probability distribution
  • Calculate the standard deviation and variance of a theoretical distribution
Lesson Description

While we do not know what the outcome will be of something that hasn't happened yet, if we know the probabilities of what could happen, we can calculate the expectation of what will happen. This is one of the most powerful uses of probability, but also one with a commonly misunderstood interpretation. This lesson will first ensure that we understand what expected value, variance, and standard deviation are and what they mean, before learning how we calculate them in various situations.

 
Practice Problems

Practice problems and worksheet coming soon!

 

Setting Expectations

Whether we are working with a theoretical probability distribution or a data-based probability distribution, we are always very interested in finding expected values. After all, the basic idea behind probability is that we want to mathematically describe unknown future outcomes using quantified likelihoods. Since we know the percent chance that various outcomes will happen, we can calculate what the average outcome is - this is what we call the expected value.
Define: Expected ValueIn probability, the expected value (EV) of a probabilistic event is what we expect to get if we execute the probability experiment over and over again indefinitely, and take the average of each outcome.Commonly, the notation we use for the expected value of a random variable $X$ is$$\mathrm{E}[X]$$Additionally, many teachers and books will refer to the expected value as the mean of the distribution. For theoretical probability distributions, this is often notated $\mu$.
Let's better understand expected values with an example.
 
Example 1You are given the following distribution for the random variable $X$, the number of times your Physics teacher stutters in a given class period.$$ \begin{array}{|c|c|} \hline x & \mathrm{Pr}(X=x) \\ \hline 0 & 0.15 \\ \hline 1 & 0.25 \\ \hline 2 & 0.35 \\ \hline 3 & 0.20 \\ \hline 4 & 0.05 \\ \hline \end{array} $$According to this distribution, the expected number of stutters for a random class next week is $\mu = 1.75$. Describe the interpretation of this result.$\blacktriangleright$ One of the oddest things about expected value is that we often get non-integer results for distributions that strictly have integer outcomes. This is not bad or wrong, but it is certainly a source of confusion.The correct interpretation of this result is the following: if we were to observe hundreds or millions of class periods, record the number of stutters in each observed class, and average those records together, we expect that average to be $1.75$.In a practical sense, we also allow this average value to be a measure of what to expect. Even though our teacher cannot stutter $1.75$ times tomorrow, we understand that if we had to bet on an outcome, $2$ is a safer bet than $0$ or $4$. The best way to think about expected value is to loosely think of it as the average of a distribution.
 
The EV of a distribution makes a lot more sense in terms of "we expect this to happen on average" when it happens to be equal to an outcome. For example, if you take a twenty-question multiple choice exam blindly, with each question having four answer choices, the resulting probability distribution for the number of questions you answer correctly has an expected value of $5$. This sits well intuitively because each question is $25\%$ likely to be correct if we are truly guessing blindly, and $20 \cdot 25\%$ is $5$. Will we always answer $5$ out of $20$ questions correctly guessing randomly? Absolutely not, but we can understand why we expect any future trial to have $5$ correct answers on average.

Variance and Standard Deviation

Just like expected value tells us what to expect on average, variance tells us how much to expect repeated probability trials to vary. Variability is the consequence of randomness - it is the reason why we don't always answer $5$ questions correctly in the twenty-question multiple choice exam example we just discussed - that is, sometimes we'll answer $2$ correctly, or $6$, or even $16$ (though that's incredibly unlikely to happen). Variability quantifies how much to expect trials to deviate from average.
Define: VarianceThe variance of a probability distribution measures the average squared distance from the expected value that we can expect a random outcome to have. Therefore, the smaller the variance, the more "concentrated" the distribution is around its mean. The larger the variance, the more spread out we expect events to be.Typically the notation for the variance of a random variable $X$ is$$\mathrm{Var}(X)$$For theoretical probability distributions, this is often notated as $\sigma^2$.
Here's a quick reminder of why we care about variance and spread and not just expected value. If class A has test scores$$\begin{array}{ccccc} 55 & 65 & 75 & 85 & 95\\ \;\;\;\;\; & \;\;\;\;\; & \;\;\;\;\; & \;\;\;\;\; & \;\;\;\;\; \end{array}$$and class B has test scores$$\begin{array}{ccccc} 71 & 73 & 75 & 77 & 79\\ \;\;\;\;\; & \;\;\;\;\; & \;\;\;\;\; & \;\;\;\;\; & \;\;\;\;\; \end{array}$$then it is difficult to describe how the two classes performed differently from one another without using the word variability or spread, because they have the same average. The same thing applies to theoretical probability distributions - if they both have an expected outcome of $75$, but one has a substantially wider range of possible outcomes, then that wider range distribution is said to have a higher variance. A major takeaway of this lesson is to learn how to calculate the variance number, as well as how to interpret it properly.The Standard Deviation is the square root of the variance, and it has a well-defined meaning in context.
Define: Standard DeviationThe standard deviation of a distribution is the square root of the variance. Therefore, it shares the idea that the larger it is, the more spread out we expect random outcomes to be.Additionally, since the interpretation of variance is the average squared distance of a randomly observed outcome from the expected value, the standard deviation is the average distance from the expected value that we expect an outcome of a random probability trial to have.One notation for the standard deviation of a random variable $X$ is$$\mathrm{SD}(X)$$For theoretical probability distributions, this is often notated as $\sigma$.
For example, if we say a probability distribution has an expected value of $10$ and a standard deviation of $3$, we interpret that to mean that on average, any random future observation from that distribution will be $3$ units away from $10$ (in either direction).Most likely, your interpretation and conceptual understanding of the expected value will be more important than your understanding of interpreting variance and standard deviation, but you will absolutely be expected to calculate and work with them frequently.
Pro Tip
Think of the expected value as an average of what we expect a future random observance to be, and think of the standard deviation as the expected "error" (or distance) from the average that a future random observance typically will have. Expected values help us pick target expectations, while variances and standard deviations help us understand how much spread to expect in repeated trials.

Theoretical Distributions

Both discrete » and continuous » probability distributions have expected values and variances. For AP Statistics as well as most college statistics courses, the focus is on discrete distributions, since the only continuous distributions you will likely ever see are the Normal Distribution » and the Uniform Distribution » which each have their own formulas for expected value and variance.So while I will eventually discuss EV, variance, and SD for generic continuous distributions, it will be in a much later lesson » that you very likely don't even need to know, as it is an advanced probability topic (it requires Calculus).With that disclaimer out of the way, let's learn how to find the EV, variance, and SD of any discrete distribution.
Warning!
There is a substantial difference between finding the sample standard deviation of a data set like we did toward the beginning of this course and finding the standard deviation of a probability distribution, both in meaning and what you actually do. Data sets are records of observations, while probability distributions describe the likelihood of outcomes that are yet to happen. To make things worse, it is possible to use data as empirical probability distributions. We will discuss data-based probability distributions under the next heading », which utilize the data approach to calculating standard deviation, and understand why the two concepts and calculations are very different.
Expected ValueMathematically, the expected value of a distribution is like a weighted average outcome, where the weight of each outcome is the probability of its occurence.Simply stated, the expected value is the sum of the product of each outcome and its likelihood.
Define: EV of a DistributionLet $X$ be a random variable with a given distribution of $N$ outcomes (outcomes are represented by the variable $x$) and probability of each outcome ($p(x)$). The expected value $\mathrm{E}[X]$ of such a distribution is$$\mathrm{E}[X] = \sum_{i=1}^{N} \; x_i \cdot p(x_i)$$This is frequently notated as $\mu$. You should think of $\mu$ and $\mathrm{E}[X]$ as interchangeable synonyms.
If you aren't fully comfortable with sigma notation » don't stress too much. It isn't highly utilized in AP and intro stats courses, but in short it says to add up each case starting with the counter variable $i=1$ and ending when we count up to $i=N$.As is often the case, things will seem much clearer with an example.
 
Example 2Use the definition of expected value with the stutter distribution from Example 1 to prove that the expected value of that distribution is indeed $1.75$.$$ \begin{array}{|c|c|} \hline x & p(x) \\ \hline 0 & 0.15 \\ \hline 1 & 0.25 \\ \hline 2 & 0.35 \\ \hline 3 & 0.20 \\ \hline 4 & 0.05 \\ \hline \end{array} $$$\blacktriangleright$ The definition of expected value tells us to add up the product of each $x$ and $p(x)$. Again, if you haven't fully grasped sigma notation, this is a good chance to brute force understand what it is telling us to do.$$\sum_{i=1}^{5} \; x_i \cdot p(x_i)$$$$=(0)\cdot(0.15) + (1)\cdot(0.25) + (2)\cdot(0.35)$$$$+ (3)\cdot(0.20) + (4)\cdot(0.05)$$$$=1.75$$Once again, the idea is that we sum up the product of each outcome's value and its probability.
 
Variance and SDIn order to calculate the variance of a discrete probability distribution, we need to find both its expected value and expected squared value. The expected squared value is calculated similarly to the expected value except we sum up the product of $x^2$ and $p(x)$ instead of $x$ and $p(x)$.
Define: Expected Squared ValueThe expected squared value of a probability distribution is given by$$\sum_{i=1}^{N} \; (x_i)^2 \cdot p(x_i)$$Typically it is notated as$$\mathrm{E}[X^2]$$
Warning!
The expected value of $X^2$ is not the same thing as the squared expected value of $X$. Do not use $\mu^2$ to represent $\mathrm{E}[X^2]$.$\mu^2$ represents $\big[ \mathrm{E}[X] \big]^2$.
Now that we know how to get expected squared values, let's see how they are used to calculate the variance of a discrete probability distribution.
Define: Variance of a DistributionThe variance of a discrete probability distribution is calculated by subtracting the squared expected value from the expected squared value.In formula form:$$\mathrm{Var}(X) = \mathrm{E}[X^2] - \big(\mathrm{E}[X]\big)^2$$Additionally, the variance of $X$ is often notated as $\sigma^2$ for a probability distribution. You should think of the notations $\mathrm{Var}(X)$ and $\sigma^2$ as interchangeable synonyms.
And as before, if you're asked about the standard deviation, it is simply the square root of the variance (and it is often notated as $\sigma$ for that reason).Let's look at an Example.
 
Example 3Calculate the variance and standard deviation for the teacher stutter distribution from Example 1.$$ \begin{array}{|c|c|} \hline x & \mathrm{Pr}(X=x) \\ \hline 0 & 0.15 \\ \hline 1 & 0.25 \\ \hline 2 & 0.35 \\ \hline 3 & 0.20 \\ \hline 4 & 0.05 \\ \hline \end{array} $$$\blacktriangleright$ We have already stated and verified that the expected value of the distribution is $1.75$. Now we need the expected squared value.$$\mathrm{E}[X^2] = (0^2)\cdot(0.15) + (1^2)\cdot(0.25) + (2^2)\cdot(0.35)$$$$+ (3^2)\cdot(0.20) + (4^2)\cdot(0.05)$$$$=4.25$$Therefore, the variance of this distribution is$$\mathrm{Var}(X) = 4.25 - (1.75)^2 = 1.1875$$and the standard deviation is$$\mathrm{SD}(X) = \sqrt{1.1875} \approx 1.0897$$

Data-Based Distributions

When we don't know how a random variable is distributed, we're sometimes asked to use some data as the assumed distribution. This is not ideal and it won't happen often in your course, but it's sometimes the only thing we have to work with. In cases like these, the expected value and variance / SD calculations are going to be based on the formulas you learned toward the beginning of the course for working with data sets.
 
Example 4Jack's dad wants to apply probability to Jack's baseball ability. Jack is a pitcher and threw the following number of strike-outs last month, per game:$$ \begin{array}{|c|c|} \hline \mathrm{Strikeouts} & \mathrm{No.}\;\mathrm{of}\;\mathrm{Games} \\ \hline 0 & 3 \\ \hline 1 & 4 \\ \hline 2 & 5 \\ \hline 3 & 5 \\ \hline 5 & 2 \\ \hline 6 & 1 \\ \hline \end{array} $$If Jack's data uses this data as an empirical probability distribution to predict Jack's pitching performance for tomorrow's game, calculate the empirical expected value and variance.$\blacktriangleright$ Because this is based on raw data and not a theoretical distribution, the mean and standard deviation must be calculated using data methods. Adding up the "No. of Games" column, it looks like Jack pitched $20$ games last month. The expected value will simply be the straight average of the $20$ outcomes.We can shortcut this with multiplication:$$\mathrm{E}[X] = \frac{0 \cdot 3 + 1 \cdot 4 + 2 \cdot 5 + 3 \cdot 5 + 5 \cdot 2 + 6 \cdot 1}{22}$$$$= 2.25$$The variance is calculated using the formula$$\mathrm{Var}(X) = \frac{\sum(x_i - \mathrm{E}[X])^2}{n-1}$$The sum of squared deviations from the mean (the numerator) is$$3 \cdot (0-2.25)^2 + 4 \cdot (1-2.25)^2 + 5 \cdot (2-2.25)^2 + 5 \cdot (3-2.25)^2$$$$ + 2 \cdot (5-2.25)^2 + 1 \cdot (6 - 2.25)^2$$$$=53.75$$Since the denominator is $20-1=19$, the variance is then$$\mathrm{Var}(X) = \frac{53.75}{19} \approx 2.83$$and finally, the standard deviation is the square root of the variance, so$$\mathrm{SD}(X) = \sqrt{2.83} \approx 1.68$$
 

Calculator Know-How

More and more, we are able to use calculators such as the TI-84 with data or list entry to calculate the expected values and standard deviations of data sets or probability distributions. Specifically, while we looked at data set expected values and standard deviation early in the course when we studied data », we need to know how to get these for theoretical probability distributions.In order to use the TI-84 quickly and correctly for this task, do the following steps.
  • If it is not already, get the probability distribution in table form
  • Press the STAT button and choose the [ 1: EDIT ] option
  • If needed, clear out old lists, or scroll right to a fresh list (you will want two fresh lists next to one another for this)
  • Enter the values of the outcomes in the first list
  • In the next list enter the corresponding likelihoods
  • When finished, hit 2ND and then MODE (the quit function)
  • Hit STAT and then scroll right to the [CALC] menu, and select the [1-Var Stats] option
  • Choose your outcomes list to be the "list" and the probability list to be the "FreqList" (note that the list variables are on your calculator above the numbers $1$ to $6$ - for example to enter list $\mathrm{L1}$ you need to hit 2ND and then the 1 key)
  • Scroll down to hover over "CALCULATE" and hit enter to see the results (the $\Sigma \, x$ is the expected value and the $\sigma_x$ is the standard deviation - if you need the variance you can subtract the expected squared value $\Sigma \, x^2$ from the squared expected value, or just re-enter the standard deviation and square it)
Important - make sure you get the standard deviation from the $\sigma_x$ row of the 1-Var Stats output and not $s_x$. The $s_x$ row will probably be blank anyway.
Remember!
If it's faster, delete old lists in your TI-84 by scrolling up to the top of the list, highlighting the list name, and hitting the CLEAR button. Careful not to hit the DEL button, as this will delete the entire list from existence, and you will have to manually insert a replacement list if you need one.
Finally, if you do need to work with data as an empirical probability distribution as we did in the example for Jack's baseball strikeouts, make sure you get the standard deviation from the $s_x$ row of calculator output, not the $\sigma_x$ row.

Put It To The Test

Understanding and being able to calculate expected values and variances is of paramount importance to success in any level of a statistics course. While we do often rely on technology to calculate some of these numbers, there are still numerous ways in which AP and college profs can test your understanding of these concepts in upcoming topics.Additionally, for what it's worth, your calculator is only able to give you the answers you need if you know how to correctly ask for them! Make sure you can do the following problems.
 
Example 5The heights of high school freshman in a certain state last year are distributed such that the expected value is $65$ inches with a standard deviation of $3$ inches. Interpret the expected value and standard deviation in context.
Show solution
$\blacktriangleright$ If the expected value of this distribution is $65$ inches, then we would interpret that as:We expect that the average height of randomly selected students is $65$ inches, if the number of random selections is very large.The standard deviation is interpreted as:We expect the average difference between each randomly selected student's height and $65$ to be $3$, if the number of random selections is very large.
 
Example 6Find the expected value, variance, and standard deviation of the following distribution and show your work. You may use a TI-84 to check your work.$$ \begin{array}{|c|c|} \hline x & \mathrm{Pr}(X=x) \\ \hline 60 & 0.12 \\ \hline 70 & 0.41 \\ \hline 75 & 0.32 \\ \hline 90 & 0.15 \\ \hline \end{array} $$
Show solution
$\blacktriangleright$ First let's find the expected value of $X$. This is done by adding up each product of $x$ value and likelihood.$$\mathrm{E}[X] = (60)(0.12)+(70)(0.41)+(75)(0.32)+(90)(0.15)$$$$=73.4$$Now, we need the expected squared value to move forward with the variance calculation:$$\mathrm{E}[X^2] = (60^2)(0.12)+(70^2)(0.41)+(75^2)(0.32)+(90^2)(0.15)$$$$=5456$$The variance is therefore$$\mathrm{Var}(X) = \mathrm{E}[X^2] - \big( \mathrm{E}[X] \big)^2$$$$=5456 - (73.4)^2$$$$=68.44$$Finally, the standard deviation is the square root of the variance.$$\mathrm{SD}(X) = \sqrt{\mathrm{Var}(X)} = \sqrt{68.44}$$$$\approx 8.27$$
 
Example 7Use a TI-84 or similar calculator to find the expected value and standard deviation of the following distribution for $X$, the age at which a randomly selected child loses his or her first tooth.$$ \begin{array}{|c|c|} \hline x & \mathrm{Pr}(X=x) \\ \hline 4 & 0.05 \\ \hline 5 & 0.20 \\ \hline 6 & 0.40 \\ \hline 7 & 0.20 \\ \hline 8 & 0.10 \\ \hline 9 & 0.05 \\ \hline \end{array} $$
Show solution
$\blacktriangleright$ Remember to follow the guidelines above for Calculator Know-How - hopefully you got the answers$$\mu = 6.25$$$$\sigma = 1.3875$$Don't forget that $\mu$ an $\sigma$ are interchangeable with $\mathrm{E}[X]$ and $\mathrm{SD}(X)$, respectively.
 
Lesson Takeaways
  • Master the meanings of the expected value, variance, and standard deviation
  • Know both sets of notations for these items, e.g. $\mathrm{E}[X]$ versus $\mu$
  • Know how to find the expected value, variance, and standard deviation of a probability distribution
  • Though uncommonly needed, use the sample mean and sample standard deviation if you use a data set as an empirical probability distribution
  • Be masterful at knowing how to enter probability distributions into lists in your calculator, and how to properly ask the TI-84 for the expected value and standard deviation of a distribution

Lesson Metrics

At the top of the lesson, you can see the lesson title, as well as the DNA of Math path to see how it fits into the big picture. You can also see the description of what will be covered in the lesson, the specific objectives that the lesson will cover, and links to the section's practice problems (if available).

Key Lesson Sections

Headlines - Every lesson is subdivided into mini sections that help you go from "no clue" to "pro, dude". If you keep getting lost skimming the lesson, start from scratch, read through, and you'll be set straight super fast.

Examples - there is no better way to learn than by doing. Some examples are instructional, while others are elective (such examples have their solutions hidden).

Perils and Pitfalls - common mistakes to avoid.

Mister Math Makes it Mean - Here's where I show you how teachers like to pour salt in your exam wounds, when applicable. Certain concepts have common ways in which teachers seek to sink your ship, and I've seen it all!

Put It To The Test - Shows you examples of the most common ways in which the concept is tested. Just knowing the concept is a great first step, but understanding the variation in how a concept can be tested will help you maximize your grades!

Lesson Takeaways - A laundry list of things you should be able to do at lesson end. Make sure you have a lock on the whole list!

Special Notes

Definitions and Theorems: These are important rules that govern how a particular topic works. Some of the more important ones will be used again in future lessons, implicitly or explicitly.

Pro-Tip: Knowing these will make your life easier.

Remember! - Remember notes need to be in your head at the peril of losing points on tests.

You Should Know - Somewhat elective information that may give you a broader understanding.

Warning! - Something you should be careful about.

Return to Lesson