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)

Answers


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.


Need Your Help

Why the result is different for twice common-codec md5

java inputstream md5

when I use apache common-codec md5Hex to get the inputstream's md5 result,but get the different result for twice. the example code is below :

Silverlight Toolkit TreeView Drag and Drop

silverlight treeview drag-and-drop

Does any know how to implement drag and drop in the silverlight toolkit's treeview?