← Optimization theory
PART 4 · 15 Optimization theory · 09

Robust and Stochastic Optimization

Robust and Stochastic Optimization · Decisions that hold up under uncertainty

UncertaintyWorst caseMinimax regretExpected profitChance constraintsScenariosTwo-stage decisions

Set outputDemand 8020%Demand 10050%Demand 12030%Know the odds?Optimize expected payoffKnow only the range?Hold up in the worst case

So far we have assumed that values such as costs, demand, and production capacity are known. In reality, though, future values are hard to know exactly. Producing more next month can meet demand and raise sales, but if actual demand is low, inventory and costs pile up. Conversely, if you produce too little, you cannot supply when demand surges. Under uncertainty like this, solving for the optimum with a single expected value is not enough.

SECTION 01

A real-world optimum has to hold up under uncertainty

Robust optimization

Sets the range an uncertain value can take, and decides based on how reliably a solution works across the situations in that range.

Stochastic optimization

Optimizes expected performance or manages risk by taking into account the probability of each situation.

SECTION 02

What goes wrong if we ignore uncertainty?

Suppose one unit sells for 100 and costs 60 to produce, and each unsold unit costs 10 to dispose of. If demand is expected to be 100 units, producing 100 seems reasonable, but actual demand can differ.

Actual demandProduce 80Produce 100Produce 120
80 unitsDemand met20 left over40 left over
100 units20 shortDemand met20 left over
120 units40 short20 shortDemand met

No production level guarantees the best result in every situation. So we need to weigh the following questions together.

① How bad can it get?

If things turn out differently than expected, how much worse is the result?

② What must be protected?

Which conditions must be met even in unfavorable situations?

③ How do we use probabilities?

If we know how likely each situation is, how should that be reflected in the decision?

SECTION 03

Comparing by profit: results by scenario

Robust and stochastic optimization start from the same payoff table. The profit for production level x and demand D is:

Profit(x, D) = 100 · min(x, D) − 60x − 10 · max(x − D, 0)

You earn revenue on what is sold, pay costs on what is produced, and pay disposal costs on leftover inventory. Missing demand effectively means losing the sales margin (40) on each missed unit. If demand is 80, 100, or 120 units with probabilities 0.2, 0.5, and 0.3, expected demand is 80(0.2) + 100(0.5) + 120(0.3) = 102 units.

OutputDemand 80 (0.2)Demand 100 (0.5)Demand 120 (0.3)Expected profitWorst-case profit
803,2003,2003,2003,2003,200
1001,8004,0004,0003,5601,800
1204002,6004,8002,820400

For example, if you produce 100 and demand is 80, profit is revenue of 8,000 minus production cost of 6,000 and the disposal cost of 200 for the 20 leftover units, or 1,800. If you leave out sales revenue and compare costs only, the shortage loss (40 per unit) is smaller than the production cost (60 per unit), which leads to the wrong conclusion that producing nothing at all looks cheapest (expected cost 4,080). When comparing, revenue, costs, and opportunity losses must be defined on one consistent basis.

01,0002,0003,0004,0005,000708090100110120130Demand 80 (20%)Demand 100 (50%)Demand 120 (30%)Max expected profit: x = 100 (3,560)Best worst case: x = 80 (3,200)Expected profitWorst-case profitProfitOutput x · dotted = profit per scenario, bold = probability-weighted mean, red = minimum of the three scenarios
Figure 1. Profit by production level
SECTION 04

Robust optimization

Suppose we know demand is between 80 and 120 units but do not know the probability of each level. Robust optimization treats the uncertain value ξ as varying within an uncertainty set 𝒰, and looks for the decision that performs well even in the worst situation in that set.

minx maxξ ∈ 𝒰 f(x, ξ)   (for costs)  ·  for profits, maxx minξ ∈ 𝒰

The inner part finds the most unfavorable situation within the uncertainty range, and the outer part picks the best decision even in that worst situation. Comparing the worst-case profits in the table above selects 80 units (3,200), because if you produce 80, all 80 sell whatever demand turns out to be. Even if, as with the red line in Figure 1, demand can be anywhere between 80 and 120, the worst case is demand of 80, so the conclusion is the same.

