
Machine Learning - Percentiles
What are Percentiles?
A percentile is a statistical measure that indicates the value below which a given percentage of observations in a group of data falls. It helps understand how a particular value compares to the rest of the data
Percentiles are used in statistics to give you a number that describes the value that a given percent of the values are lower than.

In simple words, percentiles are a way to express the relative standing of a value within a dataset, indicating what percentage of the data falls below that value.
For example, if you scored in the 90th percentile on a standardized test, it means you performed better than 90% of the people who took the test.
A percentile is a measure that helps us understand the position or relative standing of a particular value within a dataset. Percentiles help us divide the data into equal-sized groups and determine the position of a value within those groups. For example, if someone’s score is at the 80th percentile, it means they performed better than 80% of the people in the dataset

Example: Let's say we have an array that contains the ages of every person living on a street.
What is the 75. percentile? The answer is 43, meaning that 75% of the people are 43 or younger.
The NumPy module has a method for finding the specified percentile:
Example
Use the NumPy percentile() method to find the percentiles:
import numpy
ages = [5,31,43,48,50,41,7,11,15,39,80,82,32,2,8,6,25,36,27,61,31]
x = numpy.percentile(ages, 75)
print(x)Example
What is the age that 90% of the people are younger than?
import numpy
ages = [5,31,43,48,50,41,7,11,15,39,80,82,32,2,8,6,25,36,27,61,31]
x = numpy.percentile(ages, 90)
print(x)