{
  "id": "quantile",
  "title": "Quantile",
  "lang": "en",
  "source_lang": "en",
  "summary": "A quantile is a value that locates a specified proportion of a probability distribution or ordered dataset below it.",
  "category": "mathematics",
  "subcategory": "probability-statistics",
  "type": "concept",
  "aliases": [
    "Fractile"
  ],
  "generated_at": "2026-11-03",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/quantile/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/quantile/",
      "json": "https://aiwiki.page/zh/quantile.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "A quantile is a value that marks a specified position in a probability distribution or an ordered collection of observations. For a proportion \\(p\\) between zero and one, a \\(p\\)-quantile separates the lower part of the distribution from the upper part: at least a proportion \\(p\\) lies at or below it, and at least a proportion \\(1-p\\) lies at or above it. The median is a \\(0.5\\)-quantile; quartiles, deciles, and percentiles divide distributions into four, ten, and one hundred probability intervals, respectively.\n\nQuantiles are fundamental to statistics because they describe location, spread, asymmetry, and extreme outcomes without requiring a distribution to have a finite mean or variance. They support methods ranging from exploratory graphics and distribution-free inference to simulation, forecasting, and risk measurement. Their apparent simplicity conceals important distinctions: population quantiles may not be unique, different sample-quantile conventions can give different numerical answers, and uncertainty increases sharply when estimating quantiles in sparsely observed tails."
    },
    {
      "heading": "Mathematical definition and inverse-distribution interpretation",
      "text": "Let \\(X\\) be a real-valued random variable with cumulative distribution function\n\n\\[F(x)=\\Pr(X\\le x).\\]\n\nFor \\(0<p<1\\), a number \\(q\\) is a \\(p\\)-quantile if\n\n\\[\\Pr(X<q)\\le p \\quad\\text{and}\\quad \\Pr(X\\le q)\\ge p.\\]\n\nWriting \\(F(q-)=\\Pr(X<q)\\), these conditions become\n\n\\[F(q-)\\le p\\le F(q).\\]\n\nThey accommodate continuous distributions, distributions with point masses, and mixtures of both. They are also equivalent to requiring \\(\\Pr(X\\le q)\\ge p\\) and \\(\\Pr(X\\ge q)\\ge 1-p\\).\n\nA standard way to choose one quantile at every probability level is the lower quantile function\n\n\\[Q(p)=\\inf\\{x\\in\\mathbb R:F(x)\\ge p\\}, \\qquad 0<p<1.\\]\n\nThis is a generalized inverse function, not necessarily an ordinary inverse. A cumulative distribution function can have flat portions or jumps and therefore need not be one-to-one or onto the whole interval \\((0,1)\\). Nevertheless, its lower quantile function satisfies the useful equivalence\n\n\\[Q(p)\\le x \\quad\\Longleftrightarrow\\quad p\\le F(x).\\]\n\nConsequently, \\(Q\\) is nondecreasing. With this convention it is left-continuous on \\((0,1)\\).\n\nNonuniqueness arises when a distribution has a gap at exactly the relevant cumulative probability. Suppose \\(X\\) equals \\(0\\) or \\(1\\), each with probability \\(1/2\\). Every \\(q\\in[0,1]\\) satisfies the definition of a median, whereas the lower quantile function selects \\(Q(0.5)=0\\). At other levels it gives \\(Q(p)=0\\) for \\(p\\le 0.5\\) and \\(Q(p)=1\\) for \\(p>0.5\\). Thus a quantile as a set of admissible values must be distinguished from a particular quantile-function convention.\n\nIf \\(F\\) is continuous and strictly increasing, these complications disappear: there is a unique solution to \\(F(q)=p\\), and \\(Q(p)=F^{-1}(p)\\). Continuity alone does not guarantee uniqueness, because a continuous cumulative distribution function may be constant over an interval. Conversely, an atom can make one value serve as the quantile for an entire range of probability levels.\n\nThe endpoint levels \\(p=0\\) and \\(p=1\\) require separate conventions. They are often defined through one-sided limits of \\(Q(p)\\), producing the essential lower and upper endpoints of the distribution, possibly \\(-\\infty\\) or \\(+\\infty\\). Directly substituting \\(p=0\\) into the infimum formula above would generally produce \\(-\\infty\\), even for a bounded distribution, so endpoint definitions should not be left implicit."
    },
    {
      "heading": "Named quantiles and distributional examples",
      "text": "A percentile is a quantile whose probability level is expressed as a percentage: the 90th percentile corresponds to \\(p=0.90\\). The first, second, and third quartiles correspond to \\(p=0.25\\), \\(0.50\\), and \\(0.75\\), while the nine interior decile cutoffs correspond to \\(p=0.1,\\ldots,0.9\\). In some settings, “quartile” also denotes one of the four groups created by the cutoffs. A statement about the “top quartile” usually concerns the highest quarter of observations rather than a single numerical value.\n\nFor a uniform distribution on \\([a,b]\\), the quantile function is\n\n\\[Q(p)=a+(b-a)p.\\]\n\nEqual probability increments therefore correspond to equal increments on the measurement scale. This is exceptional rather than typical. In most distributions, equal-probability groups have unequal widths because probability is concentrated more densely in some regions than in others.\n\nFor a normal distribution with mean \\(\\mu\\) and standard deviation \\(\\sigma>0\\),\n\n\\[Q(p)=\\mu+\\sigma\\Phi^{-1}(p),\\]\n\nwhere \\(\\Phi\\) is the standard normal cumulative distribution function. The standard normal 2.5th and 97.5th percentiles are approximately \\(-1.95996\\) and \\(1.95996\\). Its first and third quartiles are approximately \\(-0.67449\\) and \\(0.67449\\). Symmetry implies that the median equals \\(\\mu\\), but the unequal spacing between successive tail quantiles reflects decreasing probability density away from the center.\n\nFor an exponential distribution with rate \\(\\lambda>0\\),\n\n\\[Q(p)=-\\frac{\\log(1-p)}{\\lambda}.\\]\n\nIts median is \\(\\log 2/\\lambda\\), smaller than its mean \\(1/\\lambda\\). The distinction records the distribution's right skewness: a relatively small proportion of large observations pulls the mean above the median. A doubling of the probability level does not correspond to a doubling of the quantile, and high percentiles become increasingly widely separated.\n\nDiscrete examples emphasize a different feature. For a Bernoulli distribution with success probability \\(\\theta\\), the lower quantile is \\(0\\) when \\(p\\le 1-\\theta\\) and \\(1\\) when \\(p>1-\\theta\\). It is generally impossible to choose a cutoff leaving exactly \\(p\\) of the probability strictly below it. Accordingly, a reported percentile need not have precisely its named percentage of observations below the reported value when ties or atoms are present.\n\nQuantiles also exist for distributions whose moments do not. The standard Cauchy distribution has\n\n\\[Q(p)=\\tan\\!\\left[\\pi\\left(p-\\frac12\\right)\\right].\\]\n\nIts median is zero, and its quartiles are \\(-1\\) and \\(1\\), although its mean and variance are undefined. Quantile-based descriptions therefore remain meaningful in circumstances where familiar moment-based summaries fail."
    },
    {
      "heading": "Sample quantiles and interpolation conventions",
      "text": "For observations \\(x_1,\\ldots,x_n\\), write their sorted values as\n\n\\[x_{(1)}\\le x_{(2)}\\le\\cdots\\le x_{(n)}.\\]\n\nThese sorted observations are order statistics. The empirical distribution function is\n\n\\[F_n(x)=\\frac1n\\sum_{i=1}^{n}\\mathbf 1\\{x_i\\le x\\},\\]\n\nwhere \\(\\mathbf 1\\) is an indicator function. Applying the lower generalized inverse directly gives\n\n\\[Q_n(p)=x_{(\\lceil np\\rceil)}, \\qquad 0<p<1.\\]\n\nThis “nearest-rank” rule selects an observed value and treats every observation as carrying probability mass \\(1/n\\).\n\nMany commonly used sample quantiles instead interpolate between neighboring order statistics. One widespread convention sets\n\n\\[h=1+(n-1)p,\\qquad j=\\lfloor h\\rfloor,\\qquad \\gamma=h-j\\]\n\nand, when \\(j<n\\), defines\n\n\\[\\widehat Q(p)=(1-\\gamma)x_{(j)}+\\gamma x_{(j+1)}.\\]\n\nAt the upper endpoint it returns \\(x_{(n)}\\). This convention places the sample minimum and maximum at probability levels zero and one. Other conventions use different positions, such as \\(h=(n+1)p\\), together with explicit rules near the endpoints.\n\nThe distinctions can be substantial in small samples. For the ordered data \\(1,2,3,4\\), the lower empirical 25th percentile is \\(1\\), whereas the interpolation rule \\(h=1+(n-1)p\\) gives \\(1.75\\). At the median, the lower empirical inverse gives \\(2\\), while the usual average-of-the-two-middle-values convention gives \\(2.5\\). Neither numerical difference is an arithmetic error: the procedures define different sample summaries and different estimators of a population quantile.\n\nRob J. Hyndman and Yanan Fan systematized these differences in 1996 by describing nine sample-quantile types. The classification includes three discontinuous rules and six rules based on interpolation. Their type 7 is the \\(1+(n-1)p\\) convention; type 8 uses interpolation positions designed to give approximately median-unbiased quantile estimates across distributions. Software can therefore agree on the observations and probability level while disagreeing on the answer because its quantile type differs.\n\nWeights add a further convention. With nonnegative weights \\(w_i\\) having positive total, a natural weighted empirical distribution is\n\n\\[F_w(x)= \\frac{\\sum_i w_i\\mathbf 1\\{x_i\\le x\\}}{\\sum_i w_i}.\\]\n\nIts generalized inverse defines a weighted quantile. Integer frequency weights can represent repeated observations, while survey weights may represent unequal inclusion probabilities. Interpolated weighted quantiles are not standardized by this formula alone. Moreover, weights that recover a population distribution do not automatically supply valid uncertainty estimates; those also depend on the sampling design."
    },
    {
      "heading": "Sampling variability and statistical inference",
      "text": "A sample quantile is an estimator, and repeated samples produce different values. Its sampling behavior depends strongly on the amount of probability near the target population quantile. A densely populated region permits small measurement-scale errors even when the estimated probability rank fluctuates. In a sparse tail, the same rank fluctuation can correspond to a much larger numerical error.\n\nSuppose independent observations share a continuous distribution \\(F\\), the \\(p\\)-quantile \\(q_p\\) is unique, and the density \\(f\\) is continuous and positive at \\(q_p\\). Under standard regularity conditions,\n\n\\[\\sqrt n\\,(\\widehat q_p-q_p) \\ \\xrightarrow{d}\\ N\\!\\left(0,\\frac{p(1-p)}{f(q_p)^2}\\right).\\]\n\nThus an approximate standard error is\n\n\\[\\operatorname{SE}(\\widehat q_p) \\approx \\frac{\\sqrt{p(1-p)}}{\\sqrt n\\,f(q_p)}.\\]\n\nThe result follows by combining the fluctuation of the empirical proportion below \\(q_p\\) with a local linear approximation to \\(F\\). The density acts as the conversion factor between probability error and measurement error.\n\nFor a normal population, the sample median has asymptotic variance \\(\\pi\\sigma^2/(2n)\\), compared with \\(\\sigma^2/n\\) for the sample mean. Its asymptotic efficiency relative to the mean in that model is therefore \\(2/\\pi\\), approximately \\(0.637\\). This comparison is model-specific. In heavier-tailed distributions the median can be substantially more stable, and the mean may not even have a finite sampling variance.\n\nExact distribution-free confidence intervals can be constructed from order statistics without estimating a density. If \\(F\\) is continuous and \\(F(q_p)=p\\), the number \\(B\\) of sample observations below \\(q_p\\) has the binomial distribution with parameters \\(n\\) and \\(p\\). Consequently,\n\n\\[\\Pr\\{X_{(r)}\\le q_p\\le X_{(s)}\\} = \\Pr\\{r\\le B\\le s-1\\}.\\]\n\nChoosing \\(r\\) and \\(s\\) from binomial probabilities yields an interval with known coverage. Because the available ranks are discrete, the achieved coverage often exceeds the nominal target rather than equaling it exactly.\n\nFor continuous \\(F\\), the transformed order statistic \\(F(X_{(k)})\\) has a beta distribution with parameters \\(k\\) and \\(n+1-k\\). This gives another route to rank-based inference and clarifies why extreme quantiles require large samples: only a small number of observations inform the far tail. If \\(p=0.999\\), a sample of 1,000 contains only one expected observation above the target quantile.\n\nThe normal approximation can fail when the density vanishes, the distribution has an atom, or the target probability approaches an endpoint as sample size changes. Dependence also matters: a time series generally does not have the same quantile variance as an independent sample. Bootstrap procedures can estimate uncertainty in many regular cases, but their validity is not automatic for irregular quantiles, extreme order statistics, or dependent observations."
    },
    {
      "heading": "Robust description, spread, and graphical displays",
      "text": "Quantiles provide a compact description of a distribution without assuming symmetry. The five-number summary consists of the minimum, first quartile, median, third quartile, and maximum. Its central three values distinguish overall location from the spread of the middle half of the data, while the extremes give additional information about the observed range. Unlike a mean-and-standard-deviation summary, it does not imply that distances above and below the center have similar interpretations.\n\nThe interquartile range is\n\n\\[\\operatorname{IQR}=Q(0.75)-Q(0.25).\\]\n\nIt measures the width of the central half of a distribution. For normal data, the population IQR is approximately \\(1.34898\\sigma\\), so dividing a sample IQR by \\(1.34898\\) gives a normal-calibrated scale estimate. That calibration is not universal: for other distributional shapes, the ratio of IQR to standard deviation differs, and the standard deviation may be undefined.\n\nThe box plot, closely associated with John Tukey's exploratory data analysis and his 1977 book Exploratory Data Analysis, visualizes quartile-based summaries. A common version draws a box from the first to the third quartile, marks the median, and extends whiskers to the most extreme observations within \\(1.5\\) IQR of the box. More distant observations are plotted separately. These points are flags under a graphical convention, not automatically measurement errors or statistically significant anomalies. Other box-plot variants use different whiskers or quartile calculations.\n\nQuantiles are resistant to the magnitudes of a limited number of extreme observations because their primary dependence is on rank. Replacing the largest observation by a value a million times larger leaves many central quantiles unchanged. Resistance nevertheless has limits. The asymptotic replacement breakdown fraction of a fixed \\(p\\)-quantile is approximately \\(\\min(p,1-p)\\); the median has the maximal central value of one half, while a 99th percentile can be driven arbitrarily upward by contamination of roughly one percent. This is one reason robustness claims about “quantiles” should specify which quantiles are involved.\n\nFor a continuous distribution with positive density at \\(q_p\\), the local effect of adding a small amount of contamination at \\(x\\) is described, away from the cutoff, by\n\n\\[\\operatorname{IF}(x;Q_p,F) = \\frac{p-\\mathbf 1\\{x\\le q_p\\}}{f(q_p)}.\\]\n\nThis influence function is bounded in \\(x\\), unlike the influence function of the mean. Its magnitude can still be large when \\(f(q_p)\\) is small.\n\nQuantile-based asymmetry measures compare corresponding distances from the median. Bowley's quartile skewness is\n\n\\[\\frac{Q(0.75)+Q(0.25)-2Q(0.5)} {Q(0.75)-Q(0.25)},\\]\n\nwhen the denominator is positive. It focuses on the central half of the distribution and may miss asymmetry confined to more distant tails. The choice of probability levels therefore determines which aspects of shape a quantile summary reveals."
    },
    {
      "heading": "Loss minimization and quantile regression",
      "text": "Quantiles have a decision-theoretic characterization through an asymmetric loss function. For \\(0<p<1\\), define the check loss, also called pinball loss, by\n\n\\[\\rho_p(u)=u\\bigl(p-\\mathbf 1\\{u<0\\}\\bigr).\\]\n\nEquivalently, \\(\\rho_p(u)=pu\\) for \\(u\\ge0\\), and \\(\\rho_p(u)=(1-p)(-u)\\) for \\(u<0\\). If \\(u=y-a\\), underprediction and overprediction receive different linear penalties. At \\(p=0.5\\), the loss is one half of the absolute error.\n\nWhen the expected loss is finite, the minimizers of\n\n\\[a\\longmapsto \\mathbb E[\\rho_p(Y-a)]\\]\n\nare precisely the \\(p\\)-quantiles of \\(Y\\). At a candidate \\(a\\), the interval between the left and right derivatives of expected loss is\n\n\\[[F(a-)-p,\\ F(a)-p].\\]\n\nA minimum occurs exactly when this interval contains zero, recovering \\(F(a-)\\le p\\le F(a)\\). If the distribution is continuous at the minimizer, the condition simplifies to \\(F(a)=p\\). This characterization also explains quantile nonuniqueness when expected loss is flat over an interval.\n\nQuantile regression extends this idea to conditional distributions. Roger Koenker and Gilbert Bassett introduced regression quantiles in 1978. In a linear specification,\n\n\\[Q_{Y\\mid X=x}(p)=x^{\\mathsf T}\\beta_p,\\]\n\nand the coefficient estimate minimizes\n\n\\[\\sum_{i=1}^{n} \\rho_p(y_i-x_i^{\\mathsf T}\\beta).\\]\n\nThe objective is convex and piecewise linear, and it can be represented as a linear programming problem. At \\(p=0.5\\), the method becomes least absolute deviations regression.\n\nUnlike ordinary mean regression, quantile regression can describe how predictors relate differently to the lower, middle, and upper parts of an outcome distribution. For example, a predictor may be associated with a modest change in median expenditure but a much larger change in the 90th percentile. Such a pattern can indicate changing dispersion or asymmetric conditional responses. Coefficients are associations within the specified model, not automatically causal effects.\n\nA fitted conditional quantile at the average covariate value is generally not the unconditional population quantile. Quantiles do not average linearly across subpopulations, and the quantile of a mixture must be obtained from the mixture distribution. Moreover, fitting separate regressions at several probability levels can produce crossing curves, with an estimated 90th percentile falling below an estimated median for some covariates. Joint constraints, monotone rearrangement, and other noncrossing methods address this incompatibility.\n\nPinball loss also evaluates probabilistic forecasts: expected loss is minimized by the corresponding true quantile. A forecast labeled “90th percentile” is therefore assessed not merely as a large point prediction but as an estimate of a particular feature of the predictive distribution. Calibration, predictive sharpness, and performance across covariate groups remain distinct aspects of forecast quality."
    },
    {
      "heading": "Transformations, simulation, and integral identities",
      "text": "Quantiles behave naturally under increasing transformations. If \\(g\\) is continuous and strictly increasing on the relevant support, then\n\n\\[Q_{g(X)}(p)=g(Q_X(p)).\\]\n\nFor example, exponentiating the quantiles of a normal variable produces the quantiles of the corresponding lognormal variable. This equivariance is one reason quantiles are useful on measurement scales related by logarithms or other monotone changes. Means generally do not have the same property: \\(\\mathbb E[g(X)]\\) need not equal \\(g(\\mathbb E[X])\\).\n\nFor a strictly decreasing transformation, probability levels reverse. Under conditions ensuring unique quantiles,\n\n\\[Q_{g(X)}(p)=g(Q_X(1-p)).\\]\n\nWith atoms or nonunique quantiles, the exact formula must distinguish lower from upper quantile conventions. Even for increasing transformations, interpolation can complicate sample calculations. An order-statistic quantile transforms exactly under a strictly increasing map, but an interpolated quantile generally does not, because nonlinear transformation and linear interpolation do not commute.\n\nThe quantile function is the basis of inverse transform sampling. If \\(U\\) has the uniform distribution on \\((0,1)\\), then\n\n\\[X=Q(U)\\]\n\nhas cumulative distribution function \\(F\\). Indeed,\n\n\\[\\Pr(Q(U)\\le x)=\\Pr(U\\le F(x))=F(x).\\]\n\nThe construction remains valid for discrete and mixed distributions, not only for distributions with ordinary inverse cumulative functions. Flat intervals of \\(Q\\) reproduce atoms with the correct probabilities.\n\nThe related probability integral transform runs in the opposite direction. When \\(F\\) is continuous, \\(F(X)\\) is uniform on \\((0,1)\\). For a discrete distribution this is false: \\(F(X)\\) takes only particular cumulative-probability values. Randomization within jumps restores uniformity. If \\(V\\) is an independent uniform variable, then\n\n\\[F(X-)+V\\bigl(F(X)-F(X-)\\bigr)\\]\n\nis uniform. This distinction matters when evaluating probability forecasts for counts or categorical outcomes.\n\nQuantiles also give integral representations of expectations. For an integrable random variable,\n\n\\[\\mathbb E[X]=\\int_0^1 Q(p)\\,dp.\\]\n\nMore generally, whenever the relevant expectations exist,\n\n\\[\\mathbb E[h(X)]=\\int_0^1 h(Q(p))\\,dp.\\]\n\nThese identities follow from the fact that \\(Q(U)\\) and \\(X\\) have the same distribution. They show that the full quantile function contains all the information needed to compute distributional averages, even though a small selected set of quantiles does not.\n\nUsing the same uniform variable to generate \\(Q_F(U)\\) and \\(Q_G(U)\\) creates an ordered coupling of two distributions. This construction is useful in Monte Carlo comparisons because shared randomness can reduce the variability of differences between simulated systems. Its effectiveness depends on how the simulated outputs respond to their common random input."
    },
    {
      "heading": "Algorithms and large-scale computation",
      "text": "For a finite dataset, computing a single exact order-statistic quantile does not require a complete sort. Sorting all \\(n\\) observations takes \\(O(n\\log n)\\) comparisons in standard comparison-based algorithms and makes subsequent quantile queries straightforward. Selection algorithms can instead find the observation at a chosen rank in linear expected time. An interpolated quantile requires at most the relevant neighboring order statistics rather than the full ordering.\n\nQuickselect, derived from partition-based sorting, has expected linear running time with suitable pivot selection but quadratic worst-case behavior in its basic form. The deterministic median-of-medians selection algorithm, published by Manuel Blum, Robert Floyd, Vaughan Pratt, Ronald Rivest, and Robert Tarjan in 1973, achieves worst-case linear time. Practical implementations often use hybrid strategies because constants, memory access patterns, and the number of requested quantiles affect performance as much as asymptotic bounds.\n\nFor a theoretical distribution, computing \\(Q(p)\\) is usually a numerical inversion problem. If \\(F\\) can be evaluated, bisection finds a solution by repeatedly narrowing a bracket. Where a smooth positive density is available, Newton's method uses\n\n\\[x_{k+1} = x_k-\\frac{F(x_k)-p}{f(x_k)}.\\]\n\nSafeguarded methods combine rapid local updates with bracketing to avoid divergence or invalid iterates. Discrete distributions instead require searching for the smallest value whose cumulative probability reaches the target.\n\nExtreme probabilities introduce floating-point difficulties. Computing \\(1-F(x)\\) by subtraction can lose significant digits when \\(F(x)\\) is close to one. Reliable libraries therefore provide survival functions and inverse survival functions, which work directly with upper-tail probabilities. Similarly, logarithmic probability calculations can avoid underflow. A numerical method may be accurate in probability space yet inaccurate on the measurement scale when the density near the quantile is very small.\n\nStreaming data require a different compromise because storing and sorting every observation may be infeasible. Quantile sketches maintain compact summaries that answer approximate rank queries. The Greenwald–Khanna algorithm, introduced in 2001, gives deterministic rank-error guarantees using space that grows much more slowly than the data volume. The KLL sketch, introduced in 2016 by Zohar Karnin, Kevin Lang, and Edo Liberty, uses randomized compaction to obtain strong space–accuracy tradeoffs. Other summaries, including t-digest, emphasize practical accuracy for tail queries.\n\nA rank guarantee is not an absolute-error guarantee. An estimated quantile whose rank differs from the target by at most \\(\\varepsilon n\\) can still be numerically far from the true sample quantile if the surrounding observations are widely separated. Distributed computation also cannot generally recover a global quantile by averaging local quantiles. Exact combination requires sufficient distributional information; approximate combination relies on summaries with defined merge behavior."
    },
    {
      "heading": "Applications to risk, forecasting, and reference limits",
      "text": "Quantiles often arise when decisions depend on asymmetric consequences. In the classical single-period inventory problem, underage costs arise from stocking too little and overage costs from stocking too much. If these marginal costs are \\(c_u\\) and \\(c_o\\), respectively, an optimal stock level under the standard linear-cost model is a demand quantile at level\n\n\\[p=\\frac{c_u}{c_u+c_o}.\\]\n\nThe target is therefore determined by the relative costs, not necessarily by the median or mean demand. This is a direct operational interpretation of quantile loss minimization.\n\nIn finance, value at risk at level \\(p\\) is commonly defined as the \\(p\\)-quantile of a loss distribution, under a specified sign convention and time horizon. A 99% value-at-risk threshold identifies a loss level reached or exceeded only in the upper tail, subject to the treatment of atoms. It does not describe how large losses are once that threshold has been crossed. Because quantiles can behave irregularly when portfolios are combined, value at risk is not subadditive for all loss distributions.\n\nExpected shortfall adds information about the upper tail. A standard quantile-based definition is\n\n\\[\\operatorname{ES}_p = \\frac{1}{1-p}\\int_p^1 Q_L(u)\\,du,\\]\n\nwhen the integral is finite. For a continuous loss distribution with no problematic atom at the threshold, this corresponds to an average of losses in the worst \\(1-p\\) fraction. For discrete losses, the integral definition allocates only the necessary portion of probability at the cutoff; simply conditioning on losses strictly exceeding value at risk can give a different quantity.\n\nIn forecasting, lower and upper predictive quantiles form a prediction interval. An equal-tailed interval with nominal coverage \\(1-\\alpha\\) uses the \\(\\alpha/2\\) and \\(1-\\alpha/2\\) quantiles of a predictive distribution. It concerns a future outcome, whereas a confidence interval concerns an unknown parameter. Predictive quantiles must account for the conditioning information and, depending on the modeling framework, parameter uncertainty. Equal-tailed intervals are not necessarily the shortest intervals with the same probability content.\n\nIn environmental analysis, high quantiles describe unusually large rainfall, river discharge, or temperature. If independent annual maxima follow a stable distribution, the quantile \\(Q(1-1/T)\\) is called a \\(T\\)-year return level. This means an annual exceedance probability of \\(1/T\\), not a guarantee of one exceedance in every \\(T\\) years. Under the independence model, the probability of at least one exceedance in \\(T\\) years is \\(1-(1-1/T)^T\\). Trends or dependence change this interpretation.\n\nReference limits and growth charts also use quantiles to locate an observation relative to a defined population. A percentile rank is descriptive: its meaning depends on age, measurement procedure, population composition, and other conditioning variables. It is not by itself a diagnosis or an assessment of desirability. In computing systems, analogous percentile summaries describe response times: a low median latency can coexist with a high 99th-percentile latency, revealing delays that an average alone may conceal."
    },
    {
      "heading": "Distributional comparison and multivariate extensions",
      "text": "Entire quantile functions can be compared rather than reduced to a few cutoffs. A quantile–quantile plot, or Q–Q plot, places quantiles of one distribution against corresponding quantiles of another. If the distributions differ only by location and positive scale, their population Q–Q relation is a straight line. Curvature indicates other differences in shape, such as asymmetric tails or heavier tail behavior. Finite-sample tail points are especially variable because they depend on relatively few observations.\n\nIf\n\n\\[Q_X(p)\\le Q_Y(p) \\quad\\text{for every }0<p<1,\\]\n\nthen \\(X\\) is smaller than \\(Y\\) in the usual first-order stochastic order. Equivalently,\n\n\\[F_X(x)\\ge F_Y(x) \\quad\\text{for every }x.\\]\n\nThus quantile comparisons express a distribution-wide ordering, not merely a comparison of means or medians. Two distributions may have the same median while their quantile functions cross repeatedly, leaving neither stochastically larger than the other.\n\nQuantiles also yield a particularly simple formula for the one-dimensional Wasserstein distance. For \\(r\\ge1\\), assuming finite \\(r\\)th moments,\n\n\\[W_r(F,G)^r = \\int_0^1 |Q_F(p)-Q_G(p)|^r\\,dp.\\]\n\nThe monotone coupling \\(Q_F(U),Q_G(U)\\) attains the minimum transportation cost for the cost function \\(|x-y|^r\\). The formula connects rank matching with optimal transport: equal probability positions are paired, and the distance measures the amount of displacement required to transform one distribution into the other.\n\nA related identity for \\(r=1\\) is\n\n\\[W_1(F,G) = \\int_{-\\infty}^{\\infty}|F(x)-G(x)|\\,dx = \\int_0^1|Q_F(p)-Q_G(p)|\\,dp.\\]\n\nIt gives equivalent ways to measure distributional separation in cumulative-probability space and measurement space. The equality depends on working with the full distributions; a small collection of matching percentiles does not establish equality or close proximity between distributions.\n\nExtending quantiles to several dimensions is more difficult because vectors have no single natural total ordering. Coordinatewise quantiles summarize marginal distributions but omit dependence. Even if each of two coordinates is below its own 95th percentile with probability \\(0.95\\), the probability that both are below their respective cutoffs depends on their joint distribution. A rectangle formed from marginal cutoffs therefore does not automatically have the corresponding joint coverage.\n\nDifferent multivariate constructions preserve different features of the one-dimensional concept. Depth-based methods produce nested central regions; directional methods examine quantiles of projections; spatial methods generalize median-like optimization criteria; and transport-based methods map a reference distribution into the target distribution. These constructions need not agree, and there is no universally preferred multivariate quantile. The choice reflects whether the application prioritizes centrality, directional extremes, geometric invariance, or a particular probability-transport interpretation."
    }
  ],
  "links": [
    "probability-distribution",
    "median",
    "statistics",
    "variance",
    "random-variable",
    "cumulative-distribution-function",
    "inverse-function",
    "uniform-distribution",
    "normal-distribution",
    "exponential-distribution",
    "bernoulli-distribution",
    "cauchy-distribution",
    "indicator-function",
    "estimator",
    "probability-density-function",
    "standard-error",
    "sample-mean",
    "confidence-interval",
    "binomial-distribution",
    "beta-distribution",
    "time-series",
    "bootstrap-sampling",
    "interquartile-range",
    "box-plot",
    "loss-function",
    "linear-programming",
    "linear-regression",
    "inverse-transform-sampling",
    "monte-carlo-method",
    "newtons-method",
    "floating-point-arithmetic",
    "expected-shortfall",
    "prediction-interval",
    "wasserstein-distance"
  ],
  "sources": [],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}