quantile_categorical

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

Quantile of a categorical variate.

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

Return: the quantile.