4.2 Mean or Expected Value and Standard Deviation

The centre and spread of a distribution rather than of a data set. The expected value is the long-term average of a random variable, found by multiplying each value by its probability and adding the products, and it is denoted by the Greek letter mu because it is a parameter of a process rather than a statistic computed from data. It need not be one of the values the variable can take. The standard deviation is the square root of the sum of squared deviations weighted by their probabilities, with no divisor because the probabilities already sum to one. Both are computed from a single expected value table, and the Law of Large Numbers is what connects them to what actually happens over many trials.

Subject: Statistics · 72 slides · symbolic lesson

Open the interactive version of this deck

What this lesson covers

The lesson, slide by slide

1. Mean or Expected Value and Standard Deviation

Title

Statistics · Chapter 4 — Discrete Random Variables

The centre and spread of a probability distribution, and what they promise about the long run

2. What this lesson gives you

Objectives

Section 4.1 turned a random process into a table: every value the random variable can take, and the probability of each. That table is complete, but it is hard to talk about. This section boils it down to two numbers you already know how to read from Chapter 2, a centre and a spread, and then asks what those numbers actually promise.

One idea runs underneath all of it. The expected value is not a prediction about the next trial. It is the average you would see over a very long run of trials, and the Law of Large Numbers is the fact that makes that average settle down. Keep asking of every number in this deck: is this about one trial, or about the long run?

OpenStax Introductory Statistics 2e, §4.2 Mean or Expected Value and Standard Deviation §4.2, pp. 230-236 — the section this deck covers

3. Before anything new: a mean from a frequency table

Warm-up

Chapter 2 found the mean of data that came as a frequency table. That calculation is the seed of everything here, so do it again now from memory.

Discussion prompt

Fifty post-operative patients were asked how many times they rang the nurse in a 12-hour shift. Four rang 0 times, 8 rang once, 16 rang twice, 14 rang three times, 6 rang four times and 2 rang five times. Find the mean number of rings, showing the sum you divide.

These are the book's own numbers, from Try It 4.1 and 4.4. You will meet them again twice in this deck, first as a probability distribution and at the end as data, and the fact that both views give 2.32 is the bridge between Chapter 2 and Chapter 4.

If the division by 50 felt like the natural last step, good: that instinct is exactly what this section rearranges. By the end of Part 1 you will see the same 2.32 come out of a formula with no division in it at all, and the reason is that each count over 50 is already a share of the patients.

4. Computing an expected value

Section

Part 1

5. Probability is about the long run, not the next toss

Concept

Toss a fair coin twice. Probability does not promise one head and one tail; you might get two heads. Toss it ten times and you might see nine heads. Probability says nothing definite about a short run of trials.

What it does describe is the long run. The statistician Karl Pearson once tossed a fair coin 24,000 times and recorded 12,012 heads.

\[ \frac{12{,}012}{24{,}000} = 0.5005 \]

That relative frequency is within five ten-thousandths of the probability one half. Notice what did not happen: the count of heads was not exactly 12,000. It was 12 more. The proportion got close; the count did not have to.

Law of Large Numbers — As the number of trials of a probability experiment increases, the difference between the theoretical probability of an event and its relative frequency approaches zero.

This law is the reason a probability is worth knowing at all, and Part 4 returns to it for averages. For now take one lesson from it: the numbers in this section describe what happens over many repetitions, never what happens on the next one.

OpenStax Introductory Statistics 2e, §4.2 Mean or Expected Value and Standard Deviation §4.2, p. 230 — Pearson's tosses and the Law of Large Numbers

6. From a frequency table to an expected value

Concept

Start from the warm-up. The data mean divides the sum of value times frequency by the number of observations, n.

\[ \bar{x} = \frac{\sum x f}{n} \]

Dividing a sum by n is the same as dividing each term by n. That one move pushes the n inside, next to each frequency.

\[ \bar{x} = \sum x \cdot \frac{f}{n} \]

Now read the fraction. A frequency over the total is a relative frequency: the share of the observations that took the value x. In the long run, by the Law of Large Numbers, each relative frequency settles on the probability of that value. Replace each share by its probability and the data mean becomes the long-run mean.

\[ \mu = \sum x \, P(x) \]

expected value — The long-term average of a random variable, written μ: multiply each value of the random variable by its probability and add the products. It is also called the mean of the distribution.

So the expected value is not a new idea. It is the weighted mean you already know, with probabilities as the weights, and the Greek letter says it describes the whole process rather than one batch of data.

OpenStax Introductory Statistics 2e, §4.2 Mean or Expected Value and Standard Deviation §4.2, p. 230 — the mean of a discrete probability function

7. Reading the expected value formula piece by piece

Notation

Four symbols, each doing one job. Read the formula aloud as: for every value, value times its probability, then add them all.

Annotate

On: \( \mu = \sum x\,P(x) \)

  • The Greek letter mu: the mean of the distribution. Greek because it is a fixed property of the random process, a parameter, not a statistic computed from one sample.
  • Add over every value the random variable can take, one term per row of the table. Miss a row and the answer is wrong.
  • One value of the random variable: a number of days, a count of wakings, a profit in dollars. The units of μ are the units of x.
  • The probability of that value. These are the weights, and they add to 1, which is why no division appears.

The missing division is the part that surprises people. The data formula divided by n; this one divides by nothing. It does not need to, because the probabilities already add to one: the division by the total has been done inside each weight.

One consequence you can use at once: μ is an average of the values, so it must lie between the smallest and the largest value. An expected value outside that range is proof of an arithmetic slip.

Say the units out loud whenever you write μ. Days per week, wakings per week, dollars per play: the per is the long run speaking, a reminder that the number is an average over many repetitions of the same experiment.

8. The expected value is a balance point

Picture it

Draw the distribution of Example 4.3 as bars: a soccer team plays zero, one or two days a week with probabilities 0.2, 0.5 and 0.3. Now imagine each bar as a weight standing on a plank at its value.

Figure (svg): A probability histogram with bars at 0, 1 and 2 days of heights 0.2, 0.5 and 0.3. A yellow triangle under the baseline at 1.1, with a dashed line up from it labelled mu equals 1.1, marks the balance point.

Think of each bar as a weight sitting on a plank at its value. The plank balances at 1.1, a little to the right of 1, because the weight at 2 is heavier than the weight at 0.

The plank balances at exactly one point, and that point is μ. Here it is 1.1. The heaviest weight, at 1, pulls the balance towards 1; the weight at 2 is heavier than the weight at 0, so the balance sits a little to the right of 1 rather than exactly on it.

This picture is worth carrying in your head, because it tells you where μ must be before you compute anything. Move probability towards a large value and the balance point slides that way. Put a tiny weight very far out, as a lottery does, and it can drag the balance point a surprising distance.

9. Example 4.3: how many days a week the soccer team plays

Worked example

A soccer team plays zero, one or two days a week, with probabilities 0.2, 0.5 and 0.3. Find the long-term average number of days per week.

Name the random variable in words first, because every column of the table depends on it: X is the number of days the team plays soccer in a week, and it takes the values 0, 1 and 2.

Check the distribution before using it

Why: the probabilities must each lie between 0 and 1 and add to 1; if they do not, there is nothing to compute.

\[ 0.2 + 0.5 + 0.3 = 1 \]

The book organises this work in an expected value table: the two columns of the distribution, x and P(x), plus a third column for their product. The table is not decoration. It keeps every row visible, so a missing value or a mistyped probability shows up before it spoils the answer.

Build the third column

Why: multiply each value by its probability, one row at a time.

\[ (0)(0.2) = 0, \quad (1)(0.5) = 0.5, \quad (2)(0.3) = 0.6 \]

Notice the first row. A value of zero contributes nothing to the total, however likely it is. The weeks with no soccer still matter, though: they are part of why the probabilities of the other rows are only 0.8 between them.

xP(x)x P(x)
00.20
10.50.5
20.30.6
total11.1

Add the third column

Why: the column total is the expected value.

\[ \mu = 0 + 0.5 + 0.6 = 1.1 \]

In words: over many weeks, the team plays on average 1.1 days per week. No single week has 1.1 days of soccer; the number describes the long run.

Check against the balance picture

Why: 1.1 lies between the smallest value 0 and the largest value 2, and just right of 1, exactly where the heavier weight at 2 should pull it.

\[ 0 \le 1.1 \le 2 \]

OpenStax Introductory Statistics 2e, §4.2 Mean or Expected Value and Standard Deviation §4.2, p. 231 — Example 4.3 and Table 4.5

10. An expected value need not be a possible value

Concept

The soccer team can play 0, 1 or 2 days. It can never play 1.1 days. Yet 1.1 is the right answer. There is no contradiction, because μ answers a different question from the one the word expected suggests.

\[ \mu = 1.1 \notin \{0, 1, 2\} \]

Think of one hundred weeks. About 20 weeks with no soccer, about 50 with one day, about 30 with two. Add up the days and divide by the weeks.

\[ \frac{20(0) + 50(1) + 30(2)}{100} = \frac{110}{100} = 1.1 \]

A total of 110 days over 100 weeks is perfectly possible; it is only the per-week average that falls between the whole numbers. Families have 2.4 children on average for the same reason.

So read expected value as long-run average value, never as the value you should expect on the next trial. The next week will be a 0, a 1 or a 2, and the most likely single week is a 1, not the 1.1. This distinction is the root of the trap you will meet in Part 4.

OpenStax Introductory Statistics 2e, §4.2 Mean or Expected Value and Standard Deviation §4.2, p. 231 — the long-term average of Example 4.3

11. Try It 4.3: bottles of water per order

Worked example

A customer orders 1, 2 or 3 bottles of water, with probabilities 0.6, 0.3 and 0.1. Find the expected number of bottles per order.

X is the number of bottles in one order. The values start at 1, not 0: nobody orders zero bottles, so there is no zero row. The table has exactly the rows the situation allows, no more.

Check the distribution

Why: three probabilities, each between 0 and 1.

\[ 0.6 + 0.3 + 0.1 = 1 \]

Before multiplying, place the answer with the balance picture. Most of the weight, 0.6, sits on 1 bottle, and all the rest sits to its right, so μ must be a little above 1 and below 2, the middle value.

Multiply each value by its probability

Why: the third column, row by row.

\[ (1)(0.6) = 0.6, \quad (2)(0.3) = 0.6, \quad (3)(0.1) = 0.3 \]

Two rows give the same product, 0.6, for different reasons: one is a small value with a large probability, the other a larger value with half the probability. The expected value only ever sees the products.

Add the products

Why: the column total.

\[ \mu = 0.6 + 0.6 + 0.3 = 1.5 \]

In context: over many orders, customers take 1.5 bottles per order on average. A shop planning its stock for 1,000 orders should expect to hand over about 1,500 bottles.

Check with a thousand orders

Why: about 600 orders of one, 300 of two and 100 of three is 600 plus 600 plus 300 bottles, 1,500 in all, which is 1.5 per order.

