MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: histograms of identical distribution is different. maybe binnumber is the problem?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg51386] Re: [mg51298] histograms of identical distribution is different. maybe binnumber is the problem?
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Fri, 15 Oct 2004 02:48:12 -0400 (EDT)
  • Reply-to: hanlonr at cox.net
  • Sender: owner-wri-mathgroup at wolfram.com

Use the HistogramScale option

Needs["Statistics`NormalDistribution`"];

Needs["Graphics`Graphics`"];

Do[
  normdata=RandomArray[NormalDistribution[],10000];
  normdata2=RandomArray[NormalDistribution[],10000];
  DisplayTogether[
    Histogram[normdata,BarEdgeStyle->Hue[0],
      BarStyle->{}, HistogramScale->1],
    Histogram[normdata2,BarStyle->{}, 
      HistogramScale->1]],
  {i,10}]


Bob Hanlon

> 
> From: sean kim <sean_incali at yahoo.com>
To: mathgroup at smc.vnet.net
> Date: 2004/10/14 Thu AM 06:35:12 EDT
> Subject: [mg51386] [mg51298] histograms of identical distribution is different. maybe 
binnumber is the problem?
> 
> i found the code attached below in the archives. it
> will display two histograms without shading in one
> graph.
>  
> note both histograms are generated exactly the same
> way using exactly the same number of sample points.
> 
> for me, at least, it will show a pattern of a few of
> the distributions having a lower number of points
> about the mean. 
> 
> what causes this? I think it has to do with the way
> histograms are made? is there a way to control bin
> width or number in a convenient way? 
> 
> like.. 
> 
> binwidth-> (numberof points)/(whatever bin number you
> want to use)
> 
> Do[
> normdata = RandomArray[NormalDistribution[], 10000]; 
> h1 = Histogram[normdata, BarEdgeStyle -> Hue[0],
> BarStyle -> {}, DisplayFunction -> Identity];
> 
> normdata2 = RandomArray[NormalDistribution[], 10000]; 
> h2 = Histogram[normdata2, BarStyle -> {},
> DisplayFunction -> Identity];
> 
> DisplayTogether[h1, h2], 
> 
> {i, 10}]
> 
> 
> 
> 
> 
> 
> 		
> __________________________________
> Do you Yahoo!?
> Y! Messenger - Communicate in real time. Download now. 
> http://messenger.yahoo.com
> 
> 


  • Prev by Date: Re: Re: Calculus : limits
  • Next by Date: Re: Stats Pack and LocationReport
  • Previous by thread: histograms of identical distribution is different. maybe binnumber is the problem?
  • Next by thread: PDE Notation options (one works the other does not)