Quantiles of finite labelled laws #
A probability measure on a finite type becomes a finitely supported real law after assigning a real label to every outcome. This file characterizes its quantiles directly from the mass below and at a proposed label. The characterization automatically sorts the distinct labels and aggregates outcomes carrying equal labels.
For any real probability law carried by a finite set, an interior quantile belongs to that set and is its least cumulative crossing. A finite minimum therefore computes it. The lower (upper) endpoint limit is the smallest (largest) candidate whenever that candidate has positive mass.
Main results #
MeasureTheory.Measure.quantile_eq_min'_of_ae_mem_finsetcomputes a quantile by a finite minimum over a carrying set;MeasureTheory.Measure.tendsto_quantile_nhdsGT_zero_of_ae_mem_finsetandMeasureTheory.Measure.tendsto_quantile_nhdsLT_one_of_ae_mem_finsetgive its endpoint limits;MeasureTheory.Measure.quantile_map_finite_eq_iffcharacterizes the quantile by the strict cumulative crossing below a label and the weak crossing at it;MeasureTheory.Measure.tendsto_quantile_map_finite_nhdsGT_zeroandMeasureTheory.Measure.tendsto_quantile_map_finite_nhdsLT_onegive the endpoint limits at the least and greatest labels of positive mass.
The quantile is characterized by the least cumulative crossing among a finite set carrying the law, including levels equal to a cumulative mass.
For a finite carrying set whose smallest point has positive mass, the lower endpoint limit is that point.
For a finite carrying set whose largest point has positive mass, the upper endpoint limit is that point.
A real number is the interior quantile of a probability measure on a finite labelled type exactly when the level lies strictly above the mass below that label and at most the mass at or below it. In particular, the strict inequality forces the answer to be one of the supplied labels with positive total mass.
For a finite labelled law, quantiles tend to any least label of positive mass as the level tends to zero from above. Labels of zero mass do not affect the endpoint.
For a finite labelled law, quantiles tend to any greatest label of positive mass as the level tends to one from below. Labels of zero mass do not affect the endpoint.