\[ \frac{600(1) + 300(2) + 100(3)}{1000} = \frac{1500}{1000} = 1.5 \]

OpenStax Introductory Statistics 2e, §4.2 Mean or Expected Value and Standard Deviation §4.2, p. 231 — Try It 4.3

12. Before computing: where will the night-waking mean fall?

Prediction

Example 4.4 records how many times a week a newborn's crying wakes its parents after midnight. The values run from 0 to 5 with probabilities 2, 11, 23, 9, 4 and 1 out of 50. Use the balance picture before you use the formula.

Predict first

Without computing, where does the expected number of wakings lie?

  • a little above 2
  • exactly 2.5, the middle of 0 to 5
  • a little below 2
  • somewhere above 3

Correct: a little above 2

Why: Almost half the probability, 23 out of 50, sits on 2. The weights on 3, 4 and 5 add to 14 out of 50 and sit further from 2 than the 13 out of 50 on 0 and 1, so they tip the balance slightly to the right. The exact answer is 2.1.

The tempting answer is 2.5, the midpoint of the values. That would be right only if every value were equally likely. Here they are far from equal: 2 is common and 5 happens once in fifty weeks.

Making this estimate first takes ten seconds and protects you from the most common slip in the section, averaging the values instead of weighting them. If your computed answer lands far from your estimate, recheck the table before you trust it.

OpenStax Introductory Statistics 2e, §4.2 Mean or Expected Value and Standard Deviation §4.2, p. 231 — Example 4.4

13. Example 4.4 (first half): the expected number of night wakings

Worked example

The distribution, as the book gives it, in fiftieths.

x012345
P(x)2/5011/5023/509/504/501/50

The probabilities come as fractions over 50, which tells you where they came from: 50 weeks of observation, or 50 babies. Keeping the common denominator makes the arithmetic almost entirely whole numbers.

Check the distribution

Why: the numerators must add to 50 so that the probabilities add to 1.

\[ 2 + 11 + 23 + 9 + 4 + 1 = 50 \]

Multiply each value by its probability

Why: keep the fiftieths; the numerators become value times count.

\[ 0, \; \tfrac{11}{50}, \; \tfrac{46}{50}, \; \tfrac{27}{50}, \; \tfrac{16}{50}, \; \tfrac{5}{50} \]

Each numerator is now value times count: 2 wakings in each of 23 weeks is 46 wakings. Adding the numerators counts every waking across all 50 weeks, and dividing by 50 shares them out per week.

Add the numerators

Why: all six products share the denominator 50.

\[ \mu = \frac{0 + 11 + 46 + 27 + 16 + 5}{50} = \frac{105}{50} \]

Divide

Why: 105 over 50.

\[ \mu = 2.1 \]

Figure (svg): A single horizontal bar built from five coloured pieces laid end to end on a scale from 0 to 2.4: 0.22 for one waking, 0.92 for two, 0.54 for three, 0.32 for four and 0.10 for five. A dashed yellow line marks the total, 2.1.

The expected value is literally the length of this bar. The row for two wakings is the longest piece: a middling value with the most probability does most of the pulling.

The picture lays the six products end to end. Their total length is μ, and you can see which rows do the work: two wakings, with the most probability, supplies 0.92 of the 2.1 by itself.

Check against the prediction and in decimals

Why: 2.1 is a little above 2, as the balance argument said; in decimals the products 0.22, 0.92, 0.54, 0.32 and 0.10 add to the same 2.1.

\[ 0.22 + 0.92 + 0.54 + 0.32 + 0.10 = 2.1 \]

OpenStax Introductory Statistics 2e, §4.2 Mean or Expected Value and Standard Deviation §4.2, pp. 231-232 — Example 4.4 and Table 4.6

14. Trap: averaging the values instead of weighting them

Trap

The trap

A first attempt at the soccer team's expected value:

\[ \mu = \frac{0 + 1 + 2}{3} = 1 \]

And the same move on the night wakings gives 2.5.

\[ \frac{0 + 1 + \cdots + 5}{6} = 2.5 \]

Wrong both times. The arithmetic is fine; it answers the wrong question.

The fix

Adding the values and dividing by how many there are treats every value as equally likely. The soccer team plays one day half the time and zero days only a fifth of the time, so the values must be weighted.

\[ \mu = (0)(0.2) + (1)(0.5) \]

\[ \quad + (2)(0.3) = 1.1 \]

The plain average is right only when all the probabilities are equal. Guard against it by always writing the P(x) column first; a value you cannot attach a probability to has no business in the sum.

OpenStax Introductory Statistics 2e, §4.2 Mean or Expected Value and Standard Deviation §4.2, p. 230 — multiply each value by its probability

15. Try It 4.4: the nurse call distribution

Fill the middle

Back to the fifty patients of the warm-up, now as a distribution: P(0) = 4/50, P(1) = 8/50, P(2) = 16/50, P(3) = 14/50, P(4) = 6/50, P(5) = 2/50. Fill in the two missing numerators and the expected value.

Fill in the blanks

\mu = \frac32} + 42 + 24 + 10}2.32 = ___

Why: The row for two rings gives 2 times 16, which is 32, and the row for four rings gives 4 times 6, which is 24. The six numerators add to 116, and 116 over 50 is 2.32 rings per shift.

Each numerator is a value times its count, exactly as in the warm-up. That is not a coincidence: this distribution was built from those fifty patients, so its expected value is their mean, 2.32.

In context: over many shifts, a post-operative patient rings the nurse about 2.3 times per 12-hour shift on average. A ward of 20 such patients should plan for roughly 46 calls a shift, give or take.

If you got 2.5, you averaged the values 0 to 5. If you got a number above 5 or below 0, a numerator is wrong, since a weighted average can never escape the range of the values.

OpenStax Introductory Statistics 2e, §4.2 Mean or Expected Value and Standard Deviation §4.2, p. 232 — Try It 4.4

16. Nancy's classes: estimate the mean first

Estimation

From Section 4.1, Example 4.2: Nancy attends class 3 days a week 80 percent of the time, 2 days 15 percent, 1 day 4 percent and no days 1 percent. Estimate her long-run average before you compute it.

Predict first

Nancy's expected number of class days per week is closest to

  • about 2.7
  • exactly 3
  • about 1.5
  • about 2.0

Correct: about 2.7

Why: Eighty percent of the weight sits on 3, so the balance point is near 3, but the 20 percent spread over 2, 1 and 0 pulls it a little to the left. It cannot be exactly 3 unless she never misses. The exact value is 0 plus 0.04 plus 0.30 plus 2.40, which is 2.74.

\[ \mu = (0)(0.01) + (1)(0.04) + (2)(0.15) + (3)(0.80) = 2.74 \]

Good estimates come from the balance picture, not the formula. Ask where most of the weight sits, then ask which way the rest of it pulls. Here most of it sits on 3 and everything else is to the left, so the answer is a little under 3.

The 1.5 option is the midpoint of the values, the trap from two slides ago. The 2.0 option comes from treating the four percentages as if they were equal shares of a smaller total.

OpenStax Introductory Statistics 2e, §4.2 Mean or Expected Value and Standard Deviation §4.1, pp. 229-230 — Example 4.2, Nancy's attendance

17. Exercises 21 and 22: find the mistake in each table

Error analysis

The book's practice set hands you two expected value tables with something wrong in each. The table is a checking device, so learn to read it for errors, not only to fill it in.

Annotate

On: \( \text{Ex. 21: } \sum P(x) = 0.15 + 0.25 + 0.30 + 0.20 + 0.15 = 1.05 \)

  • Every product in the third column is right, but the probabilities add to 1.05, not 1. This is not a probability distribution at all, so its expected value means nothing.
  • The row x = 2, P = 0.25 has 0.40 in the product column. Two times 0.25 is 0.50.
  • The row x = 3, P = 0.25 has 0.65 in the product column. Three times 0.25 is 0.75.
  • Its probabilities add to only 0.65, so rows are missing as well: the table cannot be a complete distribution either.

Both mistakes would have been caught by the first step of every worked example in this deck: check that the probabilities add to one before computing anything. That check is free, and it catches a missing row, a mistyped probability and an impossible situation all at once.

The product-column errors in Exercise 22 are the other classic. They are caught by redoing each multiplication, and more quickly by the range test: a product can never be larger than the value in its row.

OpenStax Introductory Statistics 2e, §4.2 Mean or Expected Value and Standard Deviation §4.2 practice, p. 266 — Exercises 21 and 22

18. The standard deviation of a distribution

Section

Part 2

19. The mean is not the whole story

Concept

Here are three distributions on the values 0, 1 and 2. Every one of them has expected value exactly 1. Check the middle one with the formula.

\[ (0)(0.25) + (1)(0.5) + (2)(0.25) = 1 \]

Figure (svg): Three probability histograms on the values 0, 1 and 2, all balancing at 1. Left: all the probability on 1. Middle: 0.25, 0.5, 0.25. Right: 0.5 on 0 and 0.5 on 2, nothing on 1. The shaded band of one standard deviation widens from nothing to 0.71 to 1.

The mean cannot tell these three apart; all three balance at 1. What differs is how far the probability sits from 1, and that distance is what the standard deviation measures.

Yet they describe very different processes. On the left, the outcome is always 1: there is no uncertainty at all. In the middle, the outcome is usually 1 but sometimes 0 or 2. On the right, the outcome is never 1; it is always a full step away from the mean, one way or the other.

Knowing only μ, you could not tell these apart. You need a second number that says how far from μ the outcomes typically land. For data, Chapter 2 used the standard deviation. The same idea carries over here, with probabilities again doing the job that frequencies did.

OpenStax Introductory Statistics 2e, §4.2 Mean or Expected Value and Standard Deviation §4.2, p. 234 — like data, probability distributions have standard deviations

20. Building the standard deviation from its pieces

Concept

Measure spread the way Chapter 2 did, one step at a time. Start with how far each value lies from the centre: its deviation.

\[ x - \mu \]

Deviations below the mean are negative and those above are positive, and weighted by their probabilities they cancel to exactly zero, so they cannot be averaged directly. Square each one so that every distance counts as positive.

\[ (x - \mu)^2 \]

Weight each squared deviation by the probability of its value and add. This is the average squared distance from μ over the long run, and it is called the variance.

\[ \sigma^2 = \sum (x - \mu)^2 P(x) \]

Finally undo the squaring, so the answer is back in the units of x rather than squared units.

\[ \sigma = \sqrt{\sum (x - \mu)^2 P(x)} \]

Every step matches the data version. The only change is that each squared deviation is weighted by a probability instead of being counted by a frequency and divided by a total.

OpenStax Introductory Statistics 2e, §4.2 Mean or Expected Value and Standard Deviation §4.2, pp. 230, 234 — the standard deviation of the PDF

21. Reading the standard deviation formula piece by piece

Notation

This formula is the one students mangle most, usually by adding a divisor it does not have. Read each piece before you use it.

