Order statistics of finite tuples #
The k-th order statistic of a tuple x : Fin n → α in a linear order is the entry in
position k once the entries of x are sorted increasingly, keeping repeated values with their
multiplicity. Positions are counted from 0, so position 0 holds the minimum and position
Fin.last _ the maximum. The sort is Tuple.sort, and the order statistics of x are the
entries of the sorted tuple x ∘ Tuple.sort x.
The order statistics are characterized by counting: orderStatistic k x ≤ t exactly
when more than k entries of x are at most t. They commute with monotone maps and are
measurable whenever the binary minimum and maximum operations are measurable.
Main definitions #
TauCeti.orderStatistic— thek-th order statistic of a finite tuple.
Main results #
TauCeti.orderStatistic_comp_of_monotoneOn,TauCeti.orderStatistic_comp_of_monotone— order statistics commute with maps that are monotone on the entries of the tuple;TauCeti.orderStatistic_le_iff,TauCeti.orderStatistic_lt_iff— the counting characterizations;TauCeti.orderStatistic_zero,TauCeti.orderStatistic_last— the extreme order statistics are the minimum and the maximum;TauCeti.measurable_orderStatistic— measurability.
The k-th order statistic of a tuple x : Fin n → α: the entry in position k once the
entries of x are sorted increasingly, repeated values kept with their multiplicity. Positions
are counted from 0, so orderStatistic 0 x is the least entry of x and
orderStatistic (Fin.last _) x the greatest.
Instances For
Applying a map that is monotone on every entry of a tuple commutes with taking an order statistic. No behavior is required away from those entries.
Applying a monotone map to every entry commutes with taking an order statistic.
The order statistics of a tuple do not depend on the order in which its entries are listed.
The counting characterization of order statistics. The k-th order statistic of x is
at most t exactly when more than k entries of x are at most t.
The strict form of TauCeti.orderStatistic_le_iff: the k-th order statistic of x is
below t exactly when more than k entries of x are below t.
The least order statistic is the minimum of the entries.
The greatest order statistic is the maximum of the entries.
The sublevel sets of an order statistic, by the counting characterization
TauCeti.orderStatistic_le_iff.
Each order statistic is a measurable function of the tuple.