Back to the on-screen lesson ·
Expectation against worst case, why the average input gives the wrong plan, and what recourse buys.
Paper packet. Every task here also exists on screen, where it is checked automatically; answers written on paper are not assessed by Nydus. When you are back at a device, enter your answers there.
By the end of this lesson you will be able to compute the expected value and the worst case of a decision across scenarios, say when the two criteria disagree and what that disagreement is really asking, and explain with an example why solving a model with the average input gives the best plan for a scenario that never occurs. You will also be able to describe a two-stage model with recourse, say which decisions belong in which stage and why, and choose between a stochastic and a robust formulation on the grounds that actually decide it.
From lesson 6: certainty is one of the three standing assumptions of a linear model, and it is the one that is always false. From lesson 28: sensitivity says which inputs the answer depends on. This lesson is what to do when those inputs are not merely uncertain but genuinely random — and the two honest answers are quite different from each other.
The flaw of averages. Replacing an uncertain parameter with its mean and solving gives the best plan for a scenario that will never occur. If demand is $50$ or $150$ with equal probability, the plan optimised for $100$ is wrong in both real cases — over-provisioned in one, short in the other — and the costs of those two errors are rarely symmetric.
Stochastic programming optimises the expectation over scenarios:
$$\min_x\ c^\top x + \mathbb{E}_\xi\big[Q(x, \xi)\big],$$
where $Q$ is the best second-stage response once $\xi$ is known. That two-stage structure is the point: here-and-now decisions are committed before the uncertainty resolves, wait-and-see decisions after. Because the model knows it will be able to adapt, the first stage can afford to be less cautious.
Robust optimization asks a different question: optimise the worst case over an uncertainty set,
$$\min_x\ \max_{\xi \in U}\ f(x, \xi).$$
No probabilities are needed — only a set the parameters might lie in.
| Stochastic | Robust | |
|---|---|---|
| Needs | a distribution | a set |
| Optimises | the average | the worst case |
| Right when | the decision repeats, and the bad case is survivable | the decision is one-off, or the bad case is not survivable |
| Answer tends to be | efficient on average, occasionally bad | more cautious, never bad |
Which to use is not a technical question. It is a question about whether you get to average. A haulier choosing routes daily can take the expectation; a hospital sizing an intensive care unit cannot, because the scenario where it is too small is not one you average over afterwards.
Another way: picture
Two ways to plan a journey with an uncertain delay. One asks what the average arrival time is and optimises that. The other asks what the latest possible arrival is and optimises that. They choose differently, and which is right depends entirely on whether being late is an inconvenience or a missed flight.
Another way: steps
Facing an uncertain parameter:
A newsvendor buys papers at $2$ and sells at $5$; unsold papers are worthless. Demand is $50$ or $150$, equally likely.
Average demand is $100$. Buy $100$: sell $50$ in the low case for revenue $250$ against cost $200$, profit $50$; sell $100$ in the high case for $500$ against $200$, profit $300$. Expected profit $175$.
Optimise the expectation instead. Buying $50$: profit $150$ in both cases. Buying $150$: profit $50$ in the low case, $450$ in the high, expected $250$.
So buying $150$ beats buying $100$, by $75$. The average-demand plan was not merely suboptimal — it was beaten by a plan nobody would reach by thinking about averages at all, because the asymmetry between the cost of being short and the cost of being long is what decides, and the mean throws that asymmetry away.
Using the mean. The default, and wrong in a way that is invisible in the output.
Too many scenarios. A stochastic program's size multiplies by the scenario count. Fifty well-chosen scenarios usually beat five thousand sampled ones, and scenario reduction is a subject of its own.
An uncertainty set that is too large. Robust optimization over a set containing implausible extremes produces a plan so cautious it is useless. The set is a modelling choice and deserves as much care as a distribution.
Reporting the expectation alone. If a plan has a good average and a catastrophic tail, the average is not the whole report. Say what happens in the bad scenario.
The two sound identical and are different computations with different answers. $f(\mathbb{E}[\xi])$ — solve once with the mean — is not $\mathbb{E}[f(\xi)]$ — solve for each scenario and average. Jensen's inequality says they differ whenever $f$ is not linear in the uncertain parameter, and in a model with recourse $f$ never is, because the second stage adapts differently in each scenario. The practical form of the error is a plan tuned for a scenario that will not happen, and it is invisible in the output: the model reports optimal, the plan looks sensible, and it is the best answer to a question nobody asked.
Decision A returns $100$ or $0$, equally likely: expectation $50$, worst case $0$. Decision B returns $60$ or $40$: expectation $50$, worst case $40$.
Equal on expectation.
On expectation they tie, so that criterion cannot choose. On worst case B wins by a wide margin.
The second criterion separates them.
If the decision is made weekly for years, they really are equivalent and A's variance is noise that averages away. If it is made once and $0$ means insolvency, B is the only defensible choice — and no amount of analysis of the expectation would reveal that, because the expectation is the same.
The criterion is chosen by the situation.
Stage 1, here and now: how much warehouse capacity to lease. Committed before demand is known, because leases take months.
What must be decided early.
Uncertainty resolves: demand turns out to be one of the scenarios.
The world reveals itself.
Stage 2, wait and see: how much to ship from where, given the capacity you have and the demand you now know. A different answer per scenario, and the model optimises stage 1 knowing stage 2 will adapt. Getting the split right — what really has to be decided early — is most of the modelling work, and it is a question about the business rather than about mathematics.
The split is the modelling.
A delivery firm chooses daily routes under uncertain traffic. The decision repeats hundreds of times a year and a bad day is an inconvenience. Expectation: optimise the average, and the variance averages away.
Does the decision repeat? Is the bad case survivable?
A hospital sizes an intensive care unit for the next decade. One decision, and the scenario where it is too small is not one you average over afterwards. Robust: optimise the worst case over a plausible set of demand levels.
A fund allocates across assets monthly. Repeated, so expectation is reasonable — but a scenario can wipe out the fund, and a wiped-out fund does not get to make next month's decision. This is the case that needs both: optimise the expectation subject to a constraint on the bad tail, which is how risk constraints enter portfolio models.
Decision A returns $40$ with probability $25$ percent and $80$ otherwise. What is its expected value?
Answer:
Decision A returns $40$ or $80$. What is its worst case?
Answer:
A has expected value $70$ and worst case $40$; B has $60$ and $60$. Do the two criteria agree?
Demand is $68$ or $204$, equally likely. A model is solved with the average demand instead. What is wrong with that?
Decision A returns $90$ with probability $80$ percent and $10$ otherwise. What is its expected value?
Answer:
A two-stage model decides capacity now and production after demand is known. Why is that better than deciding both now?
Lesson test: one question per skill, one attempt each, no hints. Your answers are checked when you submit.
Decision A returns $80$ or $60$. What is its worst case?
Answer:
You can compute both criteria, explain the flaw of averages, and split a decision into stages. Next: the last lesson, on what a model is and is not.
9. Your turn: which approach for each?, step 3