Annotate

On: \( \sigma = \sqrt{\sum (x - \mu)^2 \, P(x)} \)

  • Sigma, the standard deviation of the distribution: the typical distance of an outcome from μ. Greek again, because it describes the process, not a sample.
  • The deviation of one value from the mean. You need μ first, which is why the table computes the mean column before this one.
  • Makes every deviation positive and weights large deviations heavily: a value twice as far away counts four times as much.
  • The weight. The weights add to 1, so the sum is already an average and there is no n, and no n minus 1, anywhere.
  • Returns to the units of x. Without it you have the variance, in squared days or squared dollars.

The book describes the procedure in one sentence, and it is worth memorising in this exact order: find each deviation from the expected value, square it, multiply it by its probability, add the products, and take the square root.

If you ever find yourself dividing by the number of rows, stop. That is data thinking. Here the division has already happened, inside each probability.

Also watch the order of the last two operations. Square each deviation, then weight, then add, then root. Taking the root of each squared deviation before adding would just give back the distances, and averaging distances is a different measure from σ.

22. Table 4.12: the standard deviation for the soccer team

Worked example

The soccer team again: values 0, 1, 2 with probabilities 0.2, 0.5, 0.3, and μ = 1.1 from Example 4.3. Add a fourth column to the same table. It cannot be started earlier, because every entry in it uses μ, which is the total of the third column.

Find each deviation

Why: value minus 1.1.

\[ 0 - 1.1 = -1.1, \quad 1 - 1.1 = -0.1, \quad 2 - 1.1 = 0.9 \]

Check the deviations before squaring them: weighted by the probabilities they must cancel, because μ is the balance point. Minus 1.1 times 0.2, minus 0.1 times 0.5 and 0.9 times 0.3 are minus 0.22, minus 0.05 and plus 0.27, which add to zero. That cancellation is why the deviations are squared.

Square each deviation

Why: the signs disappear.

\[ (-1.1)^2 = 1.21, \quad (-0.1)^2 = 0.01, \quad (0.9)^2 = 0.81 \]

Weight each square by its probability

Why: this fills the fourth column.

\[ (1.21)(0.2) = 0.242, \quad (0.01)(0.5) = 0.005, \quad (0.81)(0.3) = 0.243 \]

xP(x)x P(x)(x − μ)² P(x)
00.200.242
10.50.50.005
20.30.60.243
total1μ = 1.1σ² = 0.49

Add the fourth column

Why: this total is the variance.

\[ \sigma^2 = 0.242 + 0.005 + 0.243 = 0.49 \]

Take the square root

Why: back to days.

\[ \sigma = \sqrt{0.49} = 0.7 \]

In context: in a typical week the number of days played is about 0.7 of a day away from the long-run average of 1.1.

Check that the size is plausible

Why: the values sit 0.1 to 1.1 away from μ, so a typical distance of 0.7 lies inside that range, as it must.

\[ 0.1 < 0.7 < 1.1 \]

OpenStax Introductory Statistics 2e, §4.2 Mean or Expected Value and Standard Deviation §4.2, p. 235 — Table 4.12

23. Deviations as arrows from the balance point

Concept

Here is the soccer calculation drawn. Each arrow starts at the balance point, 1.1, and ends at one of the values. Its length is the deviation.

Figure (svg): The soccer histogram in grey with the balance point at 1.1. Three arrows start at 1.1 and point to each value: a long arrow of minus 1.1 to 0, a very short arrow of minus 0.1 to 1, and an arrow of plus 0.9 to 2. On the right, each deviation squared times its probability: 0.242, 0.005 and 0.243, total 0.49.

Each arrow is one deviation. The short arrow to 1 barely counts even though it carries half the probability; the two long arrows, squared, supply almost all of the 0.49.

Look at the middle arrow. The value 1 carries half the probability, the biggest weight in the table, but its arrow is tiny, and squaring a tiny number makes it tinier still. Its contribution to the variance is only 0.005.

The two outer arrows are long, and squaring makes them count heavily. Between them they supply 0.485 of the 0.49. That is the general pattern: σ is driven by values far from the mean, even ones with modest probability, while values near the mean contribute almost nothing however likely they are.

24. Example 4.4 (second half): the spread of the night wakings

Worked example

Now the fourth column for the newborn, using μ = 2.1 from the first half. The probabilities in decimals are 0.04, 0.22, 0.46, 0.18, 0.08 and 0.02.

Find the six deviations

Why: each value minus 2.1.

\[ -2.1, \; -1.1, \; -0.1, \; 0.9, \; 1.9, \; 2.9 \]

Keep μ exactly at 2.1 here; it is exact, since 105 over 50 has no rounding. If μ had been rounded, every deviation would carry the error, which is why the book advises a calculator or computer for longer tables.

Square them

Why: one square per row.

\[ 4.41, \; 1.21, \; 0.01, \; 0.81, \; 3.61, \; 8.41 \]

Look at the largest square, 8.41, for five wakings. It is by far the biggest number in this row, but it is about to be multiplied by the smallest probability in the table, 0.02.

Weight each square by its probability

Why: for example, 4.41 times 0.04 is 0.1764.

\[ 0.1764, \; 0.2662, \; 0.0046, \; 0.1458, \; 0.2888, \; 0.1682 \]

Add the fourth column

Why: the variance.

\[ \sigma^2 = 0.1764 + 0.2662 + 0.0046 + 0.1458 + 0.2888 + 0.1682 = 1.05 \]

Take the square root

Why: back to wakings per week.

\[ \sigma = \sqrt{1.05} \approx 1.0247 \]

In context: a typical week's number of night wakings is about one waking away from the long-run average of 2.1.

Check the rows against the arrow picture

Why: the value 2, nearest the mean, has the most probability yet contributes the least, 0.0046; the far values 0, 4 and 5 contribute the most. That is the pattern the soccer arrows predicted.

\[ 0.0046 < 0.1458 < 0.1682 < 0.1764 < 0.2662 < 0.2888 \]

OpenStax Introductory Statistics 2e, §4.2 Mean or Expected Value and Standard Deviation §4.2, p. 232 — Example 4.4 and Table 4.6

25. One standard deviation either side of the mean

Concept

Put both answers of Example 4.4 on the histogram: the balance point at 2.1 and a band one standard deviation wide on each side of it.

Figure (svg): A probability histogram of the number of night wakings per week, 0 to 5, with bar heights 0.04, 0.22, 0.46, 0.18, 0.08 and 0.02. The balance point is at 2.1 and a blue band runs from 1.08 to 3.12, one standard deviation either side.

The band from about 1.08 to 3.12 covers the values 2 and 3, which carry 0.64 of the probability. A typical week lands about one waking away from the long-run average.

\[ 2.1 - 1.0247 \approx 1.08, \qquad 2.1 + 1.0247 \approx 3.12 \]

The band covers the values 2 and 3, which together carry 0.46 plus 0.18, that is 0.64, of the probability. Roughly two weeks in three land within one standard deviation of the mean, and the rest land further out, mostly at 1 or 4.

That is what σ is for: it gives a sense of scale. A week with four wakings is about 1.9 above average, which is less than two standard deviations: unusual, but not alarming. A week with five is almost three standard deviations out, and happens one week in fifty.

26. Which rows carry the standard deviation?

Discrimination

Each row of the night-waking table contributes its weighted squared deviation to the variance of 1.05. Sort the rows by whether they contribute a lot or very little, and notice what the big contributors have in common.

Sort into buckets

Sort each row of Example 4.4 by its contribution to the variance.

More than 0.15 of the 1.05
x = 0, P = 0.04: contributes 0.1764; x = 1, P = 0.22: contributes 0.2662; x = 4, P = 0.08: contributes 0.2888; x = 5, P = 0.02: contributes 0.1682
Almost nothing
x = 2, P = 0.46: contributes 0.0046
big
Zero, one, four and five all sit at least 1.1 away from the mean of 2.1. Squaring a large deviation makes it very large, so even the tiny probabilities 0.04 and 0.02 give sizeable contributions.
small
Two is only 0.1 from the mean. Its squared deviation is 0.01, so even the largest probability in the table, 0.46, leaves it contributing under half a hundredth.

The row with the most probability contributes the least. That surprises people once, and then it becomes the most useful intuition about σ: the standard deviation is about distance, and probability only decides how much each distance counts.

It also tells you where σ is fragile. Change the probability of five wakings from 0.02 to 0.10 and σ jumps, because that row is far out. Change the probability of two wakings a little and σ hardly moves.

27. Example 4.7: even faces on two tosses of a die

Worked example

Toss a fair six-sided die twice. X is the number of faces that show an even number. Find μ and σ.

The random variable is not the faces themselves but a count built from them, so it takes only the values 0, 1 and 2. Get its probabilities by counting in the sample space, which has 36 equally likely outcomes.

Figure (svg): A six by six grid of the 36 outcomes of two tosses, each cell showing how many of its two faces are even: 0, 1 or 2. The cells alternate in a checkerboard-like pattern; 9 cells show 0, 18 show 1 and 9 show 2.

Every cell is equally likely, so each probability is a count of cells over 36. The 1s fill half the grid because there are two ways to get exactly one even face: even then odd, or odd then even.

Read the probabilities off the grid

Why: count the cells showing 0, 1 and 2.

\[ P(0) = \tfrac{9}{36}, \quad P(1) = \tfrac{18}{36}, \quad P(2) = \tfrac{9}{36} \]

You can also get these without the grid. Each toss is even with probability one half, independently, so both odd is one half times one half, one quarter, and so is both even. Exactly one even takes the remaining half. Nine, eighteen and nine thirty-sixths are those same quarters and halves.

Compute the mean

Why: the third column.

\[ \mu = 0\left(\tfrac{9}{36}\right) + 1\left(\tfrac{18}{36}\right) + 2\left(\tfrac{9}{36}\right) = \tfrac{36}{36} = 1 \]

Fill the fourth column

Why: deviations of minus 1, 0 and plus 1, squared and weighted.

\[ (0-1)^2\tfrac{9}{36} = \tfrac{9}{36}, \quad (1-1)^2\tfrac{18}{36} = 0, \quad (2-1)^2\tfrac{9}{36} = \tfrac{9}{36} \]

Add and take the root

Why: the fourth column totals eighteen thirty-sixths.

\[ \sigma = \sqrt{\tfrac{18}{36}} = \sqrt{0.5} \approx 0.7071 \]

In context: on average one of the two faces is even, and the count typically misses that by about 0.7. The book says to build a table like Table 4.11, but the four-column layout it means is Table 4.12's.

Check the probabilities and the symmetry

Why: the three probabilities add to 1, and the distribution is symmetric about 1, so a mean of exactly 1 is forced.

\[ \tfrac{9 + 18 + 9}{36} = 1, \qquad P(0) = P(2) \]

OpenStax Introductory Statistics 2e, §4.2 Mean or Expected Value and Standard Deviation §4.2, p. 235 — Example 4.7, Tables 4.13 and 4.14

