Week 2: Math/Stats Review II: Probability & Expected Value
This week’s big question: when the outcome is uncertain, how do you combine the chances of things happening, and then compare your options on average? Probability gives you the chances; expected value turns a whole spread of “what might happen” into one comparable number that powers every decision model in Weeks 4–6.
Before the week
Read: Taylor, Introduction to Management Science (13e), Chapter 11, pp. 539–553. Fifteen pages, but two stretches inside them are not yours this week, so the real load is about ten. The chapter PDF is in Canvas Files.
| Pages | Section | This week |
|---|---|---|
| 539–541 | Types of Probability | Read. Where a probability comes from, and how much to trust it |
| 541–544 | Fundamentals of Probability | Read. The addition rule and mutually exclusive events |
| 544–545 | Statistical Independence and Dependence | Read. The multiplication rule, Monday’s core skill |
| 545–547 | The Binomial Distribution | Skip. This course never uses it |
| 547–550 | Dependent Events | Read. Conditional probability and the two-way table |
| 550–551 | Bayesian Analysis | Skim. Wednesday previews it; Week 6 does it properly |
| 551–553 | Expected Value | Read. Wednesday’s core skill, plus variance and spread |
Stop where “The Normal Distribution” begins on p. 553. That section is background for Week 12’s PERT, not for this week.
One thing to know before you open it. Taylor writes the multiplication and addition rules without ever calling them rules, and never uses the word “complement.” Those three names are ours, so the shapes will be familiar from the chapter even though the labels are new on Monday.
Then the warm-up self-check. It is ungraded, retryable, and takes five minutes; it tests the rules straight from the reading, before Monday names them.
Session 1: Mon, Aug 31 · Probability
🧩 Puzzle
The clinic’s two screens. A walk-in clinic runs two independent screening tests on each patient. Test A flags a problem with probability \(0.15\); test B flags one with probability \(0.10\). What’s the chance both tests flag the same patient? And what’s the chance at least one of them does? Those two questions sound similar but use opposite rules. Getting them straight is the whole skill.
Build the skill 1: “and” for independent events (multiply)
In probability, an experiment is a repeatable process with an uncertain result (run a screen, draw a record, roll a die) and an event is the outcome or set of outcomes whose chance you want. Here the experiment is screening one patient; “Test A flags” and “both tests flag” are two different events.
Two events are independent when one happening tells you nothing about the other, exactly the assumption for two separate tests. For independent events the multiplication rule gives the chance they both happen:
\(P(A \cap B) = P(A)\,P(B)\).
So both tests flagging is \(P(A \cap B) = 0.15 \times 0.10 = 0.015\), about a 1.5% chance. Multiplying shrinks the number fast: requiring several independent things at once is hard, which is why “and” probabilities are small.
Multiplying the two rates does something worth seeing directly. Screening one patient has four possible results, not two, and the multiplication rule prices every one of them:
\[P(\text{neither}) = 0.85 \times 0.90 = 0.765, \qquad P(\text{A only}) = 0.15 \times 0.90 = 0.135,\] \[P(\text{B only}) = 0.85 \times 0.10 = 0.085, \qquad P(\text{both}) = 0.15 \times 0.10 = 0.015.\]Those four cover everything that can happen, so they sum to 1. Drop patients through the widget below and watch the running shares settle onto exactly those numbers. Both flag is the rarest by a long way, and how long it takes to appear at all is the point: 1.5% is about one patient in every 67.
Build the skill 2: “or” (addition rule and the complement trick)
“At least one” is an or question, and the four-outcome table already holds the answer. “At least one flags” is three of the four rows, every row with a flag in it:
\[P(\text{at least one}) = 0.135 + 0.085 + 0.015 = 0.235.\]The row it leaves out, “neither flags,” is the one to hold on to; it comes back below.
The rule is a shortcut to that same number, and it is worth seeing why the shortcut subtracts. Take 1,000 patients. Test A flags 150 of them (the 135 only-A patients plus the 15 double flags) and test B flags 100 (the same 15 plus the 85 only-B patients). Add the two counts and you get \(150 + 100 = 250\). Count the patients who actually carry a flag and there are only \(135 + 15 + 85 = 235\). The 15 double-flag patients sit under both counts, so adding the counts includes them twice, and taking them out once is the whole addition rule:
\[P(A \cup B) = P(A) + P(B) - P(A \cap B).\]Here \(P(A \cup B) = 0.15 + 0.10 - 0.015 = 0.235\): everyone A flagged, plus everyone B flagged, minus the overlap that was in both.
The widget below runs the same count on one week at the clinic, so you can do the counting yourself. It holds 400 patients, a week’s screening at the clinic’s rates: test A flags 60 of them, test B flags 40, and 6 are flagged by both. Mark test A’s flags, then test B’s, and say how many squares carry a mark before you press the third button. Adding the two counts gives \(60 + 40 = 100\) marks, but only 94 squares are marked: the 6 patients both tests flagged got marked twice, once in each pass.
Dividing by 400 turns the count straight back into the probability, \(94 / 400 = 0.15 + 0.10 - 0.015 = 0.235\), the same 235 in 1,000 as before, and the 306 unmarked squares are the patients neither test flagged, \(306 / 400 = 0.765\).
There are two routes to “at least one,” and both run on the clinic’s numbers. Route 1 is the addition rule you just used: add the two counts and take the 15 out once, \(0.15 + 0.10 - 0.015 = 0.235\). Route 2 goes through the opposite. “Neither flags” is the fourth row of the table, a plain “and” of two independent events, \(0.85 \times 0.90 = 0.765\), and everything that is not “neither” is at least one: \(1 - 0.765 = 0.235\). That is the complement trick, and when a question says “at least one” it is usually the shorter road.
The overlap term only vanishes when events are mutually exclusive, and that is not the same as independent. Two events are mutually exclusive when they cannot both happen, so \(P(A \cap B) = 0\) and the addition rule collapses to \(P(A \cup B) = P(A) + P(B)\). Take two rows of the clinic’s own table, “only A flags” and “both flag.” One patient lands in exactly one row, so their “or” is a plain sum, \(0.135 + 0.015 = 0.15\), which is \(P(A)\), with no overlap to remove. But those two rows are not independent at all: a patient in the “only A” row cannot be in the “both” row, so learning the first changed the second’s chance to \(0\), which is the opposite of telling you nothing. The two tests themselves are the other case: they are independent, and their events overlap at \(0.015\), not \(0\). Confusing the two ideas is the most common error in the chapter.
Build the skill 3: joint probabilities, marginals, and the two-way table
The four outcomes were already a table. Put test A on the rows and test B on the columns, and the totals on the edges:
| B flags | B does not | Row total | |
|---|---|---|---|
| A flags | \(0.015\) | \(0.135\) | \(P(A) = 0.15\) |
| A does not | \(0.085\) | \(0.765\) | \(0.85\) |
| Col tot | \(P(B) = 0.10\) | \(0.90\) | \(1.00\) |
Every inside cell is its row total times its column total: \(0.15 \times 0.10 = 0.015\). That is what independent looks like in a table, and it is a test you can run on any table.
This is the joint (contingency) table: rows for one event, columns for the other, with each inside cell a joint probability \(P(A \cap B)\) and the row/column totals the marginal probabilities: the plain probability of one event on its own, like \(P(A)\).
Keep the cell test, because the clinic’s next table is data, and nothing promises it passes. Nothing in this one is worth conditioning on: the two tests are independent, so learning that A flagged tells you nothing about B. The clinic’s real question is a different one. Each screen looks for a different problem, so take test A’s: when test A flags a patient, how likely is it that the patient has the problem? The two flag rates cannot answer that. It needs a second fact about every patient, found out after the screen.
So the clinic follows up the week’s 400 patients from the grid. Of those, 32 turn out to have the problem test A screens for. Test A had flagged 24 of those 32, and 36 of the 368 who did not have it. Only test A is in this table, so write the table’s two events in words, problem (the patient has it) and flag (test A flagged them), and keep the letters \(A\) and \(B\) for the general rules. Put the truth on the rows and test A’s verdict on the columns. The follow-up does not arrive as probabilities. It arrives as counts, which is how data always arrives, so start there and divide at the end:
| Flag | No flag | Row total | |
|---|---|---|---|
| Has the problem | 24 | 8 | 32 |
| No problem | 36 | 332 | 368 |
| Col tot | 60 | 340 | 400 |
Test A flags 60 of the 400, the same 0.15 as before. Now divide every cell by the 400 patients. Nothing else changes: the same table, on a 0-to-1 scale.
| Flag | No flag | Row total | |
|---|---|---|---|
| Has the problem | \(0.06\) | \(0.02\) | \(P(\text{problem}) = 0.08\) |
| No problem | \(0.09\) | \(0.83\) | \(0.92\) |
| Col tot | \(P(\text{flag}) = 0.15\) | \(0.85\) | \(1.00\) |
Every inside cell is a joint probability, and every one of them is just a count over 400. \(P(\text{problem} \cap \text{flag}) = 24/400 = 0.06\) means 6% of patients both have the problem and were flagged. Sum a row or column and you get a marginal: \(P(\text{problem}) = 0.06 + 0.02 = 0.08\), which is the 32 patients with the problem over 400. That 0.08 is the base rate, the chance a patient has the problem before any test has said anything.
A conditional probability rescales a joint by a marginal. Written for two generic events, it asks “given the second one happened, how likely is the first?”:
\[P(A \mid B) = \frac{P(A \cap B)}{P(B)}.\]Put the clinic’s words in and it asks, among flagged patients, how likely is the problem:
\[P(\text{problem} \mid \text{flag}) = \frac{P(\text{problem} \cap \text{flag})}{P(\text{flag})} = \frac{0.06}{0.15} = 0.40.\]That is five times the base rate of 0.08. In counts it is \(24/60\), and reading it that way tells you what conditioning actually does: it throws away the 340 patients test A did not flag and re-bases the question on the 60 it did. The denominator changed from 400 to 60, and that is the whole idea. Because \(P(\text{problem} \mid \text{flag}) \ne P(\text{problem})\), the flag and the problem are dependent: knowing test A flagged someone changes the chance they have the problem, which is the reason to run the test at all. The cell test agrees: \(0.15 \times 0.08 = 0.012\), nowhere near the \(0.06\) in the problem-and-flag cell. (When events are independent, the conditional changes nothing: \(P(A \mid B) = P(A)\), and for the two screens \(0.015 / 0.10 = 0.15\), the trivial case.)
Conditional probability is where the information lives. Week 6 uses it to revise a belief when evidence arrives and hangs the revised probabilities on Week 5’s decision trees, and reading it off a table like this one is the single most testable skill in the chapter.
In practice: independence is an assumption, not a fact
- “Independent” is often assumed because it’s convenient, not because it’s true. Two medical tests can share a failure mode (both fooled by the same confounder); two loans can default together in the same recession. Assuming independence then understates the chance of a joint bad outcome.
- Where do the probabilities come from? A probability is one of three kinds: classical (counted from equally likely outcomes, like a die), relative-frequency (the share observed in past data, and the most widely used kind in business), or subjective (an informed expert’s degree of belief). The clinic’s \(0.15\) and \(0.10\) are relative frequencies estimated from past patients, so they carry sampling error. A rule applied to a shaky input gives a shaky answer, and naming the source type tells you how much to trust it.
- Watch the wording. “And,” “or,” “at least one,” and “given that” point to different rules. Mis-reading the question, not the arithmetic, is the usual source of wrong probabilities.
Back to the puzzle
Both screens flag the same patient with probability \(0.15 \times 0.10 = \mathbf{0.015}\) (about 1.5%), and at least one flags with probability \(0.15 + 0.10 - 0.015 = 1 - (0.85)(0.90) = \mathbf{0.235}\) (about 23.5%). The clinic should expect roughly 1 in 4 patients to trip at least one screen, far more than the rare double-flag. And a flag is a reason to look, not a verdict: of the 60 patients test A flagged, 24 had the problem, \(P(\text{problem} \mid \text{flag}) = \mathbf{0.40}\). Multiply for “and,” add (minus the overlap) or use the complement for “or,” and divide by the marginal for “given that.”
In-class group practice (wrap-up)
To close Session 1, work an original probability scenario by hand in your group: a two-way table of visit counts, the three kinds of probability that come off it, an independence check, and one “at least one” question you answer twice.
Write every member’s name on the sheet. You have 15 minutes for the practice, then two minutes to photograph your group’s own attempt before the solutions are shown. One member uploads the photo to Canvas by the end of class; participation credit is for attempting the work.
The instructor uses the final eight minutes to demonstrate the handout’s method, check the main results with units, and explain a common mistake. This demonstration closes the session.
- Download: Week 2 group practice (Word)
Session 2: Wed, Sep 2 · Expected value
🧩 Puzzle
The clinic’s follow-up bill. Same clinic, same two screens: test A flags a patient with probability \(0.15\), test B with \(0.10\), independently. Every flag sends the patient to a follow-up visit that costs the clinic \$40, so a patient both tests flag costs \$80 and a patient neither flags costs nothing. A lab offers to handle every follow-up for a flat \$12 per patient screened, whatever the screens find. Should the clinic take the lab’s offer, or keep paying \$40 a visit? “A patient can cost \$80” is true but beside the point. You need the average.
Build the skill 1: expected value sums payoff × probability
One patient’s follow-up bill is a random variable, a number attached to each thing that can happen, and its expected value weights each outcome by its probability and adds them up:
\(E[X] = \sum_i x_i\, p_i\).
Each piece does one job. \(x_i\) is what each outcome is worth, here what it costs the clinic in dollars: \$0, \$40, \$80. \(p_i\) is how likely it is, and the probabilities have to sum to 1: here Monday’s four outcomes, with the two one-flag rows merged, \(0.135 + 0.085 = 0.22\). The total is the long-run average outcome, not the most likely one (here that’s \$0), and not the worst case (\$80). Compute it by multiplying each bill by its probability and adding the products. One row per possible bill:
| Flags on the patient | Cost \(x_i\) | Chance \(p_i\) | \(x_i p_i\) |
|---|---|---|---|
| Neither | \$0 | \(0.765\) | \$0.00 |
| Exactly one | \$40 | \(0.22\) | \$8.80 |
| Both | \$80 | \(0.015\) | \$1.20 |
| Every patient | 1.000 | \$10.00 |
So an average patient costs \$10 in follow-ups, a bill no single patient ever runs up: the whole spread of outcomes, in one number. Expected value is the single most important number in decision analysis, because it collapses a distribution of “what might happen” into one comparable figure.
The same sum prices a count. Whether both tests flag a patient is a 0-or-1 outcome whose expected value is just its probability, and a week’s 400 patients add up to \(400 \times 0.015 = 6\) expected double flags. An expected count is the number of tries times the chance per try (it is where Monday’s grid got its 60, 40 and 6), and the take-home turns on exactly that move. It also checks the \$10. Every mark on the grid is a \$40 visit, so the week’s 100 marks cost \$4,000, and \(\$4{,}000 / 400 = \$10\) a patient. The 6 patients marked twice, whom the addition rule counted once, are two visits each on the bill.
Build the skill 2: decisions compare expected values (net it out)
Pricing a patient at \$10 does not say whether to take the lab’s offer: the lab charges \$12 a patient, and nothing has been compared with anything yet. Taking the offer is a purchase. The clinic pays \$12 for every patient screened, and in return the per-visit bill, which averages \$10, is the lab’s problem. The picture below puts the two sides of that purchase on one scale. The top bar is the bill the offer takes over, built up one coloured piece at a time, each piece a bill times its probability. The bottom bar is what the offer costs. Step through it, and the thing to watch for at the end is the gap between the two bar ends.
That gap, as a number, is the net expected value of taking the offer. A deal you have to pay for is judged net of its price:
\[E[\text{net}] = E[\text{bill taken over}] - \text{fee} = 10 - 12 = -\$2.\]A negative expected value means that, over many patients, the offer costs the clinic about \$2 a patient more than paying per visit. Comparing options is just comparing their expected values: “take the offer” scores \(-\$2\), “keep paying per visit” scores \(\$0\), so keep paying per visit wins. The comparison, not the number, is the skill, and Weeks 4–6 are built on it.
Two pieces of that top bar are worth a second look. The \$0 outcome has no width at all, just a tick mark, even though it is what happens to 76.5% of patients: an outcome worth nothing contributes nothing, however likely it is. And the \$80 double flag, the worst bill a patient can run up, adds only \$1.20: it costs twice what one flag does at about a fifteenth of the chance, so its piece is less than a seventh as wide as the one-flag piece. That is what “a patient can cost \$80” is worth once you price it properly. The whole top bar comes to \$10, the bottom bar is \$12, and the offer is a bad deal by precisely the distance between their two ends.
Turn the comparison round and it prices the offer. At a fee of \$10 the two bars would end at the same place and “take the offer” would score exactly \(\$0\), so \$10 a patient is the most the offer is worth: at any fee above it, keep paying per visit; at any fee below it, sign. The take-home asks the same question of a service contract, the price at which a manager would not care either way.
Build the skill 3: expected value has a partner: variance (the spread)
Against the lab’s \$12, paying per visit saves \$2 a patient on average, and an expected value settled the decision. Nothing so far says how far one patient’s bill can land from \$10. Expected value tells you the center of a distribution but nothing about how spread out it is, and spread is exactly what “risk” means. Pair every expected value with the variance, the probability-weighted average of the squared distance from the mean:
\(\operatorname{Var}(X) = \sum_i (x_i - E[X])^2\, p_i, \qquad \text{SD}(X) = \sqrt{\operatorname{Var}(X)}\).
Each piece does one job. \((x_i - E[X])^2\) is how far off an outcome is, squared so that a miss either way counts: for a patient with no flag that is \(0 - 10\), squared. The \(p_i\) weights it by its chance, exactly as the mean was weighted: here by \(0.765\). And the square root puts you back in the units of \(x\), dollars here: that is the standard deviation.
Run it on the same three bills, measured from the \$10 centre. A patient with no flag lands \$10 short of the centre; a double flag lands \$70 over it:
| \(x\) | \(p\) | \(x - E[x]\) | \((x - E[x])^2\) | \((x - E[x])^2\, p\) |
|---|---|---|---|---|
| \$0 | \(0.765\) | \(-10\) | \(100\) | \(76.5\) |
| \$40 | \(0.22\) | \(30\) | \(900\) | \(198\) |
| \$80 | \(0.015\) | \(70\) | \(4{,}900\) | \(73.5\) |
Summing the last column gives \(\operatorname{Var}(x) = 76.5 + 198 + 73.5 = 348\) and \(\text{SD}(x) = \sqrt{348} \approx \$18.65\). The double flag happens to 1.5% of patients and still supplies a fifth of that sum, because squaring weights a big miss heavily.
What \$18.65 does and does not say. A patient costs \$10 on average and the standard deviation is \$18.65, almost twice the centre. The units are dollars, which is what makes it readable; the \(348\) it came from is in squared dollars and is not. It is not a boundary, and it is not what most patients do: 765 patients in 1,000 cost nothing and miss the centre by exactly \$10, and squaring lets the 235 flagged ones set most of the number. And \$10 less \$18.65 is below zero, which no bill ever is, so the misses are not even symmetric.
Put a price on a count and both scale. If a random quantity is a count of events and each event costs a fixed amount, the mean cost is that amount times the mean count and the SD scales the same way, while the variance scales by the square of that price, which is the same fact as variance reading in squared units. The clinic’s bill is exactly that: a count of visits (0, 1 or 2) times \$40. The count averages \(0.15 + 0.10 = 0.25\) visits with a variance of \(0.2175\), so the bill averages \(40 \times 0.25 = \$10\), its SD is \(40\sqrt{0.2175} \approx \$18.65\), and its variance is \(40^2 \times 0.2175 = 1{,}600 \times 0.2175 = 348\). That is the bridge from “how many failures do we expect this month” to “what will they cost,” and the take-home walks across it.
What the number is for is comparison. The lab’s \$12 has no spread at all: it is the same for every patient. Paying per visit is cheaper on average and swings by \$18.65 a patient, and a manager who hates surprises will not treat those as equal. Whether \$2 a patient is a fair price for being rid of the swing depends on how many patients share it.
In practice: expected value ignores risk and “the long run” may never arrive
- EV says nothing about spread (risk). The variance and standard deviation you just computed (\$18.65 on a \$10 centre) are how we measure that spread, and most people, and most businesses, care about it, not just the mean. A small certain cost and a rare-but-huge cost can carry the same EV yet feel nothing alike. Week 3 strips the probabilities away and makes you choose by a criterion that names your tolerance for the downside; Week 4 brings them back, and Week 6 puts a curve on that tolerance, called utility.
- One patient is not the long run, but a week can be. One patient’s bill is \$0, \$40 or \$80, never \$10. The clinic pays for 400 patients a week, though, and when patients are independent their swings mostly cancel: the week’s bill averages \$4,000, Monday’s 100 marks at \$40, with a standard deviation of only about \$373, not 400 times \$18.65. (Independent patients add their variances, so the SD grows with the square root of their number, \(18.65\sqrt{400} = 18.65 \times 20 \approx 373\); you will not need that rule this week.) The lab would charge a certain \$4,800 for the same week, more than two of those standard deviations above the expected bill, so here the long run arrives and the \$800 a week is real. It stops arriving when patients stop being independent. An outbreak that sends flags up for everyone at once moves the whole week together, and the cancelling never happens. Independence was Monday’s warning, and it is what paying per visit is betting on.
- Garbage in, garbage out. The whole calculation rests on the 0.15 and 0.10 being right, and Monday called them relative frequencies with sampling error. The \$2 margin is thin: if test A’s true rate were 0.20, the bill would average \(40 \times (0.20 + 0.10) = \$12\) and the lab’s offer would tie.
Back to the puzzle
One patient’s follow-ups cost \(0(0.765) + 40(0.22) + 80(0.015) = \mathbf{\$10}\) on average. The lab charges \$12, so taking its offer has an expected net of \(10 - 12 = \mathbf{-\$2}\) a patient, a losing deal on average: keep paying \$40 a visit, and treat \$10 a patient as the most the offer is worth. That loss is the gap you watched open between the two bars in the widget: the bill bar stops at \$10 and the fee bar runs on to \$12. The spread does not overturn it here. One patient’s bill has a standard deviation of \$18.65, but a week of 400 independent patients totals about \$4,000, give or take \$373, against a certain \$4,800. Revisit the offer if an outbreak makes the flags move together, or if test A’s rate creeps toward 0.20. (The lab would also schedule the visits, and the clinic’s staff time sits on neither bar. If that time is worth more than \$2 a patient, the offer wins on a number this model never priced. Naming what a model leaves out is part of using it, not an apology for it.)
Where this is heading: flipping a conditional with Bayes
Monday’s table answered “given a flag, how likely is the problem?” because it held all 400 patients, the truth about each one included. A test’s maker publishes something else: the test’s track record, the conditional the other way round. Of the 32 patients who had the problem, test A flagged 24, so \(P(\text{flag} \mid \text{problem}) = 24/32 = 0.75\). That is the same 24 patients over a different denominator, and it answers a different question: 0.75 is how often the test catches the problem, while \(P(\text{problem} \mid \text{flag}) = 24/60 = 0.40\) is how often a flag is right. The multiplication rule for dependent events, \(P(A \cap B) = P(A)\,P(B \mid A)\), rebuilds the joint from the base rate and the track record, \(P(\text{problem} \cap \text{flag}) = 0.08 \times 0.75 = 0.06\), the same cell the table showed. Week 6 builds the rest of such a table from a base rate and a track record alone, then divides, which turns the 0.75 a maker publishes into the 0.40 a flagged patient needs. That update from a prior (0.08, before any test) to a posterior (0.40, after a flag) using evidence is Bayes’ rule, and it is the named payoff of conditional probability we cash in during Week 6 (decision analysis with sample information).
After-class check
Questions spanning the addition and multiplication rules, independence vs. mutual exclusivity, joint and conditional probability from a two-way table, and expected value with its spread (variance). Retry freely; nothing is submitted.
Weekly take-home (graded: submit on Canvas)
Everything for the take-home lives in one starter workbook, and nothing you must compute is pre-filled. The model sheet opens with a case brief: a term of shuttle trip logs, dispatch’s own record of call-outs by month, and a service-contract quote priced by the year for a decision taken by the month. In the Your model block you name the random quantity and its time period and say what has to be converted before the two options can be compared at all; then you turn the log into a two-way table and test whether failure risk really is independent of route. The failure risk needs the same treatment as the price: the log counts trips, not months. You also measure the spread, because expected value alone points one way here and risk points the other.
Then the workbook turns the question round. Rather than asking what the quoted contract costs, it asks what the cover is actually worth: the monthly price at which the manager would not care either way. That ceiling is the number she can negotiate with, and it is yours to derive, not to look up. One short response plus the required AI-use disclosure go on the Free responses sheet. Upload the completed .xlsx on Canvas. That one file is your entire submission.