Markets: A Rigorous Course

13.7 Proper scoring rules and calibration

Core about 25 min

Motivation

A probabilistic forecast must be scored by a rule that rewards honesty. Under an improper rule a forecaster does better by reporting something other than their belief, and the scores become useless for judging skill. The Brier and log scores are the two rules every forecaster should know; the Murphy decomposition separates "are your 70%s right 70% of the time" (calibration) from "do your forecasts discriminate" (resolution).

Setup#

A binary event Y∈{0,1}Y\in\{0,1\}; a forecast p∈[0,1]p\in[0,1]; a scoring rule S(p,y)S(p,y), here a loss (lower is better). If the forecaster's true belief is q=Pr⁡(Y=1)q = \Pr(Y=1), the expected score of reporting pp is

Sˉ(p;q)=q S(p,1)+(1−q) S(p,0).(13.31)\bar S(p; q) = q\,S(p,1) + (1-q)\,S(p,0). \tag{13.31}

SS is proper if Sˉ(q;q)≤Sˉ(p;q)\bar S(q;q)\le\bar S(p;q) for all p,qp,q, and strictly proper if equality implies p=qp=q (Gneiting and Raftery 2007).

The Brier score (Brier 1950) over NN forecasts and the log score are

BS=1N∑i=1N(pi−yi)2,(13.32)\mathrm{BS} = \frac1N\sum_{i=1}^N(p_i - y_i)^2, \tag{13.32}
LS=−1N∑i=1N[yiln⁡pi+(1−yi)ln⁡(1−pi)].(13.33)\mathrm{LS} = -\frac1N\sum_{i=1}^N\big[y_i\ln p_i + (1-y_i)\ln(1-p_i)\big]. \tag{13.33}

Proposition 13.18Brier is strictly proper

SˉB(p;q)=q(1−p)2+(1−q)p2=(p−q)2+q(1−q).(13.34)\bar S_{B}(p;q) = q(1-p)^2 + (1-q)p^2 = (p-q)^2 + q(1-q). \tag{13.34}
Proof

Expand: q(1−2p+p2)+(1−q)p2=q−2pq+p2=(p−q)2+q−q2q(1-2p+p^2) + (1-q)p^2 = q - 2pq + p^2 = (p-q)^2 + q - q^2. The second term does not depend on pp, and the first is uniquely minimised at p=qp=q.∎

Proposition 13.19log score is strictly proper

SˉL(p;q)=H(q)+DKL(q ∥ p),(13.35)\bar S_{L}(p;q) = H(q) + D_{KL}(q\,\|\,p), \tag{13.35}

where H(q)=−qln⁡q−(1−q)ln⁡(1−q)H(q) = -q\ln q - (1-q)\ln(1-q) and DKL(q∥p)=qln⁡(q/p)+(1−q)ln⁡((1−q)/(1−p))≥0D_{KL}(q\|p) = q\ln(q/p) + (1-q)\ln((1-q)/(1-p))\ge 0 with equality iff p=qp=q.

Proof

−qln⁡p−(1−q)ln⁡(1−p)=[−qln⁡q−(1−q)ln⁡(1−q)]+[qln⁡(q/p)+(1−q)ln⁡((1−q)/(1−p))]-q\ln p - (1-q)\ln(1-p) = [-q\ln q - (1-q)\ln(1-q)] + [q\ln(q/p) + (1-q)\ln((1-q)/(1-p))], which is (13.35). Gibbs' inequality: since ln⁡\ln is strictly concave, Jensen gives −DKL(q∥p)=∑yqyln⁡(py/qy)≤ln⁡∑yqy(py/qy)=ln⁡1=0-D_{KL}(q\|p) = \sum_y q_y\ln(p_y/q_y) \le \ln\sum_y q_y(p_y/q_y) = \ln 1 = 0, with equality iff py/qyp_y/q_y is constant, i.e. p=qp=q.∎

Counter-example (an improper rule) The absolute error ∣p−y∣|p-y| has expected value q(1−p)+(1−q)p=q+p(1−2q)q(1-p) + (1-q)p = q + p(1-2q), which is linear in pp. For q>1/2q>1/2 it is minimised at p=1p=1, for q<1/2q<1/2 at p=0p=0. A forecaster scored by absolute error should report only 0 or 1, destroying all probabilistic information. The test test_strict_propriety_on_a_grid checks all three behaviours numerically.

