Re: Frequency data
- To: mathgroup at smc.vnet.net
- Subject: [mg99713] Re: [mg99690] Frequency data
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Tue, 12 May 2009 03:07:33 -0400 (EDT)
- Reply-to: hanlonr at cox.net
$Version 6.0 for Mac OS X PowerPC (32-bit) (June 19, 2007) Needs["Histograms`"]; n = 1000; data = RandomReal[NormalDistribution[0, 1], {n}]; lb = Floor[5*Min[data]]/5. ub = Ceiling[5*Max[data]]/5. freq = BinCounts[data, {lb, ub, .2}]/n; Total[freq] 1 GraphicsArray[{ Show[{ Histogram[data, HistogramScale -> 1], Plot[PDF[NormalDistribution[0, 1], x], {x, lb, ub}, PlotStyle -> {Red, AbsoluteThickness[2]}]}], Histogram[freq, FrequencyData -> True]}, ImageSize -> 600] Bob Hanlon ---- suhrob.sultanov at gmail.com wrote: ============= Hi everybody, I'm using Mathematica 6.0 and would like to get frequency of data given intervals, i tried to do it with BinCounts[data, h] , where h is the distance of the intervals, but it doesn't work correctly, can anybody help me how to get frquency data Thanks, Sukhrob.