quantile_categorical


function quantile_categorical(P:Real, ρ:Real[_]) -> Integer

Quantile of a categorical variate.

  • P: The cumulative probability.
  • ρ: Category probabilities.

Return: the quantile.