#set document(title: "7.11 Expected Value", author: "OpenStax / XYZ Homework") #set page(width: 8.5in, height: auto, margin: 1in) #import "@preview/cetz:0.5.2" #set text(font: ("STIX Two Text", "Libertinus Serif", "New Computer Modern"), size: 10.5pt, lang: "en") #show math.equation: set text(font: ("STIX Two Math", "New Computer Modern Math")) #set par(justify: true, leading: 0.62em, spacing: 0.9em) #set enum(spacing: 1.1em) // room between list items so tall inline fractions don't collide #set list(spacing: 1.1em) #set table(stroke: 0.5pt + rgb("#c7ccd3")) #let BLUE = rgb("#183B6F") // brand navy — section bars + example/solution labels (white on navy 11.09:1) #let ORANGE = rgb("#A94509") // brand primary-700 — AA-safe deep orange for TEXT (5.93:1 on white; raw brand #F37021 is 2.94:1 and must never carry text) #let RED = rgb("#DC2626") // brand error-600 #let GREEN = rgb("#059669") // brand success-600 (decoration only; small green text uses green-text #007942) #show heading.where(level: 1): it => block(width: 100%, above: 0pt, below: 16pt, fill: gradient.linear(BLUE, rgb("#2C5AA0")), inset: (x: 14pt, y: 12pt), radius: 3pt, text(fill: white, weight: "bold", size: 19pt, it.body)) #show heading.where(level: 2): it => block(width: 100%, above: 18pt, below: 10pt, fill: BLUE, inset: (x: 10pt, y: 6pt), radius: 2pt, text(fill: white, weight: "bold", size: 12pt, it.body)) #show heading.where(level: 3): it => text(fill: ORANGE, weight: "bold", size: 12.5pt, it.body) #show heading.where(level: 4): it => text(fill: BLUE, weight: "bold", size: 10.5pt, it.body) #let examplebox(label, title, body) = block(width: 100%, breakable: true, fill: rgb("#EFF1F5"), stroke: 0.5pt + rgb("#CFDDF0"), radius: 4pt, inset: 10pt, above: 12pt, below: 12pt)[ #block(below: 6pt)[#box(fill: BLUE, inset: (x: 6pt, y: 2pt), radius: 2pt, text(fill: white, weight: "bold", size: 8.5pt, label)) #h(0.4em) #strong[#title]] #body] // rail = decorative left rule (raw brand token); labelcolor = AA-safe label text shade #let notebox(label, rail, labelcolor, tint, body) = block(width: 100%, breakable: true, fill: tint, stroke: (left: 3pt + rail), inset: (left: 10pt, rest: 8pt), radius: (right: 4pt), above: 11pt, below: 11pt)[ #text(fill: labelcolor, weight: "bold", size: 7.5pt, tracking: 0.5pt)[#upper(label)] #linebreak() #body] #let solutionbox(body) = block(above: 4pt, below: 8pt)[ #text(fill: BLUE, weight: "bold", size: 8.5pt)[Solution] #linebreak() #body] #let figph(msg) = block(width: 100%, height: 60pt, fill: rgb("#f6f7f9"), stroke: (paint: rgb("#c7ccd3"), dash: "dashed"), radius: 4pt, inset: 10pt)[ #align(center + horizon, text(fill: rgb("#889"), style: "italic", size: 9pt, msg))] // Standardize inlined figure sizes: measure the natural CeTZ canvas, then scale to a // consistent envelope (aspect-aware; see build_typst.py FIG_* constants). Unlike the // print preamble, dimensions are FLOORED: in an editor a user can trim a figure to a // degenerate 1-D shape (a bare line), and w/h or tw/w would then divide by zero. #let _STD_W = 3.5 #let _WIDE_W = 5.6 #let _MAX_H = 3.4 #let _ASPECT_WIDE = 2.2 #let _UPSCALE_MAX = 1.15 #let stdfig(body) = context { let m = measure(body) let w = calc.max(m.width / 1in, 0.01) let h = calc.max(m.height / 1in, 0.01) let tw = if w / h > _ASPECT_WIDE { _WIDE_W } else { _STD_W } let s = calc.min(tw / w, _MAX_H / h, _UPSCALE_MAX) align(center, box(scale(x: s * 100%, y: s * 100%, reflow: true, body))) } #show figure: set block(breakable: false) #set figure(gap: 8pt) #show figure.caption: set text(size: 8.5pt, fill: rgb("#555")) == 7.11#h(0.6em)Expected Value #figure(figph[A game of roulette is in progress. Players have placed chips over numbers on the board. The wheel is spinning.], alt: "A game of roulette is in progress. Players have placed chips over numbers on the board. The wheel is spinning.", caption: [The concept of expected value allows us to analyze games that involve randomness, like Roulette.]) === Learning Objectives #strong[After completing this section, you should be able to:] + Calculate the expected value of an experiment. + Interpret the expected value of an experiment. + Use expected value to analyze applications. The casino game roulette has dozens of different bets that can be made. These bets have different probabilities of winning but also have different payouts. In general, the lower the probability of winning a bet is, the more money a player wins for that bet. With so many options, is there one bet that’s “smarter” than the rest? What’s the best play to make at a roulette table? In this section, we’ll develop the tools we need to answer these questions. === Expected Value Many experiments have numbers associated with their outcomes. Some are easy to define; if you roll 2 dice, the sum of the numbers showing is a good example. In some card games, cards have different point values associated with them; for example, in some forms of the game rummy, aces are worth 15 points; 10s, jacks, queens, and kings are worth 10; and all other cards are worth 5. The outcomes of casino and lottery games are all associated with an amount of money won or lost. These outcome values are used to find the #strong[expected value] of an experiment: the mean of the values associated with the outcomes that we would observe over a large number of repetitions of the experiment. (See Conditional Probability and the Multiplication Rule for more on means.) That definition is a little vague; How many is “a large number?” In practice, it depends on the experiment; the number has to be large enough that every outcome would be expected to appear at least a few times. For example, if we’re talking about rolling a standard 6-sided die and we note the number showing, a few dozen replications should be enough that the mean would be representative. Since the probability of each outcome is #math.equation(block: false, alt: "the fraction 1 over 6")[$frac(1, 6)$], we would expect to see each outcome about 8 times over the course of 48 replications. However, if we’re talking about the Powerball lottery, where the probability of winning the jackpot is about #math.equation(block: false, alt: "the fraction 1 over 292 , 000 , 000")[$frac(1, 292 "," 000 "," 000)$], we would need several #emph[billion] replications to ensure that every outcome appears a few times. Luckily, we can find the theoretical expected value before we even run the experiment the first time. #notebox("Formula", rgb("#059669"), rgb("#007942"), rgb("#EAF3EC"))[ Expected Value: If #math.equation(block: false, alt: "O")[$O$] represents an outcome of an experiment and #math.equation(block: false, alt: "n open parenthesis O close parenthesis")[$n ( O )$] represents the value of that outcome, then the expected value of the experiment is: #math.equation(block: true, alt: "∑ n open parenthesis O close parenthesis times P open parenthesis O close parenthesis")[$display(∑ n ( O ) × P ( O ))$] where #math.equation(block: false, alt: "Σ")[$upright(Σ)$] is the “sum,” meaning we add up the results of the formula that follows over all possible outcomes. ] #examplebox("Example 1")[Finding Expected Values][ Find the expected values of the following experiments. + Roll a standard 6-sided die and note the number showing. + Roll two standard 6-sided dice and note the sum of the numbers showing. + Draw a card from a well-shuffled standard deck of cards and note its rummy value (15 for aces; 10 for tens, jacks, queens, and kings; 5 for everything else). #solutionbox[ + #strong[Step 1:] Let’s start by writing out the PDF table for this experiment. #figure(table( columns: 2, align: left, inset: 6pt, table.header([Value], [Probability]), [1], [#math.equation(block: false, alt: "the fraction 1 over 6")[$frac(1, 6)$]], [2], [#math.equation(block: false, alt: "the fraction 1 over 6")[$frac(1, 6)$]], [3], [#math.equation(block: false, alt: "the fraction 1 over 6")[$frac(1, 6)$]], [4], [#math.equation(block: false, alt: "the fraction 1 over 6")[$frac(1, 6)$]], [5], [#math.equation(block: false, alt: "the fraction 1 over 6")[$frac(1, 6)$]], [6], [#math.equation(block: false, alt: "the fraction 1 over 6")[$frac(1, 6)$]], )) #strong[Step 2:] To find the expected value, we need to find #math.equation(block: false, alt: "n open parenthesis O close parenthesis times P open parenthesis O close parenthesis")[$n ( O ) × P ( O )$] for each possible outcome in the table below. #figure(table( columns: 3, align: left, inset: 6pt, table.header([Value], [Probability], [#math.equation(block: false, alt: "n open parenthesis O close parenthesis times P open parenthesis O close parenthesis")[$n ( O ) × P ( O )$]]), [1], [#math.equation(block: false, alt: "the fraction 1 over 6")[$frac(1, 6)$]], [#math.equation(block: false, alt: "1 times the fraction 1 over 6 equals the fraction 1 over 6")[$1 × frac(1, 6) = frac(1, 6)$]], [2], [#math.equation(block: false, alt: "the fraction 1 over 6")[$frac(1, 6)$]], [#math.equation(block: false, alt: "2 times the fraction 1 over 6 equals the fraction 1 over 3")[$2 × frac(1, 6) = frac(1, 3)$]], [3], [#math.equation(block: false, alt: "the fraction 1 over 6")[$frac(1, 6)$]], [#math.equation(block: false, alt: "3 times the fraction 1 over 6 equals the fraction 1 over 2")[$3 × frac(1, 6) = frac(1, 2)$]], [4], [#math.equation(block: false, alt: "the fraction 1 over 6")[$frac(1, 6)$]], [#math.equation(block: false, alt: "4 times the fraction 1 over 6 equals the fraction 2 over 3")[$4 × frac(1, 6) = frac(2, 3)$]], [5], [#math.equation(block: false, alt: "the fraction 1 over 6")[$frac(1, 6)$]], [#math.equation(block: false, alt: "5 times the fraction 1 over 6 equals the fraction 5 over 6")[$5 × frac(1, 6) = frac(5, 6)$]], [6], [#math.equation(block: false, alt: "the fraction 1 over 6")[$frac(1, 6)$]], [#math.equation(block: false, alt: "6 times the fraction 1 over 6 equals 1")[$6 × frac(1, 6) = 1$]], )) #strong[Step 3:] We add all of the values in that last column: #math.equation(block: false, alt: "the fraction 1 over 6 plus the fraction 1 over 3 plus the fraction 1 over 2 plus the fraction 2 over 3 plus the fraction 5 over 6 plus 1 equals the fraction 7 over 2 equals 3.5")[$frac(1, 6) + frac(1, 3) + frac(1, 2) + frac(2, 3) + frac(5, 6) + 1 = frac(7, 2) = 3.5$]. So, the expected value of a single roll of a die is 3.5. + Back in Example 3 in Section 7.5, we made this table of all of the equally likely outcomes : #figure( stdfig([#table( columns: (auto,) * 7, align: center+horizon, inset: 5pt, stroke: 0.5pt + black, table.cell(fill: rgb("#f0f0f0"), align: center+horizon, text(font: sys.inputs.at("title-font", default: "STIX Two Text"), weight: "bold", size: 9pt)[]), table.cell(fill: rgb("#f0f0f0"), align: center+horizon, colspan: 6, text(font: sys.inputs.at("title-font", default: "STIX Two Text"), weight: "bold", size: 9pt)[first die]), table.cell(fill: rgb("#f0f0f0"), align: center+horizon, text(font: sys.inputs.at("title-font", default: "STIX Two Text"), weight: "bold", size: 9pt)[second die]), table.cell(fill: rgb("#f0f0f0"), align: center+horizon, text(font: sys.inputs.at("title-font", default: "STIX Two Text"), weight: "bold", size: 9pt)[1]), table.cell(fill: rgb("#f0f0f0"), align: center+horizon, text(font: sys.inputs.at("title-font", default: "STIX Two Text"), weight: "bold", size: 9pt)[2]), table.cell(fill: rgb("#f0f0f0"), align: center+horizon, text(font: sys.inputs.at("title-font", default: "STIX Two Text"), weight: "bold", size: 9pt)[3]), table.cell(fill: rgb("#f0f0f0"), align: center+horizon, text(font: sys.inputs.at("title-font", default: "STIX Two Text"), weight: "bold", size: 9pt)[4]), table.cell(fill: rgb("#f0f0f0"), align: center+horizon, text(font: sys.inputs.at("title-font", default: "STIX Two Text"), weight: "bold", size: 9pt)[5]), table.cell(fill: rgb("#f0f0f0"), align: center+horizon, text(font: sys.inputs.at("title-font", default: "STIX Two Text"), weight: "bold", size: 9pt)[6]), table.cell(fill: rgb("#f0f0f0"), align: center+horizon, text(font: sys.inputs.at("title-font", default: "STIX Two Text"), weight: "bold", size: 9pt)[1]), [2], [3], [4], [5], [6], [7], table.cell(fill: rgb("#f0f0f0"), align: center+horizon, text(font: sys.inputs.at("title-font", default: "STIX Two Text"), weight: "bold", size: 9pt)[2]), [3], [4], [5], [6], [7], [8], table.cell(fill: rgb("#f0f0f0"), align: center+horizon, text(font: sys.inputs.at("title-font", default: "STIX Two Text"), weight: "bold", size: 9pt)[3]), [4], [5], [6], [7], [8], [9], table.cell(fill: rgb("#f0f0f0"), align: center+horizon, text(font: sys.inputs.at("title-font", default: "STIX Two Text"), weight: "bold", size: 9pt)[4]), [5], [6], [7], [8], [9], [10], table.cell(fill: rgb("#f0f0f0"), align: center+horizon, text(font: sys.inputs.at("title-font", default: "STIX Two Text"), weight: "bold", size: 9pt)[5]), [6], [7], [8], [9], [10], [11], table.cell(fill: rgb("#f0f0f0"), align: center+horizon, text(font: sys.inputs.at("title-font", default: "STIX Two Text"), weight: "bold", size: 9pt)[6]), [7], [8], [9], [10], [11], [12], )]), alt: "A table with 6 rows and 6 columns. The columns represent the first die and are titled, 1, 2, 3, 4, 5, and 6. The rows represent the second die and are titled, 1, 2, 3, 4, 5, and 6. The data is as follows: Row 1: 2, 3, 4, 5, 6, 7. Row 2: 3, 4, 5, 6, 7, 8. Row 3: 4, 5, 6, 7, 8, 9. Row 4: 5, 6, 7, 8, 9, 10. Row 5: 6, 7, 8, 9, 10, 11. Row 6: 7, 8, 9, 10, 11, 12.", caption: none, ) #strong[Step 1:] Let’s use to create the PDF for this experiment, as shown in the following table: #figure(table( columns: 2, align: left, inset: 6pt, table.header([Value], [Probability]), [2], [#math.equation(block: false, alt: "the fraction 1 over 36")[$frac(1, 36)$]], [3], [#math.equation(block: false, alt: "the fraction 1 over 18")[$frac(1, 18)$]], [4], [#math.equation(block: false, alt: "the fraction 1 over 12")[$frac(1, 12)$]], [5], [#math.equation(block: false, alt: "the fraction 1 over 9")[$frac(1, 9)$]], [6], [#math.equation(block: false, alt: "the fraction 5 over 36")[$frac(5, 36)$]], [7], [#math.equation(block: false, alt: "the fraction 1 over 6")[$frac(1, 6)$]], [8], [#math.equation(block: false, alt: "the fraction 5 over 36")[$frac(5, 36)$]], [9], [#math.equation(block: false, alt: "the fraction 1 over 9")[$frac(1, 9)$]], [10], [#math.equation(block: false, alt: "the fraction 1 over 12")[$frac(1, 12)$]], [11], [#math.equation(block: false, alt: "the fraction 1 over 18")[$frac(1, 18)$]], [12], [#math.equation(block: false, alt: "the fraction 1 over 36")[$frac(1, 36)$]], )) #strong[Step 2:] We can multiply each row to find #math.equation(block: false, alt: "n open parenthesis O close parenthesis times P open parenthesis O close parenthesis")[$n ( O ) × P ( O )$]as shown in the following table: #figure(table( columns: 3, align: left, inset: 6pt, table.header([Value], [Probability], [#math.equation(block: false, alt: "n open parenthesis O close parenthesis times P open parenthesis O close parenthesis")[$n ( O ) × P ( O )$]]), [2], [#math.equation(block: false, alt: "the fraction 1 over 36")[$frac(1, 36)$]], [#math.equation(block: false, alt: "the fraction 1 over 18")[$frac(1, 18)$]], [3], [#math.equation(block: false, alt: "the fraction 1 over 18")[$frac(1, 18)$]], [#math.equation(block: false, alt: "the fraction 1 over 6")[$frac(1, 6)$]], [4], [#math.equation(block: false, alt: "the fraction 1 over 12")[$frac(1, 12)$]], [#math.equation(block: false, alt: "the fraction 1 over 3")[$frac(1, 3)$]], [5], [#math.equation(block: false, alt: "the fraction 1 over 9")[$frac(1, 9)$]], [#math.equation(block: false, alt: "the fraction 5 over 9")[$frac(5, 9)$]], [6], [#math.equation(block: false, alt: "the fraction 5 over 36")[$frac(5, 36)$]], [#math.equation(block: false, alt: "the fraction 5 over 6")[$frac(5, 6)$]], [7], [#math.equation(block: false, alt: "the fraction 1 over 6")[$frac(1, 6)$]], [#math.equation(block: false, alt: "the fraction 7 over 6")[$frac(7, 6)$]], [8], [#math.equation(block: false, alt: "the fraction 5 over 36")[$frac(5, 36)$]], [#math.equation(block: false, alt: "the fraction 10 over 9")[$frac(10, 9)$]], [9], [#math.equation(block: false, alt: "the fraction 1 over 9")[$frac(1, 9)$]], [#math.equation(block: false, alt: "1")[$1$]], [10], [#math.equation(block: false, alt: "the fraction 1 over 12")[$frac(1, 12)$]], [#math.equation(block: false, alt: "the fraction 5 over 6")[$frac(5, 6)$]], [11], [#math.equation(block: false, alt: "the fraction 1 over 18")[$frac(1, 18)$]], [#math.equation(block: false, alt: "the fraction 11 over 18")[$frac(11, 18)$]], [12], [#math.equation(block: false, alt: "the fraction 1 over 36")[$frac(1, 36)$]], [#math.equation(block: false, alt: "the fraction 1 over 3")[$frac(1, 3)$]], )) #strong[Step 3:] We can add the last column to get the expected value: #math.equation(block: true, alt: "the fraction 1 over 18 plus the fraction 1 over 6 plus the fraction 1 over 3 plus the fraction 5 over 9 plus the fraction 5 over 6 plus the fraction 7 over 6 plus the fraction 10 over 9 plus 1 plus the fraction 5 over 6 plus the fraction 11 over 18 plus the fraction 1 over 3 equals 7")[$frac(1, 18) + frac(1, 6) + frac(1, 3) + frac(5, 9) + frac(5, 6) + frac(7, 6) + frac(10, 9) + 1 + frac(5, 6) + frac(11, 18) + frac(1, 3) = 7$]So, the expected value is 7. + #strong[Step 1:] Let’s make a PDF table for this experiment. There are 3 events that we care about, so let’s use those events in the table below: #figure(table( columns: 2, align: left, inset: 6pt, table.header([Event], [Probability]), [{A}], [#math.equation(block: false, alt: "the fraction 1 over 13")[$frac(1, 13)$]], [{10, J, Q, K}], [#math.equation(block: false, alt: "the fraction 4 over 13")[$frac(4, 13)$]], [{2, 3, 4, 5, 6, 7, 8, 9}], [#math.equation(block: false, alt: "the fraction 8 over 13")[$frac(8, 13)$]], )) #strong[Step 2:] Let’s add a column to the following table for the values of each event: #figure(table( columns: 3, align: left, inset: 6pt, table.header([Event], [Probability], [Value]), [{A}], [#math.equation(block: false, alt: "the fraction 1 over 13")[$frac(1, 13)$]], [15], [{10, J, Q, K}], [#math.equation(block: false, alt: "the fraction 4 over 13")[$frac(4, 13)$]], [10], [{2, 3, 4, 5, 6, 7, 8, 9}], [#math.equation(block: false, alt: "the fraction 8 over 13")[$frac(8, 13)$]], [5], )) #strong[Step 3:] We’ll add the column for the product of the values and probabilities to the table below: #figure(table( columns: 4, align: left, inset: 6pt, table.header([Event], [Probability], [Value], [#math.equation(block: false, alt: "n open parenthesis O close parenthesis times P open parenthesis O close parenthesis")[$n ( O ) × P ( O )$]]), [{A}], [#math.equation(block: false, alt: "the fraction 1 over 13")[$frac(1, 13)$]], [15], [#math.equation(block: false, alt: "the fraction 15 over 13")[$frac(15, 13)$]], [{10, J, Q, K}], [#math.equation(block: false, alt: "the fraction 4 over 13")[$frac(4, 13)$]], [10], [#math.equation(block: false, alt: "the fraction 40 over 13")[$frac(40, 13)$]], [{2, 3, 4, 5, 6, 7, 8, 9}], [#math.equation(block: false, alt: "the fraction 8 over 13")[$frac(8, 13)$]], [5], [#math.equation(block: false, alt: "the fraction 40 over 13")[$frac(40, 13)$]], )) #strong[Step 4:] We’ll find the sum of the last column: #math.equation(block: false, alt: "the fraction 15 over 13 plus the fraction 40 over 13 plus the fraction 40 over 13 equals the fraction 95 over 13 approximately equals 7.3")[$frac(15, 13) + frac(40, 13) + frac(40, 13) = frac(95, 13) ≈ 7.3$]. Thus, the expected #emph[Rummy] value of a randomly selected card is about 7.3. ] ] Let’s make note of some things we can learn from Example 1. First, as Exercises 1 and 3 demonstrate, the expected value of an experiment might not be a value that could come up in the experiment. Remember that the expected value is interpreted as a mean, and the mean of a collection of numbers doesn’t have to actually be one of those numbers. Second, looking at Exercise 1, the expected value (3.5) was just the mean of the numbers on the faces of the die: #math.equation(block: false, alt: "the fraction 1 plus 2 plus 3 plus 4 plus 5 plus 6 over 6 equals 3.5")[$frac(1 + 2 + 3 + 4 + 5 + 6, 6) = 3.5$]. This is no accident! If we break that fraction up using the addition in the numerator, we get #math.equation(block: false, alt: "the fraction 1 over 6 plus the fraction 2 over 6 plus the fraction 3 over 6 plus the fraction 4 over 6 plus the fraction 5 over 6 plus the fraction 6 over 6")[$frac(1, 6) + frac(2, 6) + frac(3, 6) + frac(4, 6) + frac(5, 6) + frac(6, 6)$], which we can rewrite as #math.equation(block: false, alt: "1 times the fraction 1 over 6 plus 2 times the fraction 1 over 6 plus 3 times the fraction 1 over 6 plus 4 times the fraction 1 over 6 plus 5 times the fraction 1 over 6 plus 6 times the fraction 1 over 6")[$1 × frac(1, 6) + 2 × frac(1, 6) + 3 × frac(1, 6) + 4 × frac(1, 6) + 5 × frac(1, 6) + 6 × frac(1, 6)$]. That’s exactly the computation we did to find the expected value! In fact, expected values can always be treated as a special kind of mean called a #strong[weighted mean], where the weights are the probabilities associated with each value. When the probabilities are all equal, the weighted mean is just the regular mean. === Interpreting Expected Values As we noted, the expected value of an experiment is the mean of the values we would observe if we repeated the experiment a large number of times. (This interpretation is due to an important theorem in the theory of probability called the Law of Large Numbers.) Let’s use that to interpret the results of the previous example. #examplebox("Example 2")[Interpreting Expected Values][ Interpret the expected values of the following experiments. + Roll a standard 6-sided die and note the number showing. + Roll 2 standard 6-sided dice and note the sum of the numbers showing. + Draw a card from a well-shuffled standard deck of cards and note its #emph[Rummy] value (15 for aces; 10 for tens, jacks, queens, and kings; 5 for everything else). #solutionbox[ + If you roll a standard 6-sided die many times, the mean of the numbers you roll will be around 3.5. + If you roll a pair of standard 6-sided dice many times, the mean of the sums of the numbers you roll will be about 7. + If you draw a card from a well-shuffled deck many times, the mean of the #emph[Rummy] values of the cards would be around 7.3. ] ] #notebox("Who Knew?", rgb("#183B6F"), rgb("#183B6F"), rgb("#EFF1F5"))[ #emph[Pascal’s Wager] The French scholar Blaise Pascal (1623–1662) was among the earliest mathematicians to study probabilities, and was the first to accurately describe and compute expected values. In his book #emph[Pensées] (#emph[Thoughts]), he turned the analysis of expected values to his belief in the Christian God. He said that there is no way for people to establish the probability that God exists, but since the “winnings” on a bet that God exists (and that you then lead your life accordingly) are essentially infinite, the expected value of taking that bet is always positive, no matter how unlikely it is that God exists. ] === Using Expected Value Now that we know how to find and interpret expected values, we can turn our attention to using them. Suppose someone offers to play a game with you. If you roll a die and get a 6, you get \$10. However, if you get a 5 or below, you lose \$1. Is this a game you’d want to play? Let’s look at the expected value: The probability of winning is #math.equation(block: false, alt: "the fraction 1 over 6")[$frac(1, 6)$] and the probability of losing is #math.equation(block: false, alt: "the fraction 5 over 6")[$frac(5, 6)$], so the expected value is #math.equation(block: false, alt: "$ 10 times the fraction 1 over 6 plus open parenthesis minus $ 1 close parenthesis times the fraction 5 over 6 equals the fraction 5 over 6 approximately equals $ 0.83")[$\$ 10 × frac(1, 6) + ( − \$ 1 ) × frac(5, 6) = frac(5, 6) ≈ \$ 0.83$]. That means, on average, you’ll come out ahead by about 83 cents every time you play this game. It’s a great deal! On the other hand, if the winnings for rolling a 6 drop to \$3, the expected value becomes #math.equation(block: false, alt: "$ 3 times the fraction 1 over 6 plus open parenthesis minus $ 1 close parenthesis times the fraction 5 over 6 equals minus the fraction 1 over 3 approximately equals minus $ 0.33")[$\$ 3 × frac(1, 6) + ( − \$ 1 ) × frac(5, 6) = − frac(1, 3) ≈ − \$ 0.33$], meaning you should expect to lose about 33 cents on average for every time you play. Playing that game is not a good idea! In general, this is how casinos and lottery corporations make money: Every game has a negative expected value for the player. #notebox("Who Knew?", rgb("#183B6F"), rgb("#183B6F"), rgb("#EFF1F5"))[ #emph[Expected Values in Football] In the 21st century, data analytics tools have revolutionized the way sports are coached and played. One tool in particular is used in football at crucial moments in the game. When a team faces a fourth down (the last possession in a series of four possessions, a fairly common occurrence), the coach faces a decision: Run one play to try to gain a certain number of yards, or kick the ball away to the other team. Here’s the interesting part of the decision: If the team “goes for it” and runs the play and they are successful, then they keep possession of the ball and can continue in their quest to score more points. If they are unsuccessful, then they lose possession of the ball, giving the other team an opportunity to score points. If, instead, the team punts, or kicks the ball away, then the other team gets possession of the ball, but in a worse position for them than if the original team goes for it and fails. To analyze this situation, data analysts have generated empirical probabilities for every fourth down situation, and computed the expected value (in terms of points) for each decision. Coaches frequently use those calculations when they decide which option to take! ] #notebox("People in Mathematics", rgb("#183B6F"), rgb("#183B6F"), rgb("#EFF1F5"))[ #emph[Pierre de Fermat and Blaise Pascal] In 1654, a French writer and amateur mathematician named Antoine Gombaud (who called himself the Chevalier du Mére) reached out to his gambling buddy Blaise Pascal to answer a question that he’d read about called the “problem of points.” The question goes like this: Suppose you’re playing a game that is scored using points, and the first person to earn 5 points is the winner. The game is interrupted with the score 4 points to 2. If the winner stood to win \$100, how should the prize money be divided between the players? Certainly the person who is 1 point away from victory should get more, but #emph[how much] more? We have developed tools in this section to answer this question. At its heart, it’s a question about conditional probabilities and expected value. At the time that Pascal first started thinking about it, though, those ideas hadn’t yet been invented. Pascal reached out to a colleague named Pierre de Fermat, and over the course of a couple of months, their correspondence with each other would eventually solve the problem. In the process, they first described conditional probabilities and expected values! Apart from their work in probability, these men are famous for other work in mathematics (and, in Pascal’s case, philosophy and physics). Fermat is remembered for his work in geometry and in number theory. After his death, the statement of what came to be called “Fermat’s Last Theorem” was discovered scribbled in the margin of a book, with the note that Fermat had discovered a “marvelous proof that this margin is too small to contain.” The theorem says that any equation of the form #math.equation(block: false, alt: "a to the power n plus b to the power n equals c to the power n")[$a^(n) + b^(n) = c^(n)$] has no positive integer solutions if #math.equation(block: false, alt: "n greater than or equal to 3")[$n ≥ 3$]. No proof of that theorem was discovered until 1994, when Andrew Wiles used computers and new branches of geometry to finally prove the theorem! Pascal is remembered for the “arithmetical triangle” that is named for him (though he wasn’t the first person to discover it; see the section on the binomial distribution for more), as well as work in geometry. In physics, Pascal worked on hydrodynamics and air pressure (the SI unit for pressure is named for him), and in philosophy, Pascal advocated for a mathematical approach to philosophical problems. ] #examplebox("Example 3")[Using Expected Values][ In the casino game keno, a machine chooses at random 20 numbers between 1 and 80 (inclusive) without replacement. Players try to predict which numbers will be chosen. Players don’t try to guess all 20, though; generally, they’ll try to predict between 1 and 10 of the chosen numbers. The amount won depends on the number of guesses they made and the number of guesses that were correct. + At one casino, a player can try to guess just 1 number. If that number is among the 20 selected, the player wins \$2; otherwise, the player loses \$1. What is the expected value? + At the same casino, if a player makes 2 guesses and they’re both correct, the player wins \$14; otherwise, the player loses \$1. What is the expected value? + Players can also make 3 guesses. If 2 of the 3 guesses are correct, the player wins \$1. If all 3 guesses are correct, the player wins \$42. Otherwise, the player loses \$1. What is the expected value? + Which of these games is the best for the player? Which is the best for the casino? #solutionbox[ + There are 20 winning numbers out of 80, so if we try to guess one of them, the probability of guessing correctly is #math.equation(block: false, alt: "the fraction 20 over 80 equals the fraction 1 over 4")[$frac(20, 80) = frac(1, 4)$]. The probability of losing is then #math.equation(block: false, alt: "the fraction 3 over 4")[$frac(3, 4)$], and so the expected value is #math.equation(block: false, alt: "$ 2 times the fraction 1 over 4 plus open parenthesis minus $ 1 close parenthesis times the fraction 3 over 4 equals minus $ 0.25")[$\$ 2 × frac(1, 4) + ( − \$ 1 ) × frac(3, 4) = − \$ 0.25$]. + There are #math.equation(block: false, alt: "sub 20 C sub 2 equals 190")[$20 C_(2) = 190$] winning choices out of #math.equation(block: false, alt: "sub 80 C sub 2 equals 3 , 160")[$80 C_(2) = 3 , 160$] total ways to choose 2 numbers. So, the probability of winning is #math.equation(block: false, alt: "the fraction 190 over 3 , 160")[$frac(190, 3 "," 160)$] and the probability of losing is #math.equation(block: false, alt: "the fraction 3 , 160 minus 190 over 3 , 160 equals the fraction 2 , 970 over 3 , 160")[$frac(3 "," 160 − 190, 3 "," 160) = frac(2 "," 970, 3 "," 160)$]. So, the expected value of the game is #math.equation(block: false, alt: "$ 14 times the fraction 190 over 3 , 160 plus open parenthesis minus $ 1 close parenthesis times the fraction 2970 over 3160 approximately equals minus $ 0.10")[$\$ 14 × frac(190, 3 "," 160) + ( − \$ 1 ) × frac(2970, 3160) ≈ − \$ 0.10$]. + #strong[Step 1:] Let’s start with the big prize. There are #math.equation(block: false, alt: "sub 20 C sub 3 equals 1 , 140")[$20 C_(3) = 1 , 140$] ways to correctly guess 3 winning numbers out of #math.equation(block: false, alt: "sub 80 C sub 3 equals 82 , 160")[$80 C_(3) = 82 , 160$] ways to guess three numbers total. That means the probability of winning the big prize is #math.equation(block: false, alt: "the fraction 1 , 140 over 82 , 160 approximately equals 0.01388")[$frac(1 "," 140, 82 "," 160) ≈ 0.01388$]. #strong[Step 2:] Let’s find the probability of the second prize. The denominator is the same: 82,160. Let’s figure out the numerator. To win the second prize, the player must pick 2 of the 20 winning numbers and one of the 60 losing numbers. The number of ways to do that can be found using the Multiplication Rule for Counting: there are #math.equation(block: false, alt: "sub 20 C sub 2 equals 190")[$20 C_(2) = 190$] ways to pick 2 winning numbers and 60 ways to pick 1 losing number, so there are #math.equation(block: false, alt: "190 times 60 equals 11 , 400")[$190 × 60 = 11 , 400$] ways to win the second prize. So, the probability of winning that second prize is #math.equation(block: false, alt: "the fraction 11 , 400 over 82 , 160 approximately equals 0.13875")[$frac(11 "," 400, 82 "," 160) ≈ 0.13875$]. #strong[Step 3:] Since the overall probability of winning is #math.equation(block: false, alt: "the fraction 1 , 140 over 82 , 160 plus the fraction 11 , 400 over 82 , 160 equals the fraction 12 , 540 over 82 , 160 approximately equals 0.15263")[$frac(1 "," 140, 82 "," 160) + frac(11 "," 400, 82 "," 160) = frac(12 "," 540, 82 "," 160) ≈ 0.15263$], the probability of losing must be #math.equation(block: false, alt: "1 minus 0.15263 equals 0.84737")[$1 − 0.15263 = 0.84737$]. So, the expected value is #math.equation(block: false, alt: "$ 42 times 0.01388 plus $ 1 times 0.13875 plus open parenthesis minus $ 1 close parenthesis times 0.84737 approximately equals minus $ 0.13")[$\$ 42 × 0.01388 + \$ 1 × 0.13875 + ( − \$ 1 ) × 0.84737 ≈ − \$ 0.13$]. + The bet that’s the best for the player is the one with the highest expected value for the player, which is guessing two numbers. The best one for the casino is the one with the lowest expected value for the player, which is guessing one number. ] ] #notebox("Work It Out", rgb("#059669"), rgb("#007942"), rgb("#EAF3EC"))[ #emph[Make Your Own Lottery] By yourself or with a partner, devise your own lottery scheme. Assume you would have access to one or more machines that choose numbers randomly. What will a lottery draw look like? How many numbers are players choosing from? How many will be drawn? Will they be drawn with replacement or without replacement? What conditions must be met for a player to win first or second (or more!) prize? Once you’ve decided that, decide the payoff structure for winners, and how much the game will cost to play. Try to make the game enticing enough that people will want to play it, but with enough negative expected value that the lottery will make money. Aim for the expected value to be about −0.25 times the cost of playing the game. ] === Key Terms - expected value === Key Concepts - The expected value of an experiment is the sum of the products of the numerical outcomes of an experiment with their corresponding probabilities. - The expected value of an experiment is the most likely value of the average of a large number of replications of the experiment. === Formulas - If #math.equation(block: false, alt: "O")[$O$] represents an outcome of an experiment and #math.equation(block: false, alt: "n open parenthesis O close parenthesis")[$n ( O )$] represents the value of that outcome, then the expected value of the experiment is: #math.equation(block: true, alt: "∑ n open parenthesis O close parenthesis times P open parenthesis O close parenthesis")[$display(∑ n ( O ) × P ( O ))$]where #math.equation(block: false, alt: "Σ")[$upright(Σ)$] stands for the sum, meaning we add up the results of the formula that follows over all possible outcomes. === Projects + The Binomial Distribution is one of many examples of a #emph[discrete probability distribution]. Other examples include the Geometric, Hypergeometric, Multinomial, Poisson, and Negative Binomial Distributions. Choose one of these distributions, and find out what makes it different from the Binomial Distribution. In what situations can it be applied? How is it used? Once you have an idea of how it’s used, write a series of five questions like the ones in this chapter that can be answered with that distribution, and find the answers. + #emph[Binomial] is a word that also comes up in algebra; the word describes polynomials with two terms. At first glance, there isn’t much to indicate that these two uses of the word are related, but it turns out there is a connection. Explore the connection between the Binomial Distribution and the algebraic concept of binomial expansion, (the process of multiplying out expressions like #math.equation(block: false, alt: "open parenthesis x plus y close parenthesis to the power n")[$attach(( x + y ), t: n)$] for a positive whole number #math.equation(block: false, alt: "n")[$n$]). Search for a connection with the mathematical object known as Pascal’s Triangle. + Hazard is a dice game that was mentioned in Chaucer’s #emph[Canterbury Tales]. It was a popular game of chance played in taverns and coffee houses well into the 18th century; its popularity at the time of the foundation of probability theory means that it was a common example in early texts on finding expected values and probabilities. Find the rules of the game, and get some practice playing it. Then, analyze the choices that the caster gets to make, and decide which is most advantageous, using the language of expected values.