Skip to content

Quantile(fraction) Source

Bases: Statistic

Value below which a given fraction of the values lies.

Quantile(0.9) on salaries gives the salary below which 90 % of people are, and Quantile(0.5) is the median. Missing values are ignored.

Added in version 0.1.0

Parameters:

  • fraction (float)

    Fraction of the values that lie below the result, between 0 and 1 included.

Raises:

Examples:

import numdaplot as ndp

salaries = ndp.Array.from_list([1000, 2000, 3000, 4000, 5000])
salaries.compute(ndp.Quantile(0.9)).to_value()
# 4600.0