The two proper rules differ in their tails. Brier is bounded: the worst possible single score is 1. The log score is unbounded: a forecast of p=0p=0 for an event that happens scores +∞+\infty. That is a feature. It encodes the view that certainty about an uncertain event is an unbounded error, and it is why the 100% forecast in case study 13.9.1 is indefensible regardless of how the rest of a track record looks.

Calibration, resolution and the Murphy decomposition#

A forecaster is calibrated if Pr⁡(Y=1∣p=f)=f\Pr(Y=1\mid p = f) = f for every forecast value ff they use. Calibration alone is cheap: always forecasting the base rate yˉ\bar y is perfectly calibrated and useless. The other ingredient is resolution: how much the outcome frequency varies across the forecaster's categories.

Group forecasts into KK bins with nkn_k forecasts each, all equal to fkf_k within bin kk. Let yˉk\bar y_k be the observed frequency in bin kk and yˉ\bar y the overall frequency.

Proposition 13.20Murphy 1973

BS=1N∑knk(fk−yˉk)2⏟reliability (REL)−1N∑knk(yˉk−yˉ)2⏟resolution (RES)+yˉ(1−yˉ)⏟uncertainty (UNC).(13.36)\mathrm{BS} = \underbrace{\frac1N\sum_k n_k(f_k - \bar y_k)^2}_{\text{reliability (REL)}} - \underbrace{\frac1N\sum_k n_k(\bar y_k - \bar y)^2}_{\text{resolution (RES)}} + \underbrace{\bar y(1-\bar y)}_{\text{uncertainty (UNC)}}. \tag{13.36}
Proof

Within bin kk, add and subtract yˉk\bar y_k: ∑i∈k(fk−yi)2=nk(fk−yˉk)2+2(fk−yˉk)∑i∈k(yˉk−yi)+∑i∈k(yi−yˉk)2\sum_{i\in k}(f_k - y_i)^2 = n_k(f_k-\bar y_k)^2 + 2(f_k-\bar y_k)\sum_{i\in k}(\bar y_k - y_i) + \sum_{i\in k}(y_i-\bar y_k)^2. The middle sum is zero by definition of yˉk\bar y_k. Because yi∈{0,1}y_i\in\{0,1\}, yi2=yiy_i^2 = y_i and ∑i∈k(yi−yˉk)2=nkyˉk−nkyˉk2=nkyˉk(1−yˉk)\sum_{i\in k}(y_i-\bar y_k)^2 = n_k\bar y_k - n_k\bar y_k^2 = n_k\bar y_k(1-\bar y_k). So

BS=1N∑knk(fk−yˉk)2+1N∑knkyˉk(1−yˉk).\mathrm{BS} = \frac1N\sum_k n_k(f_k-\bar y_k)^2 + \frac1N\sum_k n_k\bar y_k(1-\bar y_k).

For the second term, use ∑knkyˉk=Nyˉ\sum_k n_k\bar y_k = N\bar y and ∑knkyˉk2=∑knk(yˉk−yˉ)2+Nyˉ2\sum_k n_k\bar y_k^2 = \sum_k n_k(\bar y_k-\bar y)^2 + N\bar y^2 (the cross term 2yˉ∑knk(yˉk−yˉ)2\bar y\sum_k n_k(\bar y_k - \bar y) vanishes). Then 1N∑knkyˉk(1−yˉk)=yˉ−1N∑knk(yˉk−yˉ)2−yˉ2=UNC−RES\frac1N\sum_k n_k\bar y_k(1-\bar y_k) = \bar y - \frac1N\sum_k n_k(\bar y_k - \bar y)^2 - \bar y^2 = \mathrm{UNC} - \mathrm{RES}.∎

Uncertainty depends only on the events, not the forecaster. A good forecaster has small REL and large RES. If forecasts within a bin are not all equal (equal-width bins on continuous forecasts), two extra within-bin terms appear and (13.36) holds only approximately; the code's bins=None option bins by distinct forecast value so the identity is exact.

The Brier skill score against a reference forecast is BSS=1−BS/BSref\mathrm{BSS} = 1 - \mathrm{BS}/\mathrm{BS}_{\text{ref}}. Use two references: the coin flip (0.5, BS=0.25\mathrm{BS}=0.25) and climatology (the base rate, BS=yˉ(1−yˉ)\mathrm{BS} = \bar y(1-\bar y)).

