Re: Histogram normalization
- To: mathgroup at smc.vnet.net
- Subject: [mg40026] Re: Histogram normalization
- From: Nigel King <king at dircon.co.uk>
- Date: Sun, 16 Mar 2003 02:22:51 -0500 (EST)
- References: <b4s8m4$iei$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
In <b4s8m4$iei$1 at smc.vnet.net> Jdensmor wrote: > Hi all, > I have a list of number {1,3,45,6,4,....etc}, I can make a histogram > of the data, but now I would like to normalize the histogram so that > the area under the histogram is equal to 1. Is there a way to get the > number of bins used in making the histogram and the number of > particles in each bin? Also is there a way to make a function that has > the shape of the histogram? thanks for your help I think the following may do what yo want. In[1]:= Needs["Statistics`DataManipulation`"]; In[2]:= Needs[ "Graphics`Graphics`"]; In[3]:= list = Table[Random[Integer, 20], {100}]; In[4]:= freq = (#*{1/Length[list], 1}) & /@ Frequencies[list]; In[5]:= BarChart[freq]; Nigel