Skip to main content
Mathematics LibreTexts

3.4: Expected Value and Law of Large Numbers

  • Page ID
    22320
  • \( \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}}\)

    Would you buy a lottery ticket with the numbers 1, 2, 3, 4, 5? Do you think that a winning ticket with five consecutive numbers is less likely than a winning ticket with the numbers 2, 14, 18, 23 and 32? If you are playing a slot machine in Las Vegas and you have lost the last 10 times, do you keep playing the same machine because you are “due for a win?” Have you ever wondered how a casino can afford to offer meals and rooms at such cheap rates? Should you play a game of chance at a carnival? How much should an organization charge for raffle tickets for their next fund raiser? All of these questions can be answered using probabilities.

    Definition: Expected Value

    Suppose the random variable \(x\) can take on the \(n\) values \(x_{1}, x_{2}, x_{3}, \ldots, x_{n}\). If the probability that each of these values occurs is \(p_{1}, p_{2}, p_{3}, \ldots, p_{n}\), respectively, then the expected value of the random variable is

    \[E(x)=x_{1} p_{1}+x_{2} p_{2}+x_{3} p_{3}+\ldots+x_{n} p_{n} \label{expectedvalue} \]

    Example \(\PageIndex{1}\): Expected Value for Raffle Tickets

    Valley View Elementary is trying to raise money to buy tablets for their classrooms. The PTA sells 2000 raffle tickets at $3 each. First prize is a flat-screen TV worth $500. Second prize is an android tablet worth $375. Third prize is an e-reader worth $200. Five $25 gift certificates will also be awarded. What are the expected winnings for a person who buys one ticket?

    Solution

    We need to write out the probability distribution before we find the expected value.

    A total of eight tickets are winners and the other 1992 tickets are losers.

    Table \(\PageIndex{1}\): Probability Distribution for the Valley View Raffle
    Outcome Win $500 Win $375 Win $200 Win $25 Win $0
    Probability \(\dfrac{1}{2000}\) \(\dfrac{1}{2000}\) \(\dfrac{1}{2000}\) \(\dfrac{5}{2000}=\dfrac{1}{400}\) \(\dfrac{1992}{2000}=\dfrac{249}{250}\)

    Now use the formula for the expected value (Equation \ref{expectedvalue}).

    \[\begin{aligned}
    E &=\$500\left(\dfrac{1}{2000}\right)+ \$375\left(\dfrac{1}{2000}\right)+ \$200\left(\dfrac{1}{2000}\right)+ \$25\left(\dfrac{1}{400}\right)+ \$0\left(\dfrac{249}{250}\right) \\
    &=0.60
    \end{aligned} \nonumber \]

    It costs $3 to buy a ticket but we only win an average of $0.60 per ticket. That means the expected winnings per ticket are $0.60 - $3 = -$2.40.

    We would expect to lose an average of $2.40 for each ticket bought. This means that the school will earn an average of $2.40 for each ticket bought for a profit of $2.40 ∙ 2000 = $4800.

    Example \(\PageIndex{2}\): Expected Value for Profit from a Purchase

    A real estate investor buys a parcel of land for $150,000. He estimates the probability that he can sell it for $200,000 to be 0.40, the probability that he can sell it for $160,000 to be 0.45 and the probability that he can sell it for $125,000 to be 0.15. What is the expected profit for this purchase?

    Solution

    Find the profit for each situation first. $200,000 – $150,000 = $50,000 profit, $160,000 - $150,000 = $10,000 profit, and $125,000 - $150,000 = -$25,000 profit (loss).

    The probability distribution is

    Table \(\PageIndex{2}\): Probability Distribution for a Real Estate Purchase
    Outcome $50,000 $10,000 -$25,000
    Probability 0.40 0.45 0.15

    \[\begin{aligned}
    E &=50,000(0.40)+10,000(0.45)+(-25,000)(0.15) \\
    &=\$ 20,750
    \end{aligned} \nonumber \]

    The expected profit from the purchase is $20,750.

    Example \(\PageIndex{3}\): Expected Value for Life Insurance

    The cost of a $50,000 life insurance policy is $150 per year for a person who is 21-years old. Assume the probability that a person will die at age 21 is 0.001. What is the company’s expected profit if the company sells 10,000 policies to 21-year olds?

    Solution

    There are two outcomes. If the person lives the insurance company makes a profit of $150. The probability that the person lives is 1-0.001=0.999. If the person dies the company takes in $150 and pays out $50,000 for a loss of $49,850.

    Table \(\PageIndex{3}\): Probability Distribution for Life Insurance
    Outcome $150 -$49,850
    Probability 0.999 0.001

    The expected value for one policy is:

    \[E(x)=\operatorname{Sis} 0(0.999)+(-\$ 49,850)(0.001)=\$ 149.80 \nonumber \]

    If the company sells 10,000 policies at a profit of $149.80 each, the total expected profit is ATeYyTbY1iZchhC_IHI9ueLcSAJRLW92tO9BpVeesCU7T1bOlfSzXJ8O_N7m20r8XXyi_RR03lLu9DlYAeF-eMO3ext4GbGZoBTB9NKNpnzGiSYpctLb5Bq4HaQvl8Hq6HSC3E0.

    Definition: Fair Game

    A game that has an expected value of zero is called a fair game.

    Example \(\PageIndex{4}\): Expected Value for a Carnival Game

    A carnival game consists of drawing two balls without replacement from a bag containing five red and eight white balls. If both balls are red you win $6.00. If both balls are white you lose $1.50. Otherwise you lose $1.00. Is this a fair game? What would you expect would happen if you played the game many times?

    Solution

    First we need to find the probability distribution. These are conditional probabilities since the balls are drawn without replacement.

    \[P(\text {both red})=\dfrac{5}{13} \cdot \dfrac{4}{12}=\dfrac{20}{156}=\dfrac{5}{39} \nonumber \]

    \[P(\text {both white})=\dfrac{8}{13} \cdot \dfrac{7}{12}=\dfrac{56}{156}=\dfrac{14}{39} \nonumber \]

    \[\begin{align*} P(\text{1 red and 1 white}) &= P(\text{red then white}) \, \text{or}\, (\text{white then red}) \\[4pt] &=P(\text{red then white}) + P(\text{white then red}) \\[4pt] &=\dfrac{5}{13} \cdot \dfrac{8}{12}+\dfrac{8}{13} \cdot \dfrac{5}{12} \\[4pt] &=\dfrac{80}{156}=\dfrac{20}{39} \end{align*} \nonumber \]

    Check that the sum of the probabilities is 1.00.

    \[\dfrac{5}{39}+\dfrac{14}{39}+\dfrac{20}{39}=\dfrac{39}{39}=1.00 \nonumber \]

    Thus, the probability distribution is valid and is shown below:

    Table \(\PageIndex{4}\): Probability Distribution for a Carnival Game
    Outcome Win $6.00 Lose $1.50 Lose $1.00
    Probability \(\dfrac{5}{39}\) \(\dfrac{14}{39}\) \(\dfrac{20}{39}\)

    Now find the expected value (Equation \ref{expectedvalue}):

    \[E=\dfrac{5}{39}(6.00)+\dfrac{14}{39}(-1.50)+\dfrac{20}{39}(-1.00) \approx-0.28 \nonumber \]

    Since the expected value is not zero this is not a fair game. Drawing two balls out of the bag is a random experiment so we cannot predict what will happen if we play the game once. We can predict what will happen if we play the game many times. We would expect to lose an average of $0.28 for every game we play. That means that the carnival will make an average of $0.28 for every game played. In this example we would refer to the carnival as the “house.”

    Have you ever wondered how casinos make money when they advertise a 99% payback on their slot machines? The games in a casino are not fair games since the expected value is not zero. The expected value of the game for a gambler is a small negative number like -$0.01. For a particular game the gambler may win or the gambler may lose. It’s a random experiment and we cannot predict the outcome. What we can predict is what will happen if the gambler continues to play the game many times. If the expected value is -$0.01, the gambler will expect to lose an average of $0.01 for every game played. If he/she plays 100 games, he/she will expect to lose 100(0.01) = $1.00. Every penny the gambler loses the casino keeps. If hundreds of gamblers play hundreds of games each, every day of the year all those pennies add up to millions of dollars. The casino is referred to as the “house” and the $0.01 that the house expects to win for each game played is called the “house edge.”

    Definition: House Edge

    The house edge is the amount that the house can expect to earn for each dollar bet.

    Example \(\PageIndex{5}\): House Edge in Roulette

    A roulette wheel consists of 38 slots numbered 0, 00, and 1 through 36, evenly spaced around a wheel. The wheel is spun one direction and a ball is rolled around the wheel in the opposite direction. Eventually the ball will drop into one of the numbered slots. A player bets $1 on a single number. If the ball lands in the slot for that number, the player wins $35, otherwise the player loses the $1. Find the house edge for this type of bet.

    http://upload.wikimedia.org/Wikipedia/commons/1/1c/Roulette_-_detail.jpg
    Figure \(\PageIndex{5}\): Roulette Wheel. (Ogle, 2009)
    Solution

    The house edge is the expected value so we need to find the probability distribution and then the expected value.

    There are 38 slots. One slot wins and the other 37 slots lose so

    \[P(\text{win}) = \dfrac{1}{38}\) and \(P(\text{lose}) = \dfrac{37}{38}. \nonumber \]

    The probability distribution is

    Table \(\PageIndex{6}\): Probability Distribution for a Roulette Wheel
    Outcome Win $35 Lose $1
    Probability \(\dfrac{1}{38}\) \(\frac{37}{38}\)

    The expected value is:

    \[E = $35(\dfrac{1}{38}) + (-1)(\dfrac{37}{38}) \approx -$0.0526 \nonumber \]

    The expected value of the game is -$0.0526. This means that the player would expect to lose an average of 5.26 cents for each game played. The house would win an average of 5.26 cents for each game played.

    The house edge is 5.26 cents.

    Gamblers’ Fallacy and Streaks

    Often times a gambler on a losing streak will keep betting in the belief that his/her luck must soon change. Consider flipping a fair coin. Each toss of the coin is independent of all the other tosses. Assume the coin has landed heads up the last eight times. Some people erroneously believe that the coin is more likely to land tails up on the next toss. In reality, the coin still has a 50% chance of landing tails up. It does not matter what happened the last eight tosses.

    Definition: Gambler’s Fallacy

    The gambler’s fallacy is the mistaken belief that a streak of bad luck makes a person due for a streak of good luck.

    Example \(\PageIndex{6}\): Streaks

    Toss a fair coin seven times and record which side lands up. For example HHTHTTT would represent getting a head on the first, second, and fourth tosses and a tail on the other tosses. Is a streak of all heads less likely than the other possible outcomes?

    Solution

    As we will see in Section 3.5, there are 128 possible ways to toss a coin seven times. Some of the possibilities are \(HHTTHHT\), \(HTHTHTH\), \(HHHHTTT\), and \(HTTHTTH\). Because tossing coins are independent events and the coin is fair each of these 128 possibilities has the same probability.

    \[P(\mathrm{HHTTHHT})=\dfrac{1}{128} \nonumber \]

    \[P(\mathrm{HTHTHTH})=\dfrac{1}{128} \nonumber \]

    etc.

    This also means that the probability of getting all heads is

    \[P(\mathrm{HHHHHHH})=\dfrac{1}{128}. \nonumber \]

    Getting a streak of all heads has exactly the same probability as any other possible outcome.

    Law of Large Numbers

    When studying probabilities, many times the law of large numbers will apply. If you want to observe what the probability is of getting tails up when flipping a coin, you could do an experiment. Suppose you flip a coin 20 times and the coin comes up tails nine times. Then, using an empirical probability, the probability of getting tails is 9/20 = 45%. However, we know that the theoretical probability for getting tails should be 1/2 = 50%. Why is this different? It is because there is error inherent to sampling methods. However, if you flip the coin 100 times or 1000 times, and use the information to calculate an empirical probability for getting tails up, then the probabilities you will observe will become closer to the theoretical probability of 50%. This is the law of large numbers.

    Definition: Law of Large Numbers

    The law of large numbers means that with larger numbers of trials of an experiment the observed empirical probability of an event will approach the calculated theoretical probability of the same event.


    This page titled 3.4: Expected Value and Law of Large Numbers is shared under a CC BY-SA 4.0 license and was authored, remixed, and/or curated by Maxie Inigo, Jennifer Jameson, Kathryn Kozak, Maya Lanzetta, & Kim Sonier via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.