28. Try It 4.7: two stacks of cards numbered 1 to 8

Prediction

Two stacks of cards, each numbered 1 to 8. Pick one card from each stack; X is the number of cards showing an odd number. Predict before you compute.

Predict first

Compared with Example 4.7, the mean and standard deviation of X are

  • exactly the same: μ = 1, σ ≈ 0.7071
  • larger, since there are 64 outcomes instead of 36
  • the same mean but a smaller σ
  • impossible to compare without the full table

Correct: exactly the same: μ = 1, σ ≈ 0.7071

Why: Each card is odd with probability four eighths, which is one half, just as each die face is even with probability one half. The two picks are independent in both problems, so X has the same distribution: one quarter, one half, one quarter. The same distribution means the same mean and the same standard deviation.

\[ P(0) = \tfrac{16}{64} = \tfrac14, \quad P(1) = \tfrac{32}{64} = \tfrac12, \quad P(2) = \tfrac{16}{64} = \tfrac14 \]

The size of the sample space is a red herring. What μ and σ depend on is the distribution of X, the list of values and their probabilities, and here that list is identical. Sixteen of the 64 pairs are odd and odd, 32 are mixed, and 16 are even and even.

This is the reason Chapter 4 exists. Different situations that produce the same distribution can be solved once. Section 4.3 names the pattern behind this one, the binomial distribution.

OpenStax Introductory Statistics 2e, §4.2 Mean or Expected Value and Standard Deviation §4.2, p. 236 — Try It 4.7

29. Four attempts at σ for the night wakings

Error analysis

Four students were given the night-waking table, whose fourth column adds to 1.05, and asked for σ. Only one is right. Find what each of the others did.

Annotate

On: \( \sigma = 1.05 \quad | \quad \sqrt{\tfrac{1.05}{6}} \approx 0.42 \quad | \quad \sqrt{\tfrac{1.05}{5}} \approx 0.46 \quad | \quad \sqrt{1.05} \approx 1.02 \)

  • This is the variance, not the standard deviation. The last step, the square root, was skipped, so the answer is in squared wakings.
  • Divided by the number of rows, as if the six values were six data points. The probabilities have already done the averaging; this divides a second time.
  • Divided by n minus 1, the sample standard deviation from Chapter 2. There is no sample here and no n; this is a distribution.
  • Correct. Weighted squared deviations, added, then rooted, with no divisor: about 1.0247 wakings.

The two divisor errors are the same instinct: every standard deviation so far had a divisor, so one gets supplied from habit. Ask what the weights add to. When they add to one, the average is already taken.

A quick sanity check catches all three wrong answers. The values sit between 0.1 and 2.9 away from the mean, and most of the probability sits 0.1 to 1.1 away, so a typical distance near 1 is right; 0.42 is too small to describe that spread.

30. Trap: bringing the n minus 1 back

Trap

The trap

Having learned the sample standard deviation in Chapter 2, a student writes for the soccer team:

\[ \sigma = \sqrt{\frac{0.242 + 0.005 + 0.243}{3 - 1}} \]

\[ = \sqrt{0.245} \approx 0.49 \]

Wrong. The fourth column was right; the division is not.

The fix

The data formula divides by n minus 1 because it estimates a population's spread from a sample. A probability distribution is not a sample. Its weights are probabilities that already add to one, so the weighted sum is the average squared distance.

\[ \sigma = \sqrt{0.49} = 0.7 \]

The number of rows in the table is not a sample size. The soccer table has three rows because the team can play three different numbers of days, not because anyone observed three weeks.

OpenStax Introductory Statistics 2e, §4.2 Mean or Expected Value and Standard Deviation §4.2, p. 235 — Table 4.12

31. A second route to the variance, for checking

Concept

The book notes that for some distributions there are short-cut formulas for σ. There is also one that works for every discrete distribution, and it makes a good independent check. Expand the square inside the variance.

\[ \sum (x-\mu)^2 P(x) = \sum x^2 P(x) - 2\mu \sum x P(x) + \mu^2 \sum P(x) \]

Two of those sums you already know. The sum of x times P(x) is μ, and the probabilities add to 1.

\[ = \sum x^2 P(x) - 2\mu \cdot \mu + \mu^2 \cdot 1 \]

\[ \sigma^2 = \sum x^2 P(x) - \mu^2 \]

Try it on the soccer team. The squares of the values weighted by their probabilities give 1.7, and μ squared is 1.21.

\[ \sigma^2 = (0)(0.2) + (1)(0.5) + (4)(0.3) - 1.1^2 = 1.7 - 1.21 = 0.49 \]

Same 0.49, by a route that never computes a deviation. Use the deviation table to learn what σ means and this line to check your arithmetic. It relies on the probabilities adding to one, which is one more reason to check that first.

OpenStax Introductory Statistics 2e, §4.2 Mean or Expected Value and Standard Deviation §4.2, p. 235 — short-cut formulas for μ and σ

32. Exercise 20: a four-value distribution, checked two ways

Worked example

The book's practice Exercise 20 gives values 2, 4, 6, 8 with probabilities 0.1, 0.3, 0.4, 0.2. Find μ and σ.

This one is worth doing by hand because the book prints the fourth column for you to compare against, and the answer comes out exact. It is also the first table here whose values are spaced two apart, so it shows that nothing in the method depends on the values being consecutive.

Check the distribution

Why: four probabilities.

\[ 0.1 + 0.3 + 0.4 + 0.2 = 1 \]

Compute the mean

Why: the third column: 0.2, 1.2, 2.4, 1.6.

\[ \mu = 0.2 + 1.2 + 2.4 + 1.6 = 5.4 \]

Find the deviations and square them

Why: each value minus 5.4.

\[ (-3.4)^2 = 11.56, \; (-1.4)^2 = 1.96, \; (0.6)^2 = 0.36, \; (2.6)^2 = 6.76 \]

Before weighting, notice the symmetry you might have expected is missing. The values 2 and 8 are equally far from 5, the middle of the range, but μ is 5.4, pulled right by the heavy weight on 6. So 2 now sits further from the mean than 8 does.

Weight by the probabilities

Why: the fourth column, as the book prints it.

\[ 1.156, \quad 0.588, \quad 0.144, \quad 1.352 \]

Add the fourth column

Why: the variance.

\[ \sigma^2 = 1.156 + 0.588 + 0.144 + 1.352 = 3.24 \]

Take the square root

Why: a clean answer.

\[ \sigma = \sqrt{3.24} = 1.8 \]

Check with the shortcut

Why: the weighted squares of the values give 32.4, and 5.4 squared is 29.16.

\[ 4(0.1) + 16(0.3) + 36(0.4) + 64(0.2) - 5.4^2 = 32.4 - 29.16 = 3.24 \]

OpenStax Introductory Statistics 2e, §4.2 Mean or Expected Value and Standard Deviation §4.2 practice, pp. 265-266 — Exercises 19 and 20, Table 4.24

33. Expected value and decisions

Section

Part 3

34. When the values are money, define X as profit

Concept

Expected value earns its keep when the outcomes carry a gain or a loss. Should you play this game? Take this bet? Buy this warranty? The expected value answers: what happens to your money per play, on average, over many plays.

The first move decides everything. The random variable must be the amount of money you gain, not the thing that happens in the game. In a lottery, the numbers drawn are the outcome; your profit is the random variable.

\[ X = \text{profit per play} = \text{amount received} - \text{amount paid} \]

Then read the sign of μ.

expected valuethe game is calledover many plays you
μ > 0favourable to yougain about μ per play
μ = 0fairbreak even on average
μ < 0unfavourable to youlose about |μ| per play

A negative expected value is a promise about the long run, not a prediction for today. You may win tonight. The expected value says what the average does if you keep playing, and Part 4 says why the average cannot escape it.

OpenStax Introductory Statistics 2e, §4.2 Mean or Expected Value and Standard Deviation §4.2, p. 233 — Example 4.5: the values of x are profits

35. Example 4.5: what are the values of X?

Step zero

A game of chance: a computer picks five numbers from 0 to 9, with replacement. You pay 2 dollars to play. If you match all five numbers in order, you get your 2 dollars back plus 100,000 dollars. Before any probability, set up the random variable.

Discussion prompt

Define X in words and list the values it takes. Why are the values not 0, 1, 2 and so on up to 9?

The phrasing to watch is you get your 2 dollars back plus 100,000. When a problem says that, the stake is returned and the profit is exactly the extra amount. When a problem only says you win 100,000 and you paid 2 to play, the profit is 99,998. Read it twice.

Writing X in words is the single step most likely to rescue a gambling problem. Once X is the profit, every other step is the same arithmetic as the soccer team.

OpenStax Introductory Statistics 2e, §4.2 Mean or Expected Value and Standard Deviation §4.2, p. 233 — Example 4.5

36. Example 4.5: the expected profit of the five-number game

Worked example

X is your profit per play: minus 2 dollars or 100,000 dollars. Find the probabilities, then μ.

The probabilities are not given; they come from the mechanism of the game. Each of the five draws is an independent pick of one digit in ten, and you need all five to match.

Probability of one correct number

Why: ten equally likely digits.

\[ P(\text{one match}) = \tfrac{1}{10} \]

Probability of all five in order

Why: the draws are with replacement, so they are independent and the probabilities multiply.

\[ \left(\tfrac{1}{10}\right)^5 = 10^{-5} = 0.00001 \]

That is the multiplication rule for independent events from Section 3.3. Another way to see it: there are 100,000 possible five-digit sequences, from 00000 to 99999, and exactly one of them is yours.

Probability of losing

Why: the complement.

\[ 1 - 0.00001 = 0.99999 \]

Build the third column

Why: profit times probability for each row.

\[ (-2)(0.99999) = -1.99998, \quad (100{,}000)(0.00001) = 1 \]

Add the third column

Why: the expected profit.

\[ \mu = -1.99998 + 1 = -0.99998 \]

In context: over many plays you lose, on average, about 1 dollar per game. Yet on no single play do you lose 1 dollar: each time you either lose 2 or win 100,000. The dollar is the long-run average loss.

Check with 100,000 plays

Why: about one win and 99,999 losses: 100,000 dollars won, 199,998 dollars paid, a net loss of 99,998, which is 0.99998 per play.

\[ \frac{100{,}000 - 2(99{,}999)}{100{,}000} = \frac{-99{,}998}{100{,}000} = -0.99998 \]

OpenStax Introductory Statistics 2e, §4.2 Mean or Expected Value and Standard Deviation §4.2, p. 233 — Example 4.5 and Table 4.8

37. Why a huge prize moves μ so little

Concept

Draw Example 4.5 on a number line of profit. The axis has to be broken, because the prize is fifty thousand times further from zero than the loss.

Figure (svg): A number line of profit in dollars, broken between 2 and 100,000. A huge red dot at minus 2 is labelled lose 2 dollars, probability 0.99999. A dot too small to see well at 100,000 is labelled profit 100,000, probability 0.00001. A yellow triangle marks the mean at about minus 1.

