0

I have a set of values randomly distributed in interval [a, b]. How to set a threshold a < c < b such that 80% values of this set are in [a, c]? Supposed that a = minimum value and b = maximum value of this set.

user2863620
  • 635
  • 3
  • 10
  • 17

1 Answers1

3

What you are asking is the 80th percentile of your data set.

There are some code suggestions (both NumPy/SciPy and pure Python) in How do I calculate percentiles with python/numpy?

Community
  • 1
  • 1
NPE
  • 486,780
  • 108
  • 951
  • 1,012