Given a sequence of numerical values, estimates the percentile of input.
The percentile is a value on a scale that represents a percentage position in a list of data that can be equal to or below that value: i.e., the 25th percentile is a value below which 25% of observable data points may be found.
List[Float] values - A sequence of numerical values. Accepts both integers and floats. The sequence may not contain None type values. However, passing a None type object instead of a sequence of numerical values will return NaN.
Float percentile - The percentile to compute. A float greater than 0 and less than or equal to 100. Will throw an exception if the percentile is out of bounds.
Float - A value from the given list using the requested percentile of the input, or NaN if the input was empty or null.
Gateway, Vision Client, Perspective Session
# Create a list of values.
values = [3.5, 5.6, 7.4, 3.8]
# Print the 75th percentile.
print system.math.percentile(values, 75)