Dot areas show the probabilities. The balance point sits at about minus one dollar: the far-away prize is heavy enough to drag it one dollar to the right of minus two, and no further.

The loss is almost certain, so almost all the weight sits at minus 2. The prize is enormous but carries a weight of one hundred-thousandth. Weight times distance is what moves a balance point, and here that product is exactly 1: the prize contributes one dollar to μ, and not a cent more.

\[ (100{,}000)(0.00001) = 1 \]

That is the whole economics of a lottery. The prize is set so that its contribution to the expected value is smaller than the price of the ticket. The size of the prize is what gets advertised; the product of prize and probability is what decides the game.

38. Your own extension: what prize would make Example 4.5 fair?

Worked example

A fair game has expected profit zero. Keep the 2 dollar stake and the probability 0.00001, and let the profit on a win be W. Find the W that makes the game fair.

Write μ with the unknown prize

Why: the same two rows as before.

\[ \mu = (-2)(0.99999) + W(0.00001) \]

Set the expected value to zero

Why: the definition of a fair game.

\[ -1.99998 + 0.00001\,W = 0 \]

Isolate the prize term

Why: add 1.99998 to both sides.

\[ 0.00001\,W = 1.99998 \]

This is the same equation as before, run backwards. Instead of feeding in the prize and reading off μ, you fix μ at zero and solve for the prize. Any one quantity in an expected value table can be found this way if the others are known.

Divide by the probability

Why: one hundred-thousandth.

\[ W = \frac{1.99998}{0.00001} = 199{,}998 \]

In context: the prize would have to be almost 200,000 dollars, nearly double the real one, before the game stopped costing you money on average. The operator keeps about half of every dollar played.

Check by substituting back

Why: with W equal to 199,998 the two products cancel exactly.

\[ (-2)(0.99999) + (199{,}998)(0.00001) = -1.99998 + 1.99998 = 0 \]

OpenStax Introductory Statistics 2e, §4.2 Mean or Expected Value and Standard Deviation §4.2, p. 233 — extends Example 4.5

39. Example 4.6: a biased coin that pays more than it takes

Worked example

You toss a biased coin once per game. Heads has probability two thirds and tails one third. On heads you pay 6 dollars; on tails you win 10 dollars. If you play many times, do you come out ahead?

Define the random variable

Why: profit per toss, so heads is a negative value.

\[ X = \text{profit}: \quad x = 10 \text{ (tails)}, \quad x = -6 \text{ (heads)} \]

Before computing, weigh it up. You win more when you win, 10 against 6, but you lose twice as often. Doubling the 6 gives 12, which beats 10, so expect a small negative answer.

Multiply each profit by its probability

Why: the third column.

\[ (10)\left(\tfrac13\right) = \tfrac{10}{3}, \qquad (-6)\left(\tfrac23\right) = -\tfrac{12}{3} \]

Add the column

Why: a common denominator of 3.

\[ \mu = \tfrac{10}{3} - \tfrac{12}{3} = -\tfrac{2}{3} \approx -0.67 \]

Figure (svg): A probability histogram of profit: a bar of height two thirds at minus 6 dollars and a bar of height one third at 10 dollars. The balance point, marked by a yellow triangle, is at minus two thirds, just left of zero.

The win is bigger than the loss, but the loss is twice as likely. Twice the weight at six to the left beats half the weight at ten to the right, and the plank tips just below zero.

In context: you lose about 67 cents per toss on average, so no, over many games you do not come out ahead. The win is bigger than the loss, but the loss is twice as likely, and that tips the balance.

Check with 300 tosses

Why: about 100 tails and 200 heads: 1,000 dollars won, 1,200 dollars paid, a net loss of 200, which is two thirds of a dollar per toss.

\[ \frac{100(10) + 200(-6)}{300} = \frac{-200}{300} = -\tfrac{2}{3} \]

OpenStax Introductory Statistics 2e, §4.2 Mean or Expected Value and Standard Deviation §4.2, pp. 233-234 — Example 4.6, Tables 4.9 and 4.10

40. Try It 4.6: complete the spinner's expected value table

Comparison

A spinner lands on red with probability 2/5, blue 2/5 and green 1/5. On red you pay 10 dollars, on blue nothing happens, on green you win 10 dollars. Fill in the blanks of the table, then the expected value.

Comparison matrix

colourx (profit)P(x)x P(x)
red-102/5−20/5 = −4
blue02/50
green101/52
total1-2

Red is a payment, so its profit is minus 10, and minus 10 times two fifths is minus four. Blue is a profit of zero, and a zero row contributes nothing whatever its probability. Green gives 10 times one fifth, which is 2.

\[ \mu = -4 + 0 + 2 = -2 \]

In context: you lose 2 dollars per spin on average. The game looks symmetric, a 10 dollar loss against a 10 dollar win, but red is twice as likely as green. When the payoffs match, the probabilities decide the sign of μ.

OpenStax Introductory Statistics 2e, §4.2 Mean or Expected Value and Standard Deviation §4.2, p. 234 — Try It 4.6 and Table 4.11

41. Try It 4.5: guessing four suits in a row

Worked example

Four cards are drawn from a standard 52-card deck, with replacement. You guess the suit of each before it is drawn. You pay 1 dollar to play; if every guess is right you get your dollar back and 256 dollars. Find your expected profit.

Define X and its values

Why: profit per game: the stake comes back on a win, so the profit is exactly 256.

\[ x = 256 \quad \text{or} \quad x = -1 \]

Probability of one correct suit

Why: 13 of the 52 cards are in any one suit.

\[ \tfrac{13}{52} = \tfrac14 \]

Probability of all four

Why: independent draws, because the cards are replaced.

\[ \left(\tfrac14\right)^4 = \tfrac{1}{256} \]

The replacement matters. Without it the second card's suit probabilities would depend on the first card, and the simple product would be wrong. The problem says the cards are replaced precisely so that each guess is a fresh one-in-four chance.

Build and add the third column

Why: the losing probability is the complement, 255 over 256.

\[ \mu = 256\left(\tfrac{1}{256}\right) + (-1)\left(\tfrac{255}{256}\right) = 1 - \tfrac{255}{256} \]

Simplify

Why: one 256th of a dollar.

\[ \mu = \tfrac{1}{256} \approx 0.0039 \]

In context: a favourable game, but only just. You gain about four tenths of a cent per game on average. The prize of 256 exactly repays the odds of 1 in 256; the extra comes from getting the stake back on top.

Check with 256 games

Why: about one win of 256 and 255 losses of 1 dollar leave you exactly 1 dollar ahead, which is one 256th of a dollar per game.

\[ \frac{256 - 255}{256} = \frac{1}{256} \]

OpenStax Introductory Statistics 2e, §4.2 Mean or Expected Value and Standard Deviation §4.2, p. 233 — Try It 4.5

42. Favourable, fair or unfavourable?

Sorting

Sort each game by the sign of your expected profit. Work out μ roughly in your head for each; the exact values are in the feedback.

Sort into buckets

Sort each game by what it does to your money in the long run.

Favourable: μ above 0
Four suits: pay 1, profit 256 with P = 1/256; Die deal: win 10 on a six, 5 on a four or five, pay 6 on one to three
Fair: μ = 0
Fair coin: pay 5 on heads, win 5 on tails
Unfavourable: μ below 0
Five-digit lottery: pay 2, profit 100,000 with P = 0.00001; Biased coin: pay 6 with P = 2/3, win 10 with P = 1/3; Spinner: pay 10 with P = 2/5, win 10 with P = 1/5
fav
The four-suit game gives one 256th of a dollar per game, and the die deal gives 10 sixths plus 10 sixths minus 18 sixths, which is one third of a dollar per roll.
fair
Equal chances of winning and losing the same 5 dollars: five halves minus five halves is zero.
unf
The lottery loses about 1 dollar per play, the biased coin about 67 cents, and the spinner 2 dollars. In each, the likely outcome is a loss big enough to outweigh the unlikely win.

The die deal is homework Exercise 74. It feels risky because you pay on half the rolls, but the two winning rows carry bigger amounts than the losing one, and the balance lands at plus one third of a dollar.

Notice that neither the size of the prize nor the chance of winning decides the sort on its own. The four-suit game has a much smaller prize than the lottery and is favourable; the die deal wins only half the time and is favourable. Only the weighted sum decides.

OpenStax Introductory Statistics 2e, §4.2 Mean or Expected Value and Standard Deviation §4.2 homework, p. 271 — Exercise 74

43. Example 4.8: betting on an earthquake in Iran

Worked example

On 11 May 2013 the probability of a moderate earthquake in Iran in the next 48 hours was about 21.42 percent. You bet that one will happen: win 50 dollars if it does, pay 20 dollars if it does not. X is the profit from one bet. Will you come out ahead, and what is σ?

List the values and probabilities

Why: the loss probability is the complement.

\[ P(50) = 0.2142, \quad P(-20) = 1 - 0.2142 = 0.7858 \]

Build the third column

Why: profit times probability.

\[ (50)(0.2142) = 10.71, \quad (-20)(0.7858) = -15.716 \]

Add for the mean

Why: the expected profit.

\[ \mu = 10.71 - 15.716 = -5.006 \]

So far this answers the first question: no, you do not come out ahead. The book also asks for σ, and here the minus sign on μ is where people slip. Subtracting a negative mean adds its size.

Find the deviations

Why: each profit minus μ; subtracting a negative adds.

\[ 50 - (-5.006) = 55.006, \quad -20 - (-5.006) = -14.994 \]

Square and weight them

Why: the fourth column, as the book prints it.

\[ (55.006)^2(0.2142) \approx 648.0964, \quad (-14.994)^2(0.7858) \approx 176.6636 \]

Add and take the root

Why: the book stops at the table; the root is supplied here.

\[ \sigma = \sqrt{648.0964 + 176.6636} = \sqrt{824.76} \approx 28.72 \]

Figure (svg): A probability histogram of profit for the earthquake bet: a bar of height 0.7858 at minus 20 dollars and a short bar of height 0.2142 at 50 dollars. The mean, minus 5.01, is marked with a triangle, and a blue band runs about 28.7 dollars either side of it.

The spread is almost six times the size of the mean. A single bet tells you almost nothing about the average; only a long run of bets reveals the five-dollar drift.

In context: if you make this bet many times under the same conditions, you lose about 5.01 dollars per bet on average, so you do not come out ahead. A single bet is spread about 28.72 dollars either side of that average.

Check with the shortcut

Why: the weighted squares of the profits give 849.82, and μ squared is about 25.06.

\[ 2500(0.2142) + 400(0.7858) - 5.006^2 = 849.82 - 25.06 = 824.76 \]

OpenStax Introductory Statistics 2e, §4.2 Mean or Expected Value and Standard Deviation §4.2, p. 236 — Example 4.8 and Table 4.15

