Week 16: Regression & Final Review

This week’s big question: when does a fitted relationship support a useful prediction, and how do you choose the right model for a new problem?

Monday completes the new material with regression. Wednesday is cumulative review and closes with the fifteenth and final group practice, worth 1 participation point. There is no Week 16 take-home.

The final is in the Dec 14–18 examination period. It covers material taught through Monday Dec 7, including regression: 40 questions in 75 minutes, worth 20 points. Our last class is Wed Dec 9. The registrar sets the exact exam slot, which will be posted on Canvas. See Exams.

Before the week

Read: Taylor, Introduction to Management Science (13e), Chapter 15, pp. 750–759, on linear regression, correlation and interpretation. The PDF is in Canvas. Revisit Week 15’s fitted time trend; this week changes what the horizontal axis represents.

Use the cumulative warm-up to identify topics for Wednesday. Bring one specific question and your attempted solution.

Session 1: Mon, Dec 7 · Regression and prediction (TBD)

🧩 Puzzle

A county food pantry’s household-delivery program. Over the past eight quarters, enrolled households climbed 120, 128, 135, 141, 150, 158, 163, 172. A straight time trend like Week 15’s (\(y = 112.82 + 7.35t\), with \(R^2 = 0.998\)) knows only the calendar: it forecasts 179 (178.93) because household enrollment has climbed about 7 households a quarter. The coordinator has a hunch about why it climbed. When work is scarce, people seek help with food, and the county’s unemployment rate has crept up for two years. The county has just published this quarter’s rate: 5.9%. What household enrollment does that predict for next quarter, and how much should the coordinator trust the number?

A trend model uses only one predictor: the clock. Regression is its explanatory cousin: instead of “forecast over time,” it relates the forecast to a factor that may actually drive it. The leap is from predicting household enrollment because time passes to predicting it from something you can measure and reason about, the county’s unemployment rate. Same least-squares line, a predictor with a story behind it.

Build the skill 1: regression is the same line, with any predictor

A linear regression fits \(y = a + b\,x\) just like the trend line, but the independent variable \(x\) can be any predictor, not just time, and the dependent variable \(y\) is the outcome being predicted. Here \(y\) is the program’s household enrollment and \(x\) is the county’s unemployment rate, in percent, for the quarter before, a number the coordinator has in hand before the next quarter’s delivery list is set. The slope \(b\) then reads as “households per point of unemployment,” and you predict \(y\) by plugging in an \(x\). The mechanics (least squares, \(r\), \(R^2\)) are identical; only the meaning of \(x\) changes. Week 15’s trend line is a regression, on the predictor “time.”

Here are the pantry’s eight quarters with the rate beside each one, totalled the way Week 15’s trend table was:

Quarter 1 2 3 4 5 6 7 8 Sum
Unemployment the quarter before, \(x\) (%) 4.0 4.5 4.4 4.7 4.6 5.1 5.3 5.8 38.4
Enrollment \(y\) 120 128 135 141 150 158 163 172 1,167
\(x \times y\) 480.0 576.0 594.0 662.7 690.0 805.8 863.9 997.6 5,670.0
\(x^2\) 16.00 20.25 19.36 22.09 21.16 26.01 28.09 33.64 186.60

The means are \(\bar x = 38.4/8 = 4.8\) and \(\bar y = 1{,}167/8 = 145.875\). The same two least-squares formulas as in Week 15, with \(x\) where \(t\) was:

\[\begin{aligned} b &= \frac{5{,}670.0 - 8(4.8)(145.875)}{186.60 - 8(4.8)^2} \\ &= \frac{5{,}670.0 - 5{,}601.6}{186.60 - 184.32} = \frac{68.4}{2.28} = 30 \end{aligned}\] \[a = 145.875 - 30(4.8) = 1.875\]

So the line is \(y = 1.875 + 30x\). A quick check: at the average rate, \(1.875 + 30(4.8) = 145.875\), the average household enrollment, because a least-squares line always passes through the point of the two means.

The fit never uses the quarter numbers. It pairs each household enrollment with the rate that came before it, so the natural picture is a cloud of \((x, y)\) points, a scatter plot, with the rate along the bottom and no time axis anywhere. Press Fit least-squares line to drop the best line through the cloud:

The widget prints the same line, with the intercept rounded to 1.88, and adds \(r = 0.951\) and \(R^2 = 0.904\).

Build the skill 2: interpret the slope and R², then mind causation

Two habits separate a defensible regression from a number that just looks scientific.