Robust optimization does not always look only at the worst outcome. Minimax regret uses as its criterion how much you would regret a decision compared with the best decision in each situation.

OutputRegret if demand 80Regret if demand 100Regret if demand 120Maximum regret
8008001,6001,600
1001,40008001,400
1202,8001,40002,800

Under this criterion, 100 units (1,400), with the smallest maximum regret, is selected. So the robust solution depends on how you set the uncertainty range and the criterion, and including even very unlikely situations in the range leads to decisions that are more conservative than necessary. Robust optimization is useful when the probability distribution is hard to know, when safety and supply stability matter, or when stepping outside a certain range causes large losses (power supply, inventory management, production planning, supply chain design).

SECTION 05

Stochastic optimization

E[Profit(x, D)] = Σs ps · Profit(x, Ds)   (ps: probability of scenario s)

If you know the probabilities, you can maximize expected profit: the results for each scenario multiplied by their probabilities and summed. In the table, expected profit is 3,200 for 80 units, 3,560 for 100, and 2,820 for 120, so 100 units is highest. Even varying output one unit at a time, as in the bold line in Figure 1, the maximum is at 100. Expected demand being 102 does not make producing 102 the best choice.

This result can also be explained by the critical ratio of the newsvendor problem. The loss from making one unit too few is the sales margin of 40, and the loss from making one unit too many is the production and disposal cost of 70. The optimal output is the smallest level at which the probability that demand is at most that level is 40 / (40 + 70) = 0.36 or more; since P(D ≤ 80) = 0.2 and P(D ≤ 100) = 0.7, it is 100 units. If the cost structure or probabilities change, the optimal output changes too.

SECTION 06

How robust and stochastic optimization differ

AspectRobust optimizationStochastic optimization
How uncertainty is expressedRange of possible values, uncertainty setScenarios and probabilities, probability distribution
Main concernDo performance and constraints hold even in unfavorable situations?Is expected performance, accounting for probabilities, good?
Typical criteriaWorst case, maximum regret, robust constraintsExpected cost · expected profit, chance constraints
Information neededThe range and structure of the uncertaintyProbabilities, or data to estimate them
Choice in the example80 units (worst-case profit 3,200) · 100 units by regret100 units (expected profit 3,560)
CaveatCan be overly conservativeIf the probability estimates are wrong, the result changes too

If you know only the range of demand and not the probabilities, consider robust optimization; if you can estimate the probability of each demand level from past data, consider stochastic optimization. The two approaches are not mutually exclusive: you can build models that use a probability distribution while keeping certain constraints robust, or that weigh expected cost and worst-case loss together.

SECTION 07

Chance constraints and risk management

P(supply ≥ demand) ≥ 0.95

Instead of only maximizing expected profit, you can also manage the probability of meeting a particular condition. The expression above means: plan so that the probability of meeting demand is at least 95%.

0%20%40%60%80%100%708090100110120130Target service level 95%x = 80: 20% · expected profit 3,200x = 100: 70% · expected profit 3,560x = 120: 100% · expected profit 2,820Probability of meeting demand P(x ≥ D)Output x · the smallest output meeting the 95% condition is 120 (expected profit falls by 740)
Figure 2. Chance constraint

In Figure 2, producing 100 meets demand with a probability of only 70%, so to satisfy the 95% condition you have to produce 120. In exchange, expected profit falls by 740, from 3,560 to 2,820. Showing the cost of maintaining a service level in numbers like this gives a basis for setting the target level. Using chance constraints requires the distribution of demand or information to estimate it, and if the probability estimates themselves are uncertain, that has to be taken into account too.

There are also cases where the expected value alone is not enough. Producing 100 has the highest expected profit, but with 20% probability profit is only 1,800, while producing 80 has an expected profit 360 lower but always yields 3,200. If the variability of outcomes matters, look at risk measures such as variance, probability of loss, worst-case loss, and conditional value at risk (CVaR) as well. When designing a stochastic optimization, first decide whether to optimize average performance or also limit the risk of loss.

