333. Sample Average Approximation

Sample Average Approximation (SAA) — replace an intractable expectation in a stochastic program with a Monte Carlo average over scenarios.

333.1. Problem

Original stochastic program:

𝑧=min𝑥𝑓(𝑥)+𝐸𝜉[𝑄(𝑥,𝜉)]

The expectation is hard (high-dimensional integral; complex distribution).

333.2. SAA approximation

Generate 𝑁 i.i.d. samples 𝜉1,,𝜉𝑁 from the distribution of 𝜉. Solve:

𝑧̂𝑁=min𝑥𝑓(𝑥)+1𝑁𝑠=1𝑁𝑄(𝑥,𝜉𝑠)

This is just a deterministic mathematical program — with 𝑁 scenarios. Solvable by standard tools (simplex, branch-and-bound, etc.).

333.3. Convergence

As 𝑁:

𝑧̂𝑁𝑧(strong law of large numbers)

with the optimal solution 𝑥̂𝑁 also converging to the true optimum 𝑥. Rate: 𝑂(1𝑁) by CLT — the error variance decays as 1𝑁, standard error as 1𝑁.

333.4. Confidence intervals

The objective value 𝑧̂𝑁 from a single SAA run is a random estimate. Standard confidence interval:

CI=[𝑧̂𝑁1.96𝜎𝑁𝑁,𝑧̂𝑁+1.96𝜎𝑁𝑁]

where 𝜎𝑁 is the sample standard deviation of the recourse values 𝑄(𝑥̂𝑁,𝜉𝑠).

333.5. Practical SAA algorithm

  1. Generate 𝑁 samples
  2. Solve SAA problem → 𝑥̂𝑁
  3. Independently evaluate 𝑥̂𝑁 on 𝑀 fresh samples (out-of-sample, 𝑀𝑁) to estimate true 𝑓(𝑥̂𝑁)+𝐸[𝑄(𝑥̂𝑁,𝜉)]
  4. Compare in-sample 𝑧̂𝑁 vs out-of-sample estimate. If similar, 𝑥̂𝑁 is a good solution. If much worse out-of-sample, increase 𝑁.

This out-of-sample validation is essential — in-sample optimization can over-fit to the scenarios used.

333.6. Choosing 𝑁

Trade-off:

Heuristics:

333.7. Variance reduction

Plain Monte Carlo has variance 𝜎2𝑁. Tricks to do better:

333.8. When SAA shines

333.9. See also