Last updated

Percentiles

Definition: A percentile tells you the value below which a given percentage of the data falls. The 75th percentile is the value that 75% of the data is below.

Example — using NumPy

NumPy is the core number-crunching library for data and ML. It loads on the first Run:

import numpy as np
ages = [5, 10, 15, 20, 25, 30, 35, 40]
print("25th percentile:", np.percentile(ages, 25))
print("50th (median):  ", np.percentile(ages, 50))
print("90th percentile:", np.percentile(ages, 90))

Where you see percentiles

  • Exam results ("you scored in the 95th percentile")
  • Growth charts for children
  • Spotting outliers (values above the 99th percentile)

💡 Tip: the 50th percentile is exactly the median — a handy way to remember what percentiles mean.

Try it Yourself
Output

          
Ad · responsive