First, always interpret the coefficients in plain words (it’s worth points, and it’s the honest thing to do). For the program’s line, \(y = 1.875 + 30x\) with \(R^2 = 0.904\):

  • Slope: “each extra percentage point of county unemployment goes with about 30 more households enrolled the following quarter.”
  • \(R^2\): “the unemployment rate explains about 90% of the variation in household enrollment; the other 10% is noise or other factors.”
  • Intercept: 1.875 is the household enrollment the line gives at 0% unemployment, a rate no county has and far below the 4.0% to 5.8% in the data. Like Week 15’s intercept, it anchors the line and describes no real quarter.

If you can’t write those sentences, you don’t yet understand your own model. Then set the fit beside a pure time trend on the same series. On the same eight household enrollments the calendar alone (\(y = 112.82 + 7.35t\)) explained 99.8%, and the rate explains 90.4%. The comparison is fair, because both lines were fitted to the same eight quarters, and it says the rate tells you less about these quarters than the calendar did.

Second, regression finds a relationship, not a cause. The coordinator’s story is plausible: people retrain when work is scarce. These eight quarters cannot prove it. The rate and the household enrollment both climbed almost every quarter, and any two numbers that climb together fit each other well, whatever makes each one climb. Enrollment could be rising because word of the program spread while the rate rose because a plant cut shifts, and the scatter plot would look exactly the same. Time alone may be doing the work. The two stories part company only when the rate turns. If the county recovered to 4.0%, where its rate stood two years ago, the line would predict \(1.875 + 30(4.0) = 121.875\), about 122 households, back where the program started, while the calendar would still say 179 and climbing. Eight quarters in which both numbers rose cannot tell you which to believe. This is the correlation ≠ causation trap, and it bites hardest exactly when the fit is good. Use regression to forecast; be careful before you claim “X causes Y.”

Beyond the book. Taylor 13e introduces regression as a forecasting method, defines \(r\) and \(R^2\), and limits a trend line to a short horizon. The correlation-vs-causation caution above, the residual-pattern diagnostics, and the out-of-range warning below are standard statistical practice we add on top: sound habits that go a little past the chapter’s own treatment.

In practice: the classic regression traps

  • Correlation ≠ causation. A predictive relationship can vanish if you act on it as if it were causal. A high \(R^2\) measures how tightly two things move together, never why.
  • A negative slope is still a real relationship. Regress the program’s household enrollment on its delivery fee instead of the unemployment rate, and the slope would likely come out negative while the \(R^2\) could still be high. Don’t read “negative” as “weak”. Sign and strength are different facts (\(r\) carries the sign, \(R^2\) only the strength).
  • Out-of-range predictions. Predicting household enrollment at 9% unemployment from quarters whose rate never passed 5.8% is extrapolation. The relationship may not hold there, exactly as a trend line can’t be trusted far past its data. The puzzle’s 5.9% is a tenth of a point past the data, a short step like Week 15’s one-quarter-ahead forecast; 9% is not.
  • One predictor is rarely the whole story. Enrollment depends on more than the rate: the delivery fee, how many delivery rounds run, what local employers are hiring for. A single-variable regression is a useful first cut, not the final word, and if the residuals still show a pattern, a second predictor is probably missing. Taylor’s multiple regression, at the end of this week’s reading, puts two or more predictors in one equation; fitted on the quarter number and the rate together, it is where you would start asking whether the rate tells the coordinator anything the calendar does not.

Back to the puzzle

The line through the eight quarters is \(y = 1.875 + 30x\), and this quarter’s published rate of 5.9% gives

\[y = 1.875 + 30(5.9) = 178.875,\]

about 179 households next quarter. Each point of unemployment has gone with about 30 more households, and the rate explains about 90% of the variation in these eight observed household enrollments. Treat the next-quarter prediction as provisional: 5.9% is a tenth of a point past the highest rate on record, and the pantry’s calendar trend line lands in the same place (178.93). As proof that unemployment drives household enrollment, it is worth very little. The two lines agree because the rate has climbed in step with the calendar, and the quarter the rate turns down is the quarter they will disagree: about 122 against 179 and climbing, if it fell all the way back to 4.0%. So the coordinator plans for about 179 households and treats the rate line as a forecast, never as evidence that a recovering county would shrink the program.

Close the lesson: say the whole course in five beats

Wednesday is our final review, and the final reaches all material taught through today. Pair up and run one of this term’s models through the five beats out loud: problem, method, result, recommendation, and a caveat tested with a what-if. Pick any week you found hard; saying it is a fast way to find out whether you actually have it.

Then hand your partner the test: can they restate your recommendation and name your biggest caveat, unprompted? If not, the fix is a simpler story, never another slide.

