Explaining Precision & Recall Through Thoughts Of Justice Reform

Shelly Shmurack
The Startup
Published in
4 min readDec 25, 2020

If you are working on AI/ML products, you probably already came across the words “precision” & “recall” along the way. These terms are being used to benchmark, optimize & improve our AI/ML products.
Precision and recall are numbers extracted by calculating the overall results of a given algorithm/ model.

Ok, so what do these words mean?

This post will go over the key terminologies, list and explain the possible trade-offs between them through thoughts of the US justice system. Helping us as product people understand how and what we want to optimize. And for who are we doing it for?

Setting the Scenario

Imagine you are now a prosecutor. In front of you is a former-felon, convicted of multiple offenses; he had the means, motive, and opportunity. He confessed to the crime at hand. There were also eyewitnesses confirming him as the perpetrator of the crime.

True positive/False Positive? True Negative/ False Negative?

Try to think of the result of the legal hearing as your Positive/ Negative result, and the persons’ actual guilt as determining the True/False part or his outcome.

True Positive

So far, in this classic “Law and Order” case- it seems like all data points lead to only one conclusion, this defendant is guilty! There is no doubt in anyone’s mind. This predator deserves to be in jail. Considering that it is correct, this almost-perfect scenario is what we would call a “True Positive.”

False Positive

It is assumed that approximately 1 out of 10 convictions is actually a wrongful one in real life.
The person incarcerated did not commit the crime they are accused of. They might have even confessed to it. But unfortunately, they are not the ones.
This is what we would call a false positive result when we, as a society, identified them as guilty of a crime they did not commit.

True Negative

Every once in a while, the justice system is unable to convict a person for a crime. Whatever the reason would be.
Statistically speaking, this happens about 30% of the time, since the US's conviction rate is around 70% on average.

And indeed, sometimes, this person is actually innocent and is not responsible for the crime at hand.
In a case where the defendant was innocent, and a jury found them “Not guilty,” it will be correct to do so. Thus, making the freeman a part of the ~30% non- convicted cases, falling directly under the bucket of the non-convicted True negative section.

False Negative

Sometimes, the system might decide on a non-guilty plea for the actual perpetrator and set a guilty person free. Since somehow along the way, a seed of reasonable doubt was planted, whether due to excellent lawyers or a technicality, The system cannot hold the suspect accountable for the crime. For example, in OJ Simpson's case, it is commonly thought that the trial has missed out on the actual criminal. Thinking wrongfully that he is not the person responsible for the crime. This is what we would call a “False-negative.”

Transforming into Precision & Recall

Precision

Precision is the fraction of relevant results among the retrieved results.
The number of true positives/ all positives. This means that in our example, if we know that 1 out of 10 convictions is a wrongful one, the precision is generally 90%.

Recall

The recall is the fraction of retrieved relevant instances among all relevant instances.
The number of relevant results received/ all relevant results,

This means that for our example, if for10 crimes committed, 7 criminals were rightfully convicted for those crimes (which they are responsible for)x this means that our conviction recall is 70%

Optimizing for people, not for numbers

Now ask yourself, In the justice system, for which of those do you prefer to optimize?

Would you prefer a significantly higher precision rate? one that will make sure that in 99% of certainty a person is the perpetrator of the crime they are accused of, so that only in this level of certainty they will lose their freedom.
This will cause your overall selected results number to become lower, Meaning, fewer people will be defined as guilty, and as a side effect, more guilty people will walk freely out of jail.

Or do you prefer to make sure 90% of all perpetrators are behind bars?
Being “hard on crime”? Cleaning the streets from all bad seeds?
In doing so, you effectively decide that you are ok with sometimes missing out on a few- wrongfully accused individuals, claiming for the greater good. And you need to ask yourself, are their lives a fee you are willing to pay for a safer street?

Summary

The beautiful world of AI products is derived from data-driven tools, specifically meant to help us make decisions. To fully grasp our numbers' impact on people’s lives, we always have to consider all the tradeoffs of our optimization.

Only then, we as a society can optimize for humans instead of numbers.

--

--

Shelly Shmurack
The Startup

Data PM | Product Management Podcaster, Speaker & Mentor