not having to pay is effectively the same as gaining
No! If you're going to add/multiply something to your utility function for convenience, you have to do it for every action. When the building is on fire, deciding whether to turn on the sprinklers is a decision on whether to spend T and gain D, so V(TP)-V(FN) needs to be D-T.
Oh you're right! Thanks for catching that. I think I was lead astray because I wanted there to be a big payoff for averting the bad event, but I guess the benefit is just not having to pay D.
I'll have a look and see how much this changes things
Edit: Fixed it up now, none of the conclusions seem to change (which is good because they seemed like common sense!). Thanks for reading this and pointing that out!
This is cool. Formalizes arguments we often make more informally when talking about existential risks.
This will take me longer than five minute to grok… i can see potential applications in CMDB and Event Management. There’s a lot of threshold and flapping problems to solve there.
In this post I consider a model where there is a possible bad outcome, and the chance of it happening is related to something we can measure. We need to be able to set a threshold for these measurements, such that if a measurement exceeds a threshold then we decide to act; to prepare for or treat the bad outcome. This seems like a pretty basic idea, so I expect that either most results will be trivial, or that someone has already done this before.
A basic example of this would be a disease, where if a patient reaches a threshold for the number and severity of symptoms then the doctor decides to prescribe a medicine. Or the current pandemic, where in February 2020 if governments had a more accurate view of both the chance and severity of a global pandemic they may have decided to put in place seemingly drastic measures to stop worse outcomes in the future.
This should also apply to important risks in the future, where it is important to know the probabilities and magnitudes so that we can adequately prepare. We need to know where to sensibly set the threshold which tells us when to act.
A helpful metaphor I will use here is a building with a sprinkler system. We want the sprinklers to turn on when there is a fire (there is a huge cost if the building burns down), but also we don't want the sprinklers constantly going off whenever there's dust in the air because this also has a cost associated with it.
When deciding whether something is going to happen, and whether to act there are 4 options:
The chance of each of these options will depend on where we set our threshold. If the threshold is very low then we will have a lot of True Positives, but will also have to incur the costs of more False Positives. If the threshold is very high then we will have less False Positives, but will have more False Negatives.
Mathematical Model
We can decide where to put the threshold by calculating the expected value (EV) at a given threshold.
EV=p(TP)⋅V(TP)+p(TN)⋅V(TN)+p(FP)⋅V(FP)+p(FN)⋅V(FN)
Where p(⋅) is the probability of each outcome, and V(⋅) is the return or value of each outcome.
We can express the value of each outcome quite simply, using 2 positive constants:
- D is the cost we have to pay if we don't treat the disease or avert the disaster
- The cost of the building burning down
- T is the cost of the treatment or the preparations
- The cost of the sprinkler system going off
For the True Positive case we are in the world where the disaster would have happened but we successfully stop it in exchange for cost T, so rather than paying D we pay T instead, so V(TP)=−T.
For the True Negative case, we do nothing and nothing happens, so very simply V(TN)=0.
For the False Positive case, we spend T and nothing happens so V(FP)=−T.
For the False Negative case, the disaster happens and costs us D, so V(FN)=−D.
And hence our expected value is
EV=p(TP)(−T)+p(FP)(−T)+p(FN)(−D)
The expected value depends on the probabilities which depend on where we set our threshold t,
p(TP)=PP∫∞tψP(θ)dθ
p(FP)=PN∫∞tψN(θ)dθ
p(FN)=PP∫t−∞ψP(θ)dθ
Where ψP(θ) and ψn(θ) are the distributions over the thing we're measuring, θ. For example θ could be the concentration of particles in the air, as this increases there is a higher chance that the building is on fire. θ could also be an indicator of more complicated and abstract things; the reproductive number of a virus, or the number of warships in the South China Sea. ψP(θ) and ψn(θ) are both normalized to 1 here, and the actual background chance of a positive event is PP, and hence the chance of a negative event (nothing happens) is PN=1−PP. ψP(θ) can be thought of as "given that the event happens, how likely is each each value of θ".
If we want to be good Bayesians about it we could say ψP(θ)=p(θ|Event happens) and ψN(θ)=p(θ|Event doesn't happen).
Finding the Optimal Threshold
We should choose the value of the threshold t which maximizes the expected value. We can write the expected value as a function of t
EV(t)=−T PP∫∞tψP(θ)dθ−T PN∫∞tψN(θ)dθ−D PP∫t−∞ψP(θ)dθ
We can find the maximum of this by taking the derivative with respect to t
and setting it equal to 0.
ddtEV(t)=T PP ψP(t)+T PN ψN(t)−D PP ψP(t)=0
Which rearranges to give us
ψP(t)ψN(t)=1−PPPP (D/T−1)
The threshold t will increase as the factor on the right hand side increases. Interestingly, for given distributions ψP and ψN, the optimal threshold t only depends on the probability of the event PP, and the ratio between the costs of the event and the treatment D/T. If we express the expected value in units of the treatment cost (divide by T), we can see that it also only depends on these variables:
EV(t)=− PP∫∞tψP(θ)dθ− (1−PP)∫∞tψN(θ)dθ−D/T PP∫t−∞ψP(θ)dθ
Perhaps obviously, this model tells us the ways in which we can be acting rationally (maximizing expected utility), but choose a suboptimal threshold because we are misinformed:
- We have an incorrect assessment of the relative cost of the disaster versus the treatment D/T
- We can have an incorrect assessment of the background probability of an event happening PP
- Our probability distributions ψP and ψN can be wrong; for example, the variance of smoke concentration when there is a fire could be larger than we thought.
Toy Example and Results
For the a very simple example, we can take the distributions ψP and ψN to be normal distributions with standard deviations of 1,
ψP(t)=NμP(t)=1√2πexp(−12(t−μP)2)
ψN(t)=NμN(t)=1√2πexp(−12(t−μN)2)
Using these we can solve for the threshold value t which maximizes expected utility
t=1μP−μNln(1−PPPP (D/T−1))+12μ2P−μ2NμP−μN
Expected Value for Different Threshold Values
We can plot the expected value as a function of the threshold, to see how it changes. If the threshold is set too low, then we lose utility due to acting unnecessarily, while if it is too high then we lose utility because disasters happen which we could have prevented. The optimal t calculated above is at the 'sweet spot' as we can see here:
We can also look at how things change as our distributions change, specifically as the overlap between them decreases.
When there is a lot of overlap - when it is difficult to discriminate between the positive and negative situations - there isn't much of a peak in the expected value around the 'sweet spot'. This is because we can't really tell between the two outcomes, and and so being very risk averse (low threshold) is a good plan. In this regime, if underestimating the probability of a the bad event can have very bad outcomes, while overestimating doesn't really effect things.
As the distributions get further apart (we can discriminate more easily) we get a peak at the optimal threshold, and this peak gets wider as the distributions get further apart. This is because we can more easily place the threshold where it catches all the positive (bad) events while not reacting when we don't need to.
Effect of Incorrectly Estimating the Likelihood of an Event
We can also more thoroughly investigate the consequences of under or overestimating the probability of an event. These consequences will vary depending on the regime we are in, specifically on the values of D/T and PP. It is useful to sweep through a wide range of these parameters. We investigate values of D/T ranging from 1 to 105. For the probability PP we can instead use the odds ratio PP/(1−PP), which allows us to investigate very small probabilities (this is important because we should probably care about events which are very unlikely but have large effects). We explore PP/(1−PP) over a range from 10−3 up to almost certainty. We calculate the difference in expected value if we choose the optimal threshold (EVbest), versus the threshold we would choose if we under/overestimated the odds by a factor of 20 (EVunder/overestimate).
ΔEV=EVbest−EVunder/overestimate
ΔEV will be negative because we are choosing a suboptimal threshold. The lost utility will be due either from allowing bad events to happen without treatment, or from acting unnecessarily.
We can clearly see that (for these parameters) the consequences of underestimating the likelihood of a bad event can be much worse than the consequences of overestimating. The consequences are especially severe when the bad event is very unlikely but is very bad if it does happen.
Feel free to examine this model, play around with parameters, or find mistakes here:
https://colab.research.google.com/github/peterbarnettnz/risk_neglect/blob/main/Risk_false_positive_negative.ipynb
Thanks to Gurkenglas for pointing out some bad reasoning about the expected value math.