advanced33 min studyLesson 263 in Mathematics

Posterior loss and Bayes decisions

Turn posterior uncertainty into an action by specifying loss, comparing conditional risks, and checking sensitivity.

On this page

What you’ll understand

  • Minimize posterior expected loss for a finite action set.
  • Derive the posterior mean under squared error.
  • Explain why loss choices change decisions without changing the posterior.

A posterior distribution describes uncertainty; it does not, by itself, prescribe an action. The same probability of an adverse event can justify different actions when their consequences differ. A backup system might be inexpensive to activate, while an unnecessary evacuation is costly. Bayesian decision theory makes that extra ingredient explicit through a loss function. The calculation is useful precisely because probabilities and consequences remain separate, allowing a disagreement about evidence to be distinguished from a disagreement about which errors matter most.

Conditional risk is the object to optimize

For action aa and unknown state θ\theta, specify a loss L(a,θ)L(a,\theta) in consistent units. After observing yy, the posterior risk is its expectation under π(θ∣y)\pi(\theta\mid y). Choose an available action minimizing that expectation, assuming the expectations exist and a minimizer is available. With finitely many actions and finite losses this is direct comparison. With continuous actions, existence and constraints need attention; a differentiable stationary point need not be a global minimizer.

If an action changes future outcomes, the relevant loss may depend on a future observation as well as the unknown parameter. Integrate over the posterior predictive distribution conditional on that action, not over an observational distribution that silently assumes no intervention. An association between a chosen action and an outcome does not automatically identify its causal effect. The mathematical optimization can be flawless while the action-dependent model is wrong. State what intervention or stability assumptions permit transporting past information into this decision.

r(a∣y)=∫L(a,θ)π(θ∣y) dθ,a∗(y)∈arg min⁡a∈Ar(a∣y)r(a\mid y)=\int L(a,\theta)\pi(\theta\mid y)\,d\theta,\qquad a^*(y)\in\operatorname*{arg\,min}_{a\in\mathcal A}r(a\mid y)
An optimal action is conditional on the posterior, loss, and allowed action set; uniqueness is not assumed.↔ Scroll wide equations horizontally.

Why different summaries solve different problems

For squared error and a posterior with finite second moment, expand around the posterior mean. The cross term vanishes because the centered parameter has posterior expectation zero. Risk becomes a constant posterior variance plus squared distance from that mean, proving that the mean minimizes risk over all real actions. This derivation also shows why reporting only the mean hides uncertainty: two posteriors can have the same minimizing action and very different unavoidable posterior risks.

Absolute-error loss instead admits posterior medians as minimizers when the first absolute moment is finite. Asymmetric linear loss selects a posterior quantile, with its level determined by the relative costs of overestimation and underestimation. For a continuous parameter, zero-one loss for exact equality makes every action have essentially the same loss under a continuous posterior; a posterior mode requires a different limiting or neighborhood-based interpretation. Do not attach a universal optimality claim to mean, median, or mode without first declaring the loss and parameter scale.

E[(θ−a)2∣y]=Var⁡(θ∣y)+(a−E[θ∣y])2\mathbb E[(\theta-a)^2\mid y]=\operatorname{Var}(\theta\mid y)+\bigl(a-\mathbb E[\theta\mid y]\bigr)^2
Finite posterior second moment makes this decomposition valid and identifies the posterior mean as the squared-error optimum.↔ Scroll wide equations horizontally.

Thresholds, uncertainty, and information

For a binary adverse event, suppose acting costs something only when no event occurs, while waiting costs something only when it does occur. Comparing those two expected losses yields a probability threshold. The threshold is generally not one half; it depends on the costs. Costs may include resource use, delay, and effects on other people, so documenting them is part of the analysis. Sensitivity calculations reveal whether a decision survives reasonable changes in costs or depends on one debatable number.

Information can change the selected action, but its value depends on whether it can change a consequential choice. With a fixed loss function and a coherent joint model, the expected minimum posterior loss after free additional information cannot exceed the current minimum risk: ignoring the new information remains an available strategy. Actual measurement costs must then be subtracted from that expected benefit. This comparison is made before seeing the measurement, averaging over its predictive distribution; choosing only favorable possible measurements would overstate the value of information.

A threshold below one half

The posterior probability of a damaging event is 0.20. Triggering a precaution costs 3 loss units if no event occurs and zero if it occurs. Waiting costs 20 if the event occurs and zero otherwise. Choose the smaller-risk action.

  1. The risk of triggering is three times the posterior probability of no event: 3 times 0.80 equals 2.4. The problem explicitly assumes no additional loss for triggering when the event occurs.

  2. The risk of waiting is twenty times the event probability: 20 times 0.20 equals 4. Comparing expected losses gives triggering as the preferred action, even though the event is less likely than its complement.

  3. For a general event probability p, triggering is better when 3(1−p) is less than 20p, equivalent to p greater than 3/23. At equality the actions tie; the threshold is approximately 0.1304.

The result

Trigger the precaution: conditional expected loss is 2.4 rather than 4. The conclusion follows from the specified loss table and can change if either its costs or the posterior change.

Explore the model

Interactive lab

Interactive lab · function

See the excess squared-error risk

Pause and Reset, then set both controls to a=1 and x=0.50. Interpret x as displacement from the posterior mean; predict excess risk 0.25 from y=x². Reset and set a=1 and x=0; predict zero excess risk. The omitted posterior variance is a constant offset, so the displayed curve is excess risk rather than total risk.

See the excess squared-error riskThis lab uses only y = ax². Playback traces the curve within the fixed integration interval from 0 to x; it does not estimate numerical error or change the chosen point. Current readings: y at chosen x: 0.608; Tangent slope · 2ax: 1.35; Signed area · ax³/3: 0.182. All parameters are adjustable with the labeled controls below.−2.4−1.201.22.4−9−4.504.59xy(x, ax²)
y = ax²TangentSigned integral
y at chosen x
0.608
Tangent slope · 2ax
1.35
Signed area · ax³/3
0.182
t = 0 s

This lab uses only y = ax². Playback traces the curve within the fixed integration interval from 0 to x; it does not estimate numerical error or change the chosen point. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.

Look forThe risk-minimizing action and the uncertainty that remains after choosing it are different quantities.

Check your understanding

With finite posterior second moment and unconstrained real actions, which action minimizes posterior squared-error loss?

Try it yourself

A posterior puts probability 0.75 at theta=0 and 0.25 at theta=2. Find a squared-error optimal real action and its risk. Then find an absolute-error optimal action and its risk.

Take a moment to make a prediction or work it out on paper. Open a hint when you need one.

Give me a hint

Compute the posterior mean for the first loss. For the second, inspect weighted distances on the interval between the two support points.

Compare with the solution

The posterior mean is 0.5. Its squared-error risk is 0.75 times 0.5 squared plus 0.25 times 1.5 squared, equal to 0.75. For absolute error, action zero has risk 0.25 times 2, equal to 0.5. On [0,2], absolute risk is 0.75a+0.25(2−a)=0.5+0.5a, so zero minimizes it there; actions outside the interval only increase distances. The posterior is unchanged when the loss changes, but the optimal action changes from 0.5 to zero.

Take it with you

  • Posterior expected loss combines uncertainty with explicitly stated consequences.
  • The posterior mean is optimal for squared error under a finite second moment.
  • Decision thresholds depend on error costs rather than a universal probability cutoff.

Read further

Original sources and deeper explanations to follow at your own pace.

Optional progress, saved in this browser when available. Revisit any lesson at any time.

Lesson not marked complete.