44. Try It 4.8: the same bet on Japan

Worked example

The same evening, the probability of a moderate earthquake in Japan in the next 48 hours was about 1.08 percent. Win 100 dollars if one happens, pay 10 dollars if not. Find μ and σ of the profit.

Values and probabilities

Why: the complement of 0.0108.

\[ P(100) = 0.0108, \quad P(-10) = 0.9892 \]

Third column and its sum

Why: the win row is small because the probability is.

\[ \mu = (100)(0.0108) + (-10)(0.9892) = 1.08 - 9.892 = -8.812 \]

Compare with Iran before going on. A prize twice as big, a loss half as big, and yet a worse average, because the probability of winning dropped from about 21 percent to about 1 percent. The prize row is multiplied by a tiny weight.

Deviations

Why: each profit minus μ.

\[ 100 + 8.812 = 108.812, \quad -10 + 8.812 = -1.188 \]

Square and weight

Why: the fourth column.

\[ (108.812)^2(0.0108) \approx 127.8726, \quad (-1.188)^2(0.9892) \approx 1.3961 \]

Add and take the root

Why: the variance is about 129.27.

\[ \sigma = \sqrt{129.2687} \approx 11.37 \]

In context: this bet loses about 8.81 dollars per bet on average, worse than the Iran bet even though its prize is twice as big, because a quake in Japan was twenty times less likely that night.

Check with the shortcut

Why: weighted squares of the profits minus μ squared.

\[ 10000(0.0108) + 100(0.9892) - 8.812^2 = 206.92 - 77.65 = 129.27 \]

OpenStax Introductory Statistics 2e, §4.2 Mean or Expected Value and Standard Deviation §4.2, p. 236 — Try It 4.8

45. Same expected value, very different risk

Concept

An expected value alone cannot tell you how much is at stake on each play. Compare two games on a fair coin. In the first you win or lose 1 dollar; in the second you win or lose 1,000 dollars.

\[ \mu_1 = (1)(0.5) + (-1)(0.5) = 0 \]

\[ \mu_2 = (1000)(0.5) + (-1000)(0.5) = 0 \]

Both are perfectly fair, and over a long run both leave you where you started on average. But nobody would call them the same game. The standard deviation tells them apart, because every outcome sits exactly its stake away from zero.

\[ \sigma_1 = \sqrt{(1)^2(0.5) + (-1)^2(0.5)} = 1 \]

\[ \sigma_2 = \sqrt{(1000)^2(0.5) + (-1000)^2(0.5)} = 1000 \]

So a decision needs both numbers. The expected value says which way your money drifts over many plays; the standard deviation says how violently it swings on the way there. The Iran bet drifts about 5 dollars down per bet while swinging about 29 dollars either way, and that ratio is exactly why a gambler can have a winning evening on a losing bet.

Exercise 75, next, asks you to weigh these two numbers against each other for three real-sounding investments. There, no single answer is right until you say which kind of risk you mean.

46. Exercise 75: three investments, three answers

Worked example

A venture capitalist can put 1 million dollars into one of three firms. Profits are in millions. Software: 5 with probability 0.1, 1 with 0.3, lose 1 with 0.6. Hardware: 3 with 0.2, 1 with 0.4, lose 1 with 0.4. Biotech: 6 with 0.1, 0 with 0.7, lose 1 with 0.2.

Work in millions throughout so the numbers stay small, and define each random variable as the profit on the million invested. Losing the million is a profit of minus 1.

Software

Why: three products.

\[ \mu_S = 5(0.1) + 1(0.3) + (-1)(0.6) = 0.5 + 0.3 - 0.6 = 0.2 \]

Hardware

Why: three products.

\[ \mu_H = 3(0.2) + 1(0.4) + (-1)(0.4) = 0.6 + 0.4 - 0.4 = 0.6 \]

Biotech

Why: the middle row contributes nothing.

\[ \mu_B = 6(0.1) + 0(0.7) + (-1)(0.2) = 0.6 + 0 - 0.2 = 0.4 \]

Figure (svg): Three probability histograms of profit in millions of dollars. Software: 0.6 at minus 1, 0.3 at 1, 0.1 at 5, mean 0.2. Hardware: 0.4 at minus 1, 0.4 at 1, 0.2 at 3, mean 0.6. Biotech: 0.2 at minus 1, 0.7 at 0, 0.1 at 6, mean 0.4.

Red bars are the lost million. Hardware has the highest balance point and the least red; biotech rarely loses but pays big only one time in ten; software loses more often than not.

In context: hardware has the highest expected return, 600,000 dollars profit per million invested on average, then biotech at 400,000 and software at 200,000.

Standard deviations, by the shortcut

Why: weighted squares minus the mean squared, in millions.

\[ \sigma_S = \sqrt{3.4 - 0.04} \approx 1.83, \quad \sigma_H = \sqrt{2.6 - 0.36} \approx 1.50 \]

Biotech the same way: its weighted squares are 36 times 0.1 plus 1 times 0.2, which is 3.8.

Biotech's spread

Why: the largest of the three, driven by the rare 6 million dollar outcome.

\[ \sigma_B = \sqrt{3.8 - 0.16} \approx 1.91 \]

Check that each distribution is complete

Why: each set of probabilities adds to 1, so every μ above is a genuine weighted average.

\[ 0.1 + 0.3 + 0.6 = 0.2 + 0.4 + 0.4 = 0.1 + 0.7 + 0.2 = 1 \]

OpenStax Introductory Statistics 2e, §4.2 Mean or Expected Value and Standard Deviation §4.2 homework, p. 271 — Exercise 75

47. Exercise 75: which is safest, which is riskiest?

Comparison

The exercise asks which investment is safest and which is riskiest. There is more than one sensible meaning of risk. Fill the blanks, then read the columns against each other.

Comparison matrix

firmμ (millions)σ (millions)chance of losing the million
software0.21.830.6
hardware0.61.500.4
biotech0.41.910.2

Measured by σ, hardware is the safest, with the smallest spread, and biotech the riskiest, with the largest. Measured by the chance of losing the whole million, biotech is the safest, losing only one time in five, and software the riskiest, losing more often than not.

Both readings are defensible, and a good answer says which one it uses. The standard deviation counts a surprise on the upside as risk too: biotech's large σ comes mostly from its rare 6 million dollar jackpot, not from its losses.

One judgement is not in doubt. Hardware has the highest mean and the smallest σ, so it beats software on both counts: higher average return with less spread.

48. Slide the bet and find the fair odds

Tweak it

Any two-outcome bet has expected profit equal to the win times the chance of winning, minus the loss times the chance of losing. The graph shows that expected profit as the chance of winning runs from 0 to 1.

Parameter explorer

Set the win to 50 and the loss to 20, the Iran bet. Read μ at a winning chance of 0.2142. Then find the winning chance at which the line crosses zero, the fair odds for this bet.

\[ \mu = {W}p - {L}(1-p) \]

  • W — from 0 to 120: amount won
  • L — from 0 to 40: amount lost

\[ 50p - 20(1-p) = 0 \;\Longrightarrow\; 70p = 20 \;\Longrightarrow\; p = \tfrac{2}{7} \approx 0.286 \]

The Iran bet would be fair if an earthquake had a 28.6 percent chance; at 21.42 percent it loses. Now set the win to 100 and the loss to 10, the Japan bet. The line crosses zero at one eleventh, about 0.091, far above the real 0.0108, which is why that bet loses so much more.

Every two-outcome game in this section is one point on one of these lines. The slope is the win plus the loss, so a bigger prize makes the expected value more sensitive to the probability, which is why a small misjudgement of the odds costs a gambler more on a long-shot bet.

49. Why people buy warranties that lose money on average

Real world

A shop sells a 2-year warranty on a device for 80 dollars. Suppose the device fails in that time with probability 0.06, and a replacement costs 400 dollars. These numbers are an illustration, not from the book.

Discussion prompt

Find the expected amount the warranty pays out, and the customer's expected profit from buying it. Then explain why a sensible person might buy it anyway.

\[ \sigma_{\text{no warranty}} = \sqrt{400^2(0.06) - 24^2} = \sqrt{9024} \approx 95 \]

This is the honest limit of expected-value reasoning. It is exactly right for a casino or an insurer, who play the same game millions of times and live in the long run. It is only part of the story for one person making one decision, for whom the spread can matter as much as the centre.

Insurance is the Law of Large Numbers turned into a business: the insurer's average cost per policy settles on the expected payout because it sells so many policies, while each customer faces the full spread.

50. The Law of Large Numbers

Section

Part 4

51. The law for averages

Concept

Part 1 stated the Law of Large Numbers for a relative frequency. The same law holds for averages, and that version is what makes μ mean something.

Repeat an experiment n times and record the value of X each time. Average the n values; call that the observed average. As n grows, the observed average gets closer and closer to μ.

\[ \bar{x}_n = \frac{x_1 + x_2 + \cdots + x_n}{n} \;\longrightarrow\; \mu \quad \text{as } n \to \infty \]

Why it has to be so: in a long run, each value turns up in a share of the trials close to its probability. The observed average is then a weighted average of the values with weights close to the probabilities, which is μ.

\[ \bar{x}_n = \sum x \cdot \frac{\text{count of } x}{n} \;\approx\; \sum x\,P(x) = \mu \]

The book calls μ the long-term average for exactly this reason. The expected value is a prediction about the average of many trials, and the Law of Large Numbers is the guarantee behind that prediction. It is a promise about averages only, never about any single trial.

OpenStax Introductory Statistics 2e, §4.2 Mean or Expected Value and Standard Deviation §4.2, p. 230 — the long-term average and the Law of Large Numbers

52. Watching the average settle: the soccer team

Picture it

Here are two simulated soccer teams, each playing week after week with the probabilities of Example 4.3. After every week, plot the average number of days played so far. The horizontal axis is on a log scale so that you can see the first few weeks and the thousandth on one picture.

Figure (svg): Two jagged curves showing the running average number of days played, over 1 to 3000 simulated weeks, on a logarithmic horizontal axis. Both swing widely over the first ten weeks, between about 0.5 and 2, then settle onto a dashed line at 1.1.

Two simulated teams, each playing week after week with the probabilities of Example 4.3. Early averages wander anywhere; by a thousand weeks both sit on 1.1. That convergence is the whole meaning of the expected value.

In the first handful of weeks the averages jump all over the place, anywhere from about half a day to two days. One week of two days after a week of none moves the average a lot, because there are so few weeks to share it.

By a hundred weeks both averages are close to 1.1, and by a thousand they sit on it. No week ever contained 1.1 days, yet 1.1 is where every long run ends up. That is what the expected value means.

53. Three gamblers and the earthquake bet

Picture it

Now the Iran bet of Example 4.8, simulated for three separate gamblers who each make the bet again and again. Each curve shows that gambler's average profit per bet so far.