Worked example 1: five forecasts#

Forecasts p=(0.9,0.2,0.6,0.7,0.4)p = (0.9, 0.2, 0.6, 0.7, 0.4), outcomes y=(1,0,1,1,0)y = (1,0,1,1,0). Squared errors: 0.01,0.04,0.16,0.09,0.160.01, 0.04, 0.16, 0.09, 0.16; sum 0.46; BS=0.092\mathrm{BS} = 0.092. Log score: −15[ln⁡0.9+ln⁡0.8+ln⁡0.6+ln⁡0.7+ln⁡0.6]=−15[−0.10536−0.22314−0.51083−0.35667−0.51083]=0.341366-\frac15[\ln0.9 + \ln0.8 + \ln0.6 + \ln0.7 + \ln0.6] = -\frac15[-0.10536 - 0.22314 - 0.51083 - 0.35667 - 0.51083] = 0.341366. Murphy with one bin per distinct forecast: each bin has one forecast and yˉk∈{0,1}\bar y_k\in\{0,1\}, so REL = BS = 0.092, RES = 15∑(yˉk−0.6)2=15(3×0.16+2×0.36)=0.24\frac15\sum(\bar y_k - 0.6)^2 = \frac15(3\times0.16 + 2\times0.36) = 0.24, UNC = 0.6×0.4=0.240.6\times0.4 = 0.24. Check: 0.092−0.24+0.24=0.0920.092 - 0.24 + 0.24 = 0.092. With one forecast per bin, resolution equals uncertainty mechanically and reliability carries the whole score. The decomposition only becomes informative with many forecasts per bin, which is why the forecast journal (13.8) uses coarse probability levels.

Worked example 2: a forecast journal#

Ten weekly questions answered with probabilities from a five-level scale:

pp 0.6 0.7 0.3 0.6 0.8 0.3 0.7 0.6 0.3 0.8
yy 1 1 0 0 1 0 1 1 1 1

BS=0.161\mathrm{BS} = 0.161, LS=0.501\mathrm{LS} = 0.501. Base rate yˉ=0.7\bar y = 0.7, UNC =0.21= 0.21. Bins: f=0.3f=0.3 (n=3n=3, yˉ=1/3\bar y = 1/3), f=0.6f=0.6 (n=3n=3, yˉ=2/3\bar y = 2/3), f=0.7f=0.7 (n=2n=2, yˉ=1\bar y=1), f=0.8f=0.8 (n=2n=2, yˉ=1\bar y=1). REL =110[3(0.0333)2+3(0.0667)2+2(0.3)2+2(0.2)2]=0.0277= \frac1{10}[3(0.0333)^2 + 3(0.0667)^2 + 2(0.3)^2 + 2(0.2)^2] = 0.0277. RES =110[3(0.3667)2+3(0.0333)2+2(0.3)2+2(0.3)2]=0.0767= \frac1{10}[3(0.3667)^2 + 3(0.0333)^2 + 2(0.3)^2 + 2(0.3)^2] = 0.0767. Check: 0.0277−0.0767+0.21=0.1610.0277 - 0.0767 + 0.21 = 0.161. Skill: BSS=0.356\mathrm{BSS} = 0.356 against a coin flip and 0.2330.233 against climatology. The diagnosis: the 0.7 and 0.8 forecasts were underconfident (all happened). Ten forecasts are, of course, far too few to conclude anything (13.8).

Practitioner notes

  • Report both scores. Brier is easier to explain and robust to a single extreme miss; log score is the one tied to wealth growth (a Kelly bettor's log-wealth growth against a market is a log-score difference, M03) and punishes overconfidence harshly.
  • Never forecast exactly 0 or 1 on a question that is not already resolved. Use 0.01–0.02 and 0.98–0.99 for "almost certain".
  • Option prices imply risk-neutral probabilities (M08: Pr⁡Q(ST>K)=−erτ ∂C/∂K\Pr^{\mathbb Q}(S_T > K) = -e^{r\tau}\,\partial C/\partial K, the strike slope of the call price grossed up by the discount factor). Scoring them as real-world forecasts mixes in risk premia; risk-neutral probabilities of large falls are systematically higher than realised frequencies.

Create a free account

Reading is open to everyone. An account keeps your progress, answers, notes and code drafts, and gives you the study plan, the journals and the simulator. Running code needs an account approved for it.