hist normalise error?

I want to plot the probability density function, but hist(…,normed=1,…) does not work as expected.

Here is the code (with ipython line prompts):

In [69]: n, bins, patches = hist(data, bins = 100, normed = 1)
[ 0.12485649, 0.03013777, 0.03874856, 0. , 0.00861079, 0. ,
0. , 0. , 0. , 0. , 0.0043054 , 0.0043054 ,
0. , 0. , 0.0043054 , 0. , 0. , 0. ,

  1.    , 0.        , 0.        , 0.0043054 , 0.        , 0.        ,
    0.        , 0.        , 0.        , 0.        , 0.        , 0.        ,
    0.        , 0.        , 0.        , 0.        , 0.        , 0.        ,
     0.        ,
    
  2.    , 0.        , 0.        , 0.        , 0.        ,
    0.        , 0.        , 0.        , 0.        , 0.        , 0.        ,
    0.        , 0.        , 0.        , 0.        , 0.        , 0.        ,
     0.        ,
    
  3.    , 0.        , 0.        , 0.        , 0.        ,
    0.        , 0.        , 0.        , 0.        , 0.        , 0.        ,
    0.        , 0.        , 0.        , 0.        , 0.        , 0.        ,
     0.        ,
    
  4.    , 0.        , 0.        , 0.        , 0.        ,
    0.        , 0.        , 0.        , 0.        , 0.        , 0.        ,
    0.        , 0.        , 0.        , 0.        , 0.        , 0.        ,
     0.        ,
    
  5.    , 0.        , 0.        , 0.        , 0.        ,
    0.        , 0.        , 0.        , 0.0043054 ,]
    

In [72]: sum(n)
Out[72]: 0.22388059701492535

Should this not sum to 1.0 for it to be a PDF?
Thanks

The data used
is:
Out[66]:
[3.3333333333333335,
3.3333333333333335,
3.3333333333333335,
3.3333333333333335,
3.3333333333333335,
3.3333333333333335,
3.3333333333333335,
3.3333333333333335,
3.3333333333333335,
5.5555555555555554,
5.5555555555555554,
5.5555555555555554,
5.5555555555555554,
5.5555555555555554,
5.5555555555555554,
5.5555555555555554,
5.5555555555555554,
5.5555555555555554,
5.5555555555555554,
5.5555555555555554,
5.5555555555555554,
5.5555555555555554,
5.5555555555555554,
5.5555555555555554,
5.5555555555555554,
5.5555555555555554,
5.5555555555555554,
6.666666666666667,
6.666666666666667,
11.111111111111111,
11.111111111111111,
11.111111111111111,
11.111111111111111,
11.111111111
111111,
11.111111111111111,
11.111111111111111,
12.5,
12.5,
12.5,
12.5,
16.666666666666664,
16.666666666666664,
16.666666666666664,
16.666666666666664,
16.666666666666664,
22.222222222222221,
22.222222222222221,
50.0,
56.666666666666664,
66.666666666666657,
100.0,
450.0]

···

Want to start your own business? Learn how on Yahoo! Small Business.

hist?

...
Docstring:
    HIST(x, bins=10, normed=0, bottom=0,
         align='edge', orientation='vertical', width=None, **kwargs)
    Compute the histogram of x. bins is either an integer number of
    bins or a sequence giving the bins. x are the data to be binned.
    The return values is (n, bins, patches)
    If normed is true, the first element of the return tuple will
    be the counts normalized to form a probability density, ie,
    n/(len(x)*dbin)
    align = 'edge' | 'center'. Interprets bins either as edge
    or center values
    orientation = 'horizontal' | 'vertical'. If horizontal, barh
    will be used and the "bottom" kwarg will be the left edges.
    width: the width of the bars. If None, automatically compute
    the width.
    kwargs are used to update the properties of the
    hist bars

In your example, len(x)=52, and dbins=bin[1]-bin[0]=4.4666666666667, which
gives:
n.sum() * dbins = 1