How can I compute the area under a histogram after a certain value?
I am using this to compute the area under the whole histogram. However I cannot find resources that tell how to calculate the area under the histogram after a value or within a particular interval. Any idea regarding this please? x is my data here and values are the probabilities of occurrence.
area = sum(np.diff(bins)*values)
I believe np.diff(bins) is a 1-d numpy array in which case you can slice it as np.diff(bins)[start:end], and np.diff(bins)[start:] for all values after something.