Percentile is closely related to fractile or Quantile
, except for the scaling 1 to 100 on the argument and the possibility that such arguments could be a "Percent"
age unit from Quantity
.
Here I define Percentile
to also accept Quantity
with explicit "Percent"
"Units" and also so it works in operator form.
ClearAll[Percentile];
Percentile[data_List, pc_Quantity]:= Quantile[data, QuantityMagnitude[pc/100, "Percent"]]
Percentile[data_List, pc_]:= Quantile[data, pc/100]
Percentile[pc_]:= Percentile[#,pc]&
Percentile[data, {25,50,75,90}]
(* {1.29,1.48,1.5,1.53} *)
Percentile[data, Quantity[99, "Percent"]]
(* 1.55 *)
Percentile[25] @ data
(* 1.29 *)

Quantile[data, #] & /@ {0.25, 0.5, 0.75, 0.9}
See alsoQuartiles[data]
$\endgroup$Quantile[data, {1/4, 1/2, 3/4, 9/10}]
$\endgroup$"Percent"
is also aQuantity
"Unit". Probably this should not be closed? $\endgroup$