Session 2: Wed, Dec 9 · Cumulative review and course close (TBD)

Bring your questions from the self-checks and workbooks. We revisit method selection, work the requested calculations, and explain the final’s format. Complete the course evaluation and review exam arrangements before the group practice. Teaching, questions and arrangements use the opening 50 minutes; the practice and worked demonstration close the course.

In-class group practice (wrap-up)

The last of the fifteen group practices, and the only one that is not about a single chapter. Your group gets four short situations with no chapter numbers attached. For each one: sharpen the question, name the method whose structure matches it, and say what evidence would make the recommendation credible. It earns 1 participation point, exactly like every other week.

This is deliberately the skill the rest of the course cannot drill, because every other week arrives already labelled. It is also good final revision: naming which method a situation calls for is most of what the exam’s interpretation questions ask.

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.

Recap reference: choose, solve, and check

Self-study reference for Wednesday’s review. Use it to identify the questions you want to bring to class.

🧩 Puzzle

The pantry director’s desk. The same food pantry also runs outreach deliveries. Its director asks: “Our delivery program costs too much, demand swings every month, and some sites keep running short. What should we do?” No table, no numbers, no chapter number. Which question do you sharpen first, which method answers it, and what evidence would make your recommendation credible?

The director has combined three questions: how much demand to expect, how to serve it, and whether the result is affordable. Separate them before calculating. A forecast supplies a demand estimate; a routing model uses that estimate to choose shipments; a sensitivity check asks whether that choice survives a plausible change. Each model’s output becomes the next decision’s input.

Build the skill 1: run the five-step cycle you have used all term

Every topic in this course has been the same cycle wearing different clothes. Here it is on the director’s program:

  1. Observe the system. Name the symptom, the decision-maker, and who else is affected: rising delivery costs and sites that run short, the director who has to choose, and the partner agencies whose clients wait on the deliveries.
  2. Define the problem. Turn “costs are too high” into something you could actually answer: “Which routing plan meets every site’s demand at minimum monthly cost?”
  3. Construct the model. Name the choices, the objective, the limits, and where the input data comes from, such as last year’s delivery logs and the van’s lease.
  4. Solve and check it. Compute it, verify it, and move at least one plausible input, such as the cost of fuel, to see what happens.
  5. Recommend and implement. Say what to do, then say what would change your mind.

Steps 2 and 5 are the ones students skip, and they are exactly the two that keep correct arithmetic from answering the wrong question.

Build the skill 2: listen for the structure, not the vocabulary

Signal in the problem Method to revisit Course week
Find the volume where revenue first covers fixed and variable cost Break-even analysis W1
Weigh one uncertain quantity, or combine probabilities from raw data Probability rules and expected value W2
Choose among alternatives when outcomes or information are uncertain Decision analysis, trees, EVPI/EVSI W3–W6
Allocate limited resources to maximize or minimize one objective Linear programming, and its sensitivity report W7–W9
Ship from sources to destinations or assign people to tasks Transportation or assignment W10
Balance competing targets in a feasible plan Goal Programming W12
Compare alternatives across several criteria Multi-criteria analysis W11
Schedule activities that depend on one another and identify delay risk CPM/PERT W12–W13
Predict a future value from past values or a related predictor Forecasting or regression W13, W15–W16

A signal gives you a candidate, not an answer. Before you commit, check that the data and the assumptions actually fit, starting with whether the quantities you need are known (deterministic) or uncertain (probabilistic). An LP treats its inputs as fixed; a payoff table can compare choices across uncertain states. The director’s van lease is known to the dollar; next year’s demand is not, which is why the next skill is a decision tree rather than an LP.

Build the skill 3: fold back a decision one more time

The director has to commit to a capacity plan for next year before knowing whether demand will run high (\(0.40\)) or low (\(0.60\)). The program can keep its van on weekday runs as it is now, add weekend runs (overtime for the driver, committed for the whole year), or keep a courier for overflow on call (a monthly retainer, then a premium on each delivery the van cannot fit). Payoffs are the program’s net benefit over the year in \$ thousands, so 35 means \$35,000.

Keep the alternatives and their possible outcomes visible before calculating an average:

Annual net benefit (dollars in thousands) High demand, probability 0.40 Low demand, probability 0.60
Weekday runs 35 20
Add weekend runs 55 −5
Courier for overflow 40 15

1. Draw the decision first. The square has one branch for each commitment. New branches are red.

A decision square with the three annual delivery plans as branches.

