in reply to Randomly generating histograms

think about the probability distribution you want. some examples are:

* continuously and uniformly distributed (equal distribution over the range)
* continuously and normally distributed (like a bell curve)
* discretely and nonuniformly distributed (like loaded dice)

once you've figured out what you want your data to look like, you can create it using the appropriate function, and tally the results as you go, stopping when you approach your max (within some acceptable error value.)

give it a try, and post your code if you run into trouble.

~Particle ;Þ

Replies are listed 'Best First'.
Re: Re: Randomly generating histograms
by narse (Pilgrim) on Mar 25, 2002 at 16:19 UTC
    Sorry, I should have specified what shape distribution. Ideally each entry would have an equal randomness, so a uniform distribution would be the goal. Unfortunately I'm not much for mathematical logic.