Feb. 2, 2010
1:05 p.m.
Hi all, I'm using numpy.histogram with normed=True with 1D data ranging 0 .. 1. The results return probabilities greater than 1. The trapezoidal integral returns 1, but I'm afraid this is due to the bin assigned values. Example follows:
from numpy import * a = arange(0, 1, 0.1) histogram(a, normed=True) (array([ 1.11111111, 1.11111111, 1.11111111, 1.11111111, 1.11111111, 1.11111111, 1.11111111, 1.11111111, 1.11111111, 1.11111111]), array([ 0. , 0.09, 0.18, 0.27, 0.36, 0.45, 0.54, 0.63, 0.72, 0.81, 0.9 ]))
Is that normal? If not, does anyone encountered that before? Ideas welcome! Thanks, Manos._