research29 min studyLesson 862 in Engineering

Proper scoring rules and decision costs

Evaluate probability forecasts with proper losses and derive an action from a separate, explicit cost matrix.

On this page

What you’ll understand

  • Derive the expected binary Brier loss and its unique minimizer.
  • Calculate a cost-sensitive binary action threshold.
  • Separate probability quality, realized outcomes, and operational utility.

A probability forecast and an action are different outputs. A classifier may estimate a 30% failure probability while an operator must choose whether to stop a process, request inspection, or continue. Scoring rules evaluate the forecast against outcomes; a cost matrix evaluates the action. Keeping these roles explicit prevents an expensive false negative from being treated as though it were merely another equally weighted classification mistake.

Properness concerns expected reporting incentives

For a binary event Y, the Brier loss is the squared difference between a reported probability p and the observed zero-or-one outcome. If the true event probability is q, expand the expected loss to obtain a squared forecasting error plus q times one minus q. The second term does not depend on the reported probability. The unique expected-loss minimizer is therefore p equal to q, even though an individual realized outcome can make a less accurate forecast look better.

A strictly proper loss rewards truthful distribution reporting in expectation over the specified outcome distribution. It does not guarantee that finite data identify that distribution, that the model can express it, or that the optimizer finds it. Specify whether a score is a reward to maximize or a loss to minimize; the terminology otherwise creates sign errors. For multiclass Brier scores, also record whether components are summed or averaged, because numerical scales differ even when the minimizer is unchanged.

EY∼Bernoulli(q)[(p−Y)2]=(p−q)2+q(1−q)\mathbb E_{Y\sim\mathrm{Bernoulli}(q)}[(p-Y)^2]=(p-q)^2+q(1-q)
Here p and q are dimensionless probabilities in [0,1], and lower loss is better. The expectation is over the declared Bernoulli outcome, not over arbitrary deployment shift. Binary squared-probability loss is the convention used throughout this lesson.↔ Scroll wide equations horizontally.

Translate probabilities into actions using costs

Suppose predicting positive incurs cost C_FP only when the event is absent, while predicting negative incurs C_FN only when it occurs. With zero cost for correct decisions, compare the two conditional expected costs. Their intersection gives a threshold determined by the cost ratio. An expensive missed failure lowers the positive-action threshold. If correct actions also have costs, or several actions are available, compute the full expected cost for each action instead of reusing this special binary formula.

This rule is optimal for the supplied conditional probabilities and costs, not for an unexamined confidence score. Calibration averaged over a broad confidence bin may be insufficient when costs vary by input or group. Likewise, a stable probability model can need a different action policy after costs change without needing retraining. Record the forecast, cost version, selected action, and eventual outcome so later analysis can distinguish probability error from a poor or outdated utility specification.

C(+∣x)=CFP(1−q(x)),C(−∣x)=CFNq(x),+ if q(x)≥CFPCFP+CFN\mathcal C(+\mid x)=C_{\mathrm{FP}}(1-q(x)),\quad \mathcal C(-\mid x)=C_{\mathrm{FN}}q(x),\quad +\ \text{if}\ q(x)\ge\frac{C_{\mathrm{FP}}}{C_{\mathrm{FP}}+C_{\mathrm{FN}}}
Assume nonnegative costs in a common unit, C_FP + C_FN > 0, exact conditional event probability q(x), and zero correct-action costs. Equality is a cost tie resolved here toward positive. The threshold is dimensionless; expected costs retain the chosen cost unit.↔ Scroll wide equations horizontally.

Score distributions and decisions on held-out cases

Log loss supplies another strictly proper criterion and penalizes assigning tiny probability to an observed event strongly. Clipping probabilities for numerical safety changes the evaluated rule, so document the clipping floor and report severe failures separately. Compare mean proper losses with uncertainty appropriate to the sampling unit, alongside the actual action costs. A model can improve ranking or accuracy while worsening probability quality, and a lower average probability loss need not improve a particular constrained decision policy.

The quadratic lab shows the reducible part of expected Brier loss rather than fitting a classifier. Reset, set coefficient a to 1 and position x to 0.3, predict y = 0.09, then Step. Compare a fresh Reset with both a at 1 and x at 0 before Step: zero. Interpret x as a hypothetical probability-reporting error p minus q within its feasible range. The plot omits the constant q(1−q), decision costs, labels, and estimation uncertainty.

A truthful forecast and a cost-sensitive action

An idealized binary event has conditional probability q = 0.3. Compare reports p = 0.3 and p = 0.6 under binary Brier loss, then choose an action with false-positive cost 2 credits and false-negative cost 8 credits.

  1. The irreducible expected Brier term is 0.3 × 0.7 = 0.21. Reporting p = 0.3 adds zero squared reporting error.

  2. Reporting p = 0.6 adds (0.6 − 0.3)² = 0.09, giving expected loss 0.30. This expectation does not predict the score of every individual outcome.

  3. The action threshold is 2/(2 + 8) = 0.2. Positive has expected cost 2 × 0.7 = 1.4 credits; negative costs 8 × 0.3 = 2.4 credits, so choose positive.

The result

The truthful probability minimizes expected forecasting loss, and the cost matrix separately selects the action.

Explore the model

Interactive lab

Interactive lab · function

The squared reporting-error term

Reset, set a = 1 and x = 0.3, predict y = 0.09, then Step. Compare a fresh Reset with both a = 1 and x = 0 before Step: y = 0. This quadratic illustrates only (p−q)², omitting outcome noise, probability fitting, and action costs.

The squared reporting-error termThis 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 forProper probability reporting and cost-sensitive action selection answer different questions.

Check your understanding

With zero correct-action costs, false-positive cost 1 and false-negative cost 9, what is the positive-action threshold for an exact conditional event probability?

Try it yourself

For q = 0.2, compare expected binary Brier losses at reports 0.2 and 0.5. Then use false-positive cost 3 and false-negative cost 7 credits to choose an action.

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

Give me a hint

The constant term is q(1−q). Compare 3(1−q) with 7q after computing the reporting losses.

Compare with the solution

The truthful report has expected loss 0.2 × 0.8 = 0.16. Reporting 0.5 adds 0.3² = 0.09, producing 0.25. The action threshold is 3/(3 + 7) = 0.3; at q = 0.2, positive costs 2.4 credits and negative costs 1.4 credits, so negative is preferable. The different action from the worked example comes from the stated probabilities and costs, not from changing what proper probability reporting means.

Take it with you

  • Strictly proper losses identify truthful probabilities in expectation under their assumptions.
  • A cost matrix turns conditional probabilities into actions.
  • Forecast quality and decision utility require separate held-out measurements.

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.