Figure (svg): Three jagged curves of the running average profit per bet over 1 to 2000 simulated earthquake bets, on a logarithmic horizontal axis. Each starts at either 50 or minus 20, swings widely, and by a thousand bets hugs a dashed line at minus 5.01, below the break-even line at zero.

Early on, one lucky quake puts a gambler far ahead. Every run is eventually pulled down to the same line, about five dollars lost per bet, and stays there.

After one bet, a gambler is either 50 dollars up or 20 dollars down; the first quake makes someone feel clever. Over the first twenty or thirty bets a lucky run can keep an average above zero for a while.

But the curves all bend down to the same dashed line at about minus 5 dollars and stay there. A spread of 28.72 dollars on one bet does not go away; what shrinks is its effect on the average, because each new bet is a smaller share of the total. That shrinking is the Law of Large Numbers you can see.

54. How fast the average settles: a preview

Concept

The gamblers' curves bunch together as the bets pile up. Chapter 7 will prove how fast: the typical distance of the average of n independent trials from μ is the single-trial σ divided by the square root of n.

\[ \text{typical distance of } \bar{x}_n \text{ from } \mu = \frac{\sigma}{\sqrt{n}} \]

For the Iran bet, with σ about 28.72, that gives the following scale at a few run lengths.

\[ n = 10: \; \frac{28.72}{\sqrt{10}} \approx 9.08, \qquad n = 100: \; \frac{28.72}{10} \approx 2.87 \]

\[ n = 10{,}000: \; \frac{28.72}{100} \approx 0.29 \]

After ten bets, the average is typically about 9 dollars from minus 5, easily far enough to be positive. After a hundred it is typically within about 3 dollars. After ten thousand it is within about 29 cents, and the loss is plain to see.

Notice the square root. To make the average four times as reliable you need sixteen times as many trials. That is why the Law of Large Numbers needs a genuinely large number: a few dozen plays can hide an unfavourable game, while a casino's millions of plays cannot.

55. After ten bets, where is the average?

Prediction

A gambler makes the Iran bet exactly ten times. The long-run average profit is about minus 5 dollars and a single bet has σ about 28.72.

Predict first

Which statement about the average profit of these ten bets is true?

  • It could easily be well above zero or well below minus 5
  • It will be within a few cents of minus 5.01
  • It must be negative, since μ is negative
  • It will equal minus 5.01 exactly

Correct: It could easily be well above zero or well below minus 5

Why: Ten bets is a short run. If three of the ten are winners the gambler is 150 minus 140, which is 10 dollars ahead in total, and if none win the average is minus 20. Both happen quite often. The Law of Large Numbers only pulls the average towards minus 5.01 as the number of bets becomes large.

\[ \text{3 wins in 10: } \frac{3(50) + 7(-20)}{10} = \frac{10}{10} = 1 \qquad \text{0 wins: } -20 \]

This is exactly what casinos rely on and what gamblers misread. A night of ten or twenty bets is short enough for anyone to come out ahead; the house plays millions of bets, and its average sits on μ.

Look back at the three simulated gamblers: at ten bets their averages were spread over tens of dollars. Only at hundreds of bets did they bunch together near the dashed line.

The preview formula puts a number on it: after ten bets the average is typically about 9 dollars from minus 5, so an average of plus 1 is only about two thirds of a typical distance above the mean. Nothing unusual at all.

56. Trap: the law does not make outcomes even out

Trap

The trap

A gambler who has lost the Iran bet eight times in a row reasons:

\[ \text{average so far} = -20 \ll -5.01 \]

so a quake is now due, because the average must come back up to minus 5.

Wrong. The next bet does not know about the last eight.

The fix

The bets are independent: the chance of winning the ninth is still 0.2142. The average returns towards μ not because later results compensate for earlier ones, but because the early results get swamped by the many later ones, which average about minus 5.

\[ P(\text{win on bet } 9 \mid 8 \text{ losses}) = 0.2142 \]

This error is called the gambler's fallacy. The Law of Large Numbers is a statement about averages over many trials. It never changes the probability of the next trial.

OpenStax Introductory Statistics 2e, §4.2 Mean or Expected Value and Standard Deviation §4.2, p. 230 — the Law of Large Numbers

57. Does the count of heads have to catch up?

Counterexample

Someone says: by the Law of Large Numbers, if you toss a fair coin long enough, the number of heads minus the number of tails must shrink to zero.

Discussion prompt

Use Pearson's 24,000 tosses, with 12,012 heads, to show why this is not what the law says. What does shrink?

The same holds for averages and totals. A casino's total profit wanders further from the exact expected total as the night goes on, but its profit per bet settles ever closer to μ. Dividing by n is what makes things settle.

This is one more reason to be careful with the word expected. You should expect the proportion of heads to be close to one half after many tosses. You should not expect the number of heads to be close to exactly half the tosses.

OpenStax Introductory Statistics 2e, §4.2 Mean or Expected Value and Standard Deviation §4.2, p. 230 — Pearson's experiment

58. Match each quantity to what it tells you

Matching

Four numbers appear in every long-run question. Match each to the sentence that says what it describes.

Match the pairs

  • a. μ = Σ x P(x)
  • b. σ = √(Σ (x − μ)² P(x))
  • c. the average of the first 10 plays
  • d. the relative frequency of wins after 24,000 plays
  • w. the long-run average value per trial, a fixed property of the process
  • x. how far a single outcome typically lands from the long-run average
  • y. a short-run result that can sit far from the long-run average
  • z. a proportion that the Law of Large Numbers says is close to the probability

Why: Mu and sigma are parameters of the distribution and never change. The average of ten plays is a statistic from a short run and varies a lot from one gambler to the next. The relative frequency after 24,000 plays is also a statistic, but from a long run, which is when the law says it is reliable.

The first two are Greek because they belong to the process: you compute them from the table, and no amount of playing changes them. The last two are computed from what actually happened, and they change every time someone plays.

Keeping this split straight is most of Chapters 6 to 9. There, you will have only the observed statistics and will use them to learn about the unknown parameters.

A quick test for any number in a problem: could it come out differently if you ran the experiment again tomorrow? If yes, it is a statistic, computed from outcomes. If no, it is a parameter, computed from the distribution.

59. Distributions against data

Section

Part 5

60. Try It 4.4 as data: the same 2.32 two ways

Concept

Look at the fifty patients again, this time as data, one dot per patient.

Figure (svg): A dot plot of 50 patients: 4 dots at 0 rings, 8 at 1, 16 at 2, 14 at 3, 6 at 4 and 2 at 5. A dashed yellow line and triangle mark the mean at 2.32.

Fifty real patients, one dot each. Adding all their rings and dividing by 50 is the same arithmetic as weighting each value by its share of the dots.

As data, the mean adds every patient's rings and divides by 50, the Chapter 2 calculation from the warm-up.

\[ \bar{x} = \frac{116}{50} = 2.32 \]

As a distribution, each value is weighted by its share of the patients, exactly Try It 4.4.

\[ \mu = 0\left(\tfrac{4}{50}\right) + 1\left(\tfrac{8}{50}\right) + \cdots + 5\left(\tfrac{2}{50}\right) = 2.32 \]

Same arithmetic, same answer, because the book built this distribution by treating the relative frequencies from the sample as probabilities. The difference is what the number claims. As a data mean it describes these fifty patients. As an expected value it claims to describe every future patient over the long run, which is only as good as the assumption that these fifty represent them.

OpenStax Introductory Statistics 2e, §4.2 Mean or Expected Value and Standard Deviation §4.2, p. 232 — Try It 4.4, a random sample of 50 patients

61. Where the probabilities come from

Concept

An expected value is only as trustworthy as the probabilities fed into it. In this section they arrived in three different ways, and it is worth naming which is which.

source of P(x)examples in this sectionhow far to trust μ
by design: equally likely outcomesthe five-digit game, the die, the four suitsexact, if the device is fair
from records: relative frequenciesthe soccer team, the newborn, the nurse callsas good as the data behind them
from a model or an expertthe earthquake probabilitiesas good as the model

For a game of chance the probabilities are fixed by the mechanism, so μ is exact: 0.00001 really is the chance of matching five digits. For the soccer team they were estimated from past weeks, so μ is exactly as reliable as the assumption that future weeks behave like past ones.

\[ P(x) \approx \frac{\text{count of } x}{n} \quad\Longrightarrow\quad \mu \approx \bar{x} \]

That last line is the whole connection between Chapter 2 and Chapter 4 in one statement. When the probabilities are relative frequencies from data, the expected value simply is the data mean. The difference is the claim you make with it: a description of what happened, or a prediction about the long run.

OpenStax Introductory Statistics 2e, §4.2 Mean or Expected Value and Standard Deviation §4.2, pp. 232, 236 — Try It 4.4 and Example 4.8

62. Equally likely values: the two formulas agree

Worked example

The book notes that when all outcomes are equally likely, the distribution formulas give the plain mean and standard deviation of the possible outcomes. Check it on one roll of a fair die.

Figure (svg): A probability histogram of one roll of a fair die: six equal bars of height one sixth at 1 to 6. The balance point is at 3.5 and a blue band runs from about 1.79 to 5.21.

With every value equally likely, the weights are all one sixth. The distribution formulas then compute exactly the plain mean and the population standard deviation of the six faces.

The mean as a distribution

Why: every weight is one sixth, so it factors out.

\[ \mu = \tfrac16(1 + 2 + 3 + 4 + 5 + 6) = \tfrac{21}{6} = 3.5 \]

That is the plain average of the six faces

Why: add the faces and divide by 6.

\[ \frac{1 + 2 + 3 + 4 + 5 + 6}{6} = 3.5 \]

Equal weights make the balance point the centre of the faces, 3.5, a value no roll can show, like the soccer team's 1.1.

Now the spread. The deviations run symmetrically, 2.5, 1.5 and 0.5 on each side of the centre, so each squared deviation appears twice.

The squared deviations

Why: each face minus 3.5, squared.

\[ 6.25, \; 2.25, \; 0.25, \; 0.25, \; 2.25, \; 6.25 \]

Weight by one sixth and add

Why: the six squares total 17.5.

\[ \sigma^2 = \tfrac{17.5}{6} \approx 2.9167 \]

Take the root

Why: about 1.71 pips.

\[ \sigma = \sqrt{2.9167} \approx 1.708 \]

Dividing the sum of squares by 6 is the population standard deviation of the six faces, dividing by N. It is not the sample standard deviation, which would divide by 5 and give about 1.87. The distribution describes the whole process, so it matches the population version.

Check with the shortcut

Why: the weighted squares of the faces give 91 over 6, and 3.5 squared is 12.25.

\[ \tfrac{1 + 4 + 9 + 16 + 25 + 36}{6} - 3.5^2 = 15.1667 - 12.25 = 2.9167 \]

OpenStax Introductory Statistics 2e, §4.2 Mean or Expected Value and Standard Deviation §4.2, p. 230 — when all outcomes are equally likely

63. Centre and spread: data against a distribution

Comparison