SECTION 08

Scenario-based optimization and two-stage decisions

If it is hard to express the uncertainty precisely with a single probability distribution, build scenarios such as low demand (0.2), normal demand (0.5), and high demand (0.3). The probabilities may be assumptions made for the analysis or values estimated from past data or forecasting models, so you need to record how they were set in order to interpret the results correctly.

In some problems, not every decision is made at once. Suppose that in stage 1 you set a base output before demand is known, and in stage 2, after seeing actual demand, you can fill any shortfall with rush production at 80 per unit.

Base outputNo rush productionRush production available (80 per unit)Value of being able to respond
803,2003,640440
1003,5603,680120
1202,8202,8200

A base output of 100 is still optimal, but expected profit rises by 120 to 3,680, and the disadvantage of producing 80 shrinks considerably. This means that having a way to respond later lets you make the initial decision less conservatively. Separating decisions made before the uncertainty is revealed from the responses made after it lets you build a plan that prepares in advance while still responding flexibly.

SECTION 09

Which method should you choose in practice?

SituationApproach to considerKey question
You know the range of values but not the probabilitiesRobust optimizationDoes the plan hold up even in unfavorable situations?
You can estimate the probability of each scenarioStochastic optimizationWhich choice has the best expected performance?
A minimum service level or probability of success mattersChance-constrained optimizationIs the likelihood of meeting the condition high enough?
Large losses matter, not just average performanceRisk-aware optimizationWhat is the balance between expected performance and risk of loss?
Further responses are possible after uncertainty is revealedMultistage stochastic optimizationHow should we respond as the situation changes?
1. Identify the uncertain variables

List the values that can change, such as demand, costs, prices, and supply.

2. Check what you know about the uncertainty

Check whether you know only the range or can also estimate probabilities for each scenario.

3. Set the decision criterion

Decide which matters most: expected profit, the worst case, maximum regret, or a minimum service level.

4. Build the optimization model

Reflect the uncertainty in the objective function and constraints.

5. Validate the results

Check that the results are not overly unstable when you change the assumptions and inputs.

Example report

Demand was modeled as three scenarios of 80, 100, and 120 units (probabilities 0.2, 0.5, 0.3), and profit was compared across production levels. Producing 100 had the highest expected profit at 3,560, but profit fell to 1,800 when demand was 80. Using worst-case profit as the criterion selected producing 80 (3,200), and requiring at least a 95% probability of meeting demand called for producing 120, at which expected profit fell by 740 to 2,820.

✓ KEY TAKEAWAYS

What is uncertain, and what you know about it, determines the optimization criterion.


Wrapping up the nine optimization topics

Research questionMain methodsChapter
How do we express goals and constraints as formulas?Decision variables, objective function, constraints01
What is the optimal allocation when relationships are linear?Linear programming, feasible region and corner points02
How do we find the optimum, and what are resources worth?Simplex method, duality, shadow prices03
What if there are counts or yes/no choices?Integer programming, binary variables, branch and bound04
What if continuous and discrete decisions are mixed?Mixed-integer programming, fixed costs · setup decisions05
What if relationships are curved?Derivatives and stationary points, convexity, gradient descent06
How do constraints change the optimum?Lagrange multipliers, KKT conditions07
What if there are several goals?Pareto frontier, weighted sum, epsilon-constraint08
What if the inputs are uncertain?Robust optimization, stochastic optimization, chance constraints09

The optimization part started from expressing a problem as an objective function and constraints, and went on in turn to methods for solving linear, integer, and nonlinear problems, the effect of constraints and multiple goals on the solution, and finally uncertainty in the inputs. The heart of optimization is not the calculation of the largest or smallest value itself, but expressing real-world goals and constraints properly and finding decisions that can actually be used, with the assumptions and uncertainties made explicit.

This concludes 15 Optimization theory.