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
  • 619
  • 3
  • 9
  • 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
  • 464,258
  • 100
  • 912
  • 987