The same two ideas, centre and spread, have a data version from Chapter 2 and a distribution version from this section. Fill in the blanks to line them up.

Comparison matrix

sample data (Ch. 2)probability distribution (§4.2)
symbol for the meanx̄μ
weights on each valuefrequency / nP(x)
divisor in the spreadn − 1none
symbol for the spreadsσ
describesone set of observationsthe long run

Read across each row and the two columns do the same job. A frequency over n and a probability are both shares that add to one; that is why the means are computed the same way.

The divisor row is where the two differ, for a reason. The sample standard deviation divides by n minus 1 to correct for estimating from a sample. A distribution is not a sample, so there is nothing to correct and no divisor.

And the last row is the conceptual difference. A statistic describes what was observed; a parameter describes the process that produces the observations. Chapter 4 works with the parameters; the second half of the course uses statistics to estimate them.

64. Order the steps for μ and σ

Ranking

Put the steps in the order you would carry them out on a new problem. Some orderings are forced by what each step needs.

Put in order

Order the steps for finding the mean and standard deviation of a discrete random variable.

  1. Define X in words, in the units you care about (profit, not outcome)
  2. List the values of X and their probabilities in a table
  3. Check that the probabilities each lie between 0 and 1 and add to 1
  4. Fill the column x P(x) and add it to get μ
  5. Fill the column (x − μ)² P(x), add it, and take the square root to get σ
  6. Interpret μ as a long-run average and σ as a typical distance, in context

Why: Defining X decides what the values are, and the values decide the table. The probability check has to come before any arithmetic, or you might compute an expected value of something that is not a distribution. The mean must be finished before the fourth column, because every deviation needs it. The interpretation comes last and is what the question actually asked for.

Two orderings are forced. The check on the probabilities comes before any computing, because an expected value of a table that does not add to one means nothing, as Exercise 21 showed. And μ must be found before the fourth column, because every entry there subtracts μ.

The step most often skipped is the first. In a gambling problem, deciding that X is the profit, and that a returned stake is not part of the profit, is where most wrong answers begin.

65. Putting it together

Section

Part 6

66. Pattern: one table, two passes, two sentences

Pattern

Every problem in this section runs on the same machine: the expected value table, filled in two passes, and read out in two sentences.

Figure (svg): A flow diagram of four boxes left to right with arrows between them: define X and list x and P(x); check the probabilities add to 1; column three, x times P(x), summed gives mu; column four, squared deviation times P(x), summed and rooted gives sigma. A final box below: interpret both in the units of X.

Two passes down one table. The fourth column cannot start until the third is totalled, because every entry in it needs μ.
columnentrycolumn total
xeach value of X(none)
P(x)its probabilitymust be 1
x P(x)value times probabilityμ
(x − μ)² P(x)squared deviation times probabilityσ², then root for σ
  1. Define X in words and in the units that matter: for a game, the profit.
  2. Check the probabilities add to 1 before anything else.
  3. First pass: the third column gives μ, which must lie between the smallest and largest value.
  4. Second pass: the fourth column gives σ squared, with no divisor; take the root.
  5. Two sentences: μ as a long-run average and σ as the typical distance from it, in the units of X.

The checks are free and catch most errors: probabilities adding to one, μ inside the range of values, σ smaller than the largest deviation, and, when in doubt, the shortcut formula giving the same variance.

And the two sentences are not optional. A number like minus 5.01 is only an answer once it says that it is dollars, per bet, on average over many bets. Every conclusion in this chapter names the evidence it rests on and the long run it describes.

67. Check: an expected value

Check

One distribution, one expected value. Weight the values; do not just average them.

Check your understanding

X takes the values 1, 2, 3 and 4 with probabilities 0.1, 0.2, 0.3 and 0.4. What is μ?

  • A. 3.0 (correct)
  • B. 2.5
  • C. 1.0
  • D. 0.75

Answer: A

Why: Multiply each value by its probability and add: 0.1 plus 0.4 plus 0.9 plus 1.6 is 3.0. The heaviest weights sit on the larger values, so the balance point sits above the midpoint.

Why B tempts people
That is the plain average of 1, 2, 3 and 4, which treats the values as equally likely. Here the larger values are more likely, so μ must sit above 2.5.
Why C tempts people
That is the sum of the probabilities. It checks that the table is a distribution, but it is not the expected value.
Why D tempts people
That divides the correct 3.0 by the number of values. The probabilities have already done the averaging, so no further division is needed.

A quick estimate would have ruled out three of these. The probabilities increase with the value, so the balance point must sit to the right of the middle of 1 to 4, above 2.5, and below 4.

If you chose the plain average, go back to the soccer trap in Part 1. The plain average is the expected value only when every value has the same probability.

It is worth running the table in full once: products 0.1, 0.4, 0.9 and 1.6, total 3.0, and the probabilities 0.1 to 0.4 adding to exactly 1 first. That check is what makes the total a genuine weighted average.

68. Check: a standard deviation

Check

Now the spread. Use the table, and remember what the probabilities add to.

Check your understanding

X takes the values 0 and 10, each with probability 0.5, so μ = 5. What is σ?

  • A. 5 (correct)
  • B. 25
  • C. √12.5 ≈ 3.54
  • D. √50 ≈ 7.07

Answer: A

Why: Both values are 5 away from the mean, so both squared deviations are 25. Weighted by one half each they add to 25, the variance, and its square root is 5. Every outcome is exactly 5 from the mean, so the typical distance is 5.

Why B tempts people
That is the variance, the sum of the weighted squared deviations. The standard deviation is its square root, back in the units of X.
Why C tempts people
That divides the variance by 2, the number of values. The probabilities already add to one, so there is no divisor.
Why D tempts people
That adds the two squared deviations without weighting them by their probabilities, which counts each outcome as if it happened every time.

This example is worth remembering because you can check it by eye. Every outcome sits exactly 5 away from the mean, so the typical distance from the mean has to be 5. Any formula that gives something else has gone wrong.

It is also the right-hand panel of the same-mean figure in Part 2, scaled up: all the weight at the two ends, none in the middle, and a standard deviation equal to the full distance from centre to end.

If you picked the variance, 25, check the units. The values are in some unit such as dollars, so the variance is in squared dollars; only the square root brings the spread back into the same units as the mean, which is what lets you say typically 5 dollars from the average.

69. Check: what the expected value promises

Check

Finally the interpretation. This is where most marks are lost, and where the Law of Large Numbers is the evidence.

Check your understanding

A raffle ticket has an expected profit of minus 1.50 dollars. Which statement is correct?

  • A. Over many tickets, the buyer loses about 1.50 dollars per ticket on average (correct)
  • B. Every ticket buyer loses exactly 1.50 dollars
  • C. After several losing tickets, a winning ticket becomes more likely
  • D. Nobody can ever make a profit from buying one ticket

Answer: A

Why: The expected value is a long-run average per trial. The Law of Large Numbers says the average profit over many tickets settles near minus 1.50 dollars. Any single ticket either wins or loses its own amount.

Why B tempts people
No single ticket loses exactly 1.50 dollars; each one loses its price or wins a prize. The expected value is an average over many tickets, not the result of each.
Why C tempts people
That is the gambler's fallacy. The tickets are independent, so earlier losses do not change the chance of the next one winning.
Why D tempts people
A negative expected value still allows individual wins; that is what makes people buy tickets. It says the wins are not enough, on average, to cover the losses.

Notice that the correct statement names the evidence it rests on: many tickets, on average. Both words are needed. Without many, the statement is false for a single ticket; without on average, it is false for any particular buyer.

If you chose the gambler's fallacy, revisit the trap in Part 4. The law works by swamping early results with many later ones, never by making the next result compensate.

The last option is tempting because it sounds cautious. But a negative expected value does not forbid a single winning ticket; it only says the winnings, averaged over all tickets, fall short of the price. Somebody usually wins a raffle.

70. Explain the missing divisor

Explain it to yourself

The formulas for μ and σ of a distribution have no division by n, while the Chapter 2 formulas for data do. Explaining why is the best test of whether the lesson has landed.

Discussion prompt

In two or three sentences, explain why the expected value and the standard deviation of a probability distribution have no divisor, while the mean and standard deviation of data do. Use the soccer team as your example.

A strong answer uses the phrase already a share, or already an average. The division did not disappear; it moved inside each probability.

If your answer mentioned only the formula, add the reason and the example. Could someone who has never seen the formula reconstruct it from your explanation? If yes, you have explained it.

A good extension: say what would go wrong if the probabilities did not add to one. The weighted sum would no longer be an average, which is exactly why every worked example started by checking them.

71. Exit ticket: take the deal?

Exit ticket

Homework Exercise 74. You roll a fair die. On a six you win 10 dollars; on a four or five you win 5 dollars; on a one, two or three you pay 6 dollars.

Discussion prompt

Define X, build the expected value table, find μ and σ, and decide in a complete sentence, using numbers, whether you should take the deal if you can play many times.

Write X as a profit first, with the payment as a negative value. The three probabilities come from counting faces: one face, two faces, three faces, out of six.

The final sentence is the part that earns the marks. It names the evidence, the expected value of about one third of a dollar per roll, and the condition that makes the evidence relevant, many plays. Every conclusion in this section needs both.

OpenStax Introductory Statistics 2e, §4.2 Mean or Expected Value and Standard Deviation §4.2 homework, p. 271 — Exercise 74

72. Recap

Recap

A probability distribution has a centre and a spread, just as data do, computed with probabilities in place of relative frequencies.

ideaformularead it as
expected valueμ = Σ x P(x)the long-run average value per trial
varianceσ² = Σ (x − μ)² P(x)the long-run average squared distance from μ
standard deviationσ = √(σ²)the typical distance of one outcome from μ
shortcut checkσ² = Σ x² P(x) − μ²the same variance by a second route
Law of Large Numbersaverage of n trials → μwhy μ describes the long run, and only the long run

\[ \sum P(x) = 1 \quad\Longrightarrow\quad \text{no divisor in } \mu \text{ or } \sigma \]

That one line explains the most common error in the section. The probabilities are shares that already add to one, so the averaging is built into the weights, and dividing again by the number of rows, or by n minus 1, double counts it.

For decisions, define X as the profit. A positive μ is a favourable game, zero is fair and negative is unfavourable, but always over many plays; σ says how wildly a single play can swing. Next, Section 4.3 meets the first named distribution, the binomial, whose μ and σ come from shortcut formulas that this section's table would reproduce.

OpenStax Introductory Statistics 2e, §4.2 Mean or Expected Value and Standard Deviation §4.2, pp. 230-236 — the whole section

Sources

  1. OpenStax Introductory Statistics 2e, §4.2 Mean or Expected Value and Standard Deviation — Illowsky & Dean, OpenStax / Rice University, CC BY 4.0, pp. 229-237

Want this taught 1-on-1? Alexander tutors Statistics — $55/session, free consultation.

Book on Wyzant · Text (657) 465-8108