# Quantile Loss

> Source: https://modeladay.com/models/quantile-loss/
> Category: principle | Topics: science, decision, risk | Difficulty: 3/5

## Definition

Quantile loss weights underestimates and overestimates by the requested quantile. At the 80th percentile, each unit of underprediction costs 0.8, each unit of overprediction costs 0.2 and an exact match costs zero.

## Core Rule

Quantile loss weights underestimates and overestimates by the requested quantile. At the 80th percentile, each unit of underprediction costs 0.8, each unit of overprediction costs 0.2 and an exact match costs zero.

## Opening Context

A forecasting contest took Walmart's sales history and turned it into a set of questions. Teams had to say how many items would sell and wait for the real figures to come in.

Two forecasts could miss by four items and earn different scores. Quantile Loss charges one rate for each item you miss by underestimating and another for each item you miss by overestimating.

In a stockroom, four items left over are a different problem from four items you can't sell because they're gone. Let's work through the contest's scorecard and see which part of that decision it can help with.

## How It Works (Preview)

In the uncertainty track of the M5 forecasting competition, the organizers handed out Walmart's earlier sales figures. They asked teams to turn in nine quantiles for future sales. The forecasts included a middle figure and numbers out toward either end.

Take the seventy-fifth percentile. You want a number that actual sales have at least a three-in-four chance of staying at or below, given what you know when you forecast. With whole items, choose the smallest number that meets that target.

## When It Fails (Preview)

The judges were settling a contest, and you've still got a stockroom to run. Before using those scores to place an order, make sure the scoring rule looks enough like the way your bills arrive.

## Full Lesson, Audio & Practice

Get the full Quantile Loss breakdown, 5-minute audio lesson, interactive mechanism animation, and decision checklist in the ConceptFlow app:
- iOS App Store: https://apps.apple.com/app/conceptflow-mental-models/id6756862333
- Google Play: https://play.google.com/store/apps/details?id=com.juxianyp.conceptflow
- Web page: https://modeladay.com/models/quantile-loss/

## Related Mental Models

- [Brier Score](https://modeladay.com/models/brier-score/)
- [Expected Value of Sample Information](https://modeladay.com/models/expected-value-of-sample-information/)
- [Split Conformal Prediction](https://modeladay.com/models/split-conformal-prediction/)
