Turn results into decisionsLesson 54 of 76 · 9 min

A policy can respond to new information

Compare an adaptive decision with a fixed decision using the information actually available.

A policy maps available information to an action. It differs from a fixed choice and from an impossible hindsight rule that sees the future. Specify when the signal arrives and what it reveals before allowing the policy to act.

In this example a noisy early signal is related to later demand through a shared latent condition. A fixed stock is compared with a policy that stocks more after a high signal. Neither policy can inspect realised demand before acting. Latent means that shared condition is not directly observed; the policy sees the early signal, not the condition or future demand.

Use matched simulated conditions to compare losses. Optimising a threshold on one batch and reporting its apparent performance on that same batch can overfit simulation noise. Hold out independent evaluation trials when selecting a policy from many candidates.

Decide using only available information
  1. Receive a noisy signal
    ZZ
  2. Apply a prespecified policy
    S=π(Z)S=\pi(Z)
  3. Evaluate in the same world
    L(π(Z),D)L(\pi(Z),D)
Reference illustration. The adaptive policy sees the simulated signal, not future demand itself. Comparing against a fixed action must respect what is known at decision time.

Would a policy that chooses stock after seeing final demand be a fair operational comparison?

Write a prediction (optional)

Seeded teaching simulation

Select Run Python below with the code unchanged.

Tools
About Python ↗

The code is editable. Press Ctrl+Enter or ⌘+Enter to run Python from the editor.

Published example output

This result comes from the original Python. Your runs appear above. Build environment ↗

fixed expected loss: 17.441 P(shortage): 0.1726
signal policy expected loss: 16.021 P(shortage): 0.1447
Signal / demand correlation: 0.6

Read the first result

The adaptive rule sees the noisy signal, not final demand. Its usefulness depends on both signal quality and the action rule.

Try an edit

Replace signal = latent + rng.normal(0, 1, len(latent)) with signal = latent + rng.normal(0, 2, len(latent)). Select Run Python again. Compare Signal / demand correlation and the expected loss of the fixed and signal policies. The threshold stays fixed. What changes when the same policy receives a noisier signal?

Back to the Python editor

Scope. The signal mechanism and policy are invented. Independent simulation evaluation does not establish real-world signal quality.

Try a fresh case

You test a hundred policy thresholds and select the lowest-loss one. What improves the performance assessment?

Choose an answer
Need a hint?
Hint 1

Separate policy selection from policy evaluation.

Hint 2

Keep the information available at decision time fixed.

Your notes