الثلاثاء، 24 ديسمبر 2013

How to get a percentile for an empirical data distribution and get it's x-coordinate?

I have some discrete data values, that taken together form some sort of distribution. This is one of them, but they are different with the peak being in all possible locations, from 0 to end. enter image description here

So, I want to use it's quantiles (percentiles) in Python. I think I could write some sort of function, that would some up all values starting from zero, until it reaches desired percent. But probably there is a better solution? For example, to create an empirical distribution of some sort in SciPy and then use SciPy's methods of calculating percentiles?

In the very end I need x-coordinates of a left percentile and a right percentile. One could use 20% and 80% percentiles as an example, I will have to find the best numbers for my case later.

Thank you in advance!


View the original article here

ليست هناك تعليقات:

إرسال تعليق