2. Add what happens after each choice. Each chance circle gets High and Low demand branches, their probabilities, and that plan’s payoffs. The decision branches stay in place.

Each plan now ends in a chance circle with high and low demand probabilities and payoffs in red.

Now fold the completed tree. At each circle, weight the payoffs by their probabilities and add. At the square, keep the largest of those averages:

  • Weekday runs: \(0.40(35) + 0.60(20) = 14 + 12 = 26\)
  • Add weekend runs: \(0.40(55) + 0.60(-5) = 22 - 3 = 19\)
  • Courier for overflow: \(0.40(40) + 0.60(15) = 16 + 9 = 25\)

Weekday runs win on expected value at \$26 thousand, \$1,000 ahead of the courier. But finishing there is the mistake. Where did the \(0.40\) come from? At \(0.50\) the courier ties weekday runs, at \$27.5 thousand each. And does net benefit count the sites that go short in a high-demand year? Under weekday runs those are the very sites the director came in about. The arithmetic took ten seconds. Those two questions are the job.

Press Fold back on the tree below and watch the three circles take 26, 19 and 25 before the square keeps weekday runs. To rehearse the fold yourself, build the same tree in the tree builder, fold it back on paper, and let its Check tab mark your values.

Build the skill 4: check whether deliveries cover the lease

The director’s first complaint was cost, so find how many deliveries cover the van’s cost. The program leases its delivery van for \$1,800 a month, spends \$7 per delivery in fuel and time, and the partner agencies reimburse \$25 per delivery. The contribution margin is \(25 - 7 = 18\) dollars per delivery, so

\[q^* = \frac{1{,}800}{25 - 7} = 100 \text{ deliveries a month}.\]

One hundred deliveries a month. That break-even volume is a threshold to compare against the requests the partner agencies actually send, not a promise that they will send them. In a slow month of 80 deliveries the van falls \(1{,}800 - 80(18) = \$360\) short of its lease. And if fuel adds \$2 to every delivery, the margin drops to \$16 and break-even rises to \(1{,}800 / 16 = 112.5\), so 113 deliveries a month. Move the sliders and watch the threshold shift: the price slider is the \$25 reimbursement, and setting the variable cost to 9 is that fuel rise.

Use Check a value to compare the original \$7 variable cost with the \$9 fuel-cost case. Predict the direction of the threshold change. Each check restores the original lease and reimbursement.

Try the selection before looking at the method name

For each question, identify what is chosen, what is unknown, and which check could overturn the answer. These are parts of the director’s same delivery program.

Question Structure to recognize Method and first check
How many deliveries will sites request next month? Unknown future demand, with monthly history Forecast; compare past forecast errors on the same months
Which depot should supply each site’s stated demand? Shipment quantities, source limits, destination needs Transportation; check supply and demand in the same units
Which annual capacity plan should we commit to before demand is known? Discrete choices followed by uncertain outcomes Decision tree; check probabilities and whether all relevant consequences enter the payoffs
How many deliveries cover the monthly lease? Fixed cost and margin per delivery Break-even; check that reimbursement exceeds variable cost

The word “delivery” fits all four rows. The structure of the question is what selects the method.

In practice: your method choice is a claim you have to defend

  • Start with the decision, not the software. “I used Excel” names no method and explains nothing. “I used a transportation model because every site’s demand had to be met from a fixed set of depots” does both.
  • Separate predicting from choosing. A forecast estimates what will happen; an optimization or decision model recommends what to do about it. Confusing the two is how you end up optimizing a guess.
  • Find the assumption the answer rests on. Probabilities, linear relationships, stable trends and task durations are all estimates. Move the one that matters most and see whether your recommendation survives; in this recap, those are the 0.40 and the \$7 a delivery.
  • Two models beat one when the question has two halves. Forecast the demand first, then route supplies for it. That is not overkill; that is the director’s question answered properly.

Back to the puzzle

The director asked three questions in one breath, and each points somewhere different: “what will demand be?” is forecasting, “how should we route deliveries?” is transportation, and “does this still hold if fuel goes up?” is a sensitivity check. So pick one decision, name the method whose structure matches it, solve it, and report two things: the action, and the conditions under which the action stops being right. This recap has done that twice for the program. The van pays its own lease past 100 deliveries a month, or 113 if fuel adds \$2 a delivery. Weekday runs are next year’s best plan on expected net benefit, but only while high demand stays less likely than 0.50, and only if nobody counts the sites that go short in a busy year.

Cumulative self-check

Check regression as well as the term’s methods and interpretations. All questions are eligible for the final. Retry freely, and use anything you miss to plan your revision. No workbook or other file is due this week.