Notes

Quantile

A good way to think about a dataset is as a line of values sorted from smallest to largest. A quantile tells you where you are on that line: it marks a cutoff so that a chosen fraction of the data falls below it.

What a quantile means

Formally, the q-th quantile (often written as the q quantile, where q is between 0 and 1) is a value such that about q × 100% of observations are at or below it. Common special cases have familiar names:

  • Median = 0.50 quantile (50th percentile)
  • Quartiles = 0.25, 0.50, 0.75 quantiles
  • Percentiles = quantiles at 1% steps (e.g., 0.90 quantile = 90th percentile)

In real datasets, quantiles are computed from sorted values, and different software may use slightly different interpolation rules when the cutoff falls between two points.

Intuition and everyday examples

Quantiles are like “score cutoffs” that divide a crowd into proportions:

  • House prices: the 0.75 quantile is the price below which 75% of homes sold; it’s a robust “high-but-not-extreme” benchmark.
  • Exam scores: the 0.90 quantile is the score that only the top 10% exceed.
  • Delivery times: the 0.95 quantile tells you a “95% of packages arrive within this time” promise.

Why quantiles matter in AI/ML

Quantiles show up whenever you care about distribution shape and tails, not just averages:

  • Robust scaling: methods like RobustScaler use the interquartile range (IQR) (0.75 − 0.25) to reduce outlier impact.
  • Quantile regression: models (e.g., gradient boosting variants) can predict the 0.1, 0.5, or 0.9 quantile of a target, giving uncertainty-aware forecasts.
  • Outlier detection: thresholds based on extreme quantiles (like 0.99) flag unusually large values.

Quantile is a value that splits a distribution into equal-probability parts: the p-quantile is the point below which a fraction p of observations fall. Common quantiles include quartiles (25%, 50%, 75%) and percentiles. Quantiles are important in AI/ML for robust summaries, detecting outliers, and setting thresholds without assuming normality. Example: using the 95th percentile of prediction errors to flag anomalous events.

Imagine lining up everyone in a class by height, from shortest to tallest. A quantile is a “cut point” that splits this ordered line into equal-sized groups. For example, the middle student marks the 50% quantile: half the class is shorter and half is taller. The 25% and 75% quantiles split the class into quarters.

In statistics and AI, quantiles help describe how values are spread out in a dataset. They’re useful for spotting unusually high or low values, comparing distributions, and summarizing data beyond just the average.