Re: Bell shaped random number generation

From: Ray Koopman (koopman_at_sfu.ca)
Date: 09/27/04


Date: 27 Sep 2004 01:12:35 -0700

harish_recian@yahoo.com (Harish) wrote in message
news:<a3ef9093.0409252303.74881b55@posting.google.com>...
> I need to write a computer program in which I need to get random
> numbers in a range, that follow an approximation of a bell curve.
> I tell the program that the average is say 20 and also say that
> most of values lie between 15 & 25.
> The range of the values is between 0,100. I have been suggested
> that I would need to look at beta distribution to generate such
> numbers but I could not figure out how to do it.

There are many ways to generate such variables, but you'll have to
be more specific. "Approximation of a bell curve" and "most of the
values" are not specific enough. What kind of deviations from a
"bell curve" are tolerable? For instance, if the mean is not 50,
should the distribution remain symmetric, or can it become skewed?
Do you want values over the full range 0..100 to always be possible,
or would you accept that if the mean is 20, say, then values > 40,
say, might be impossible? Does "most" mean 50% 75%? 90%? 99%? Etc.



Relevant Pages

  • Bell shaped random number generation
    ... I need to write a computer program in which I need to get random ... that follow an approximation of a bell curve. ... this regard ...
    (sci.stat.math)
  • Re: Bell shaped random number generation
    ... > I need to write a computer program in which I need to get random ... And here is another generator of random deviates from the beta distribution. ... FUNCTION GENERATES A RANDOM VARIATE IN ... LOGICAL, SAVE:: swap ...
    (sci.stat.math)
  • Re: need help on this problem.
    ... Oliver Wong wrote: ... you had to simulate throwing the pen, but for this simulation you need Pi, but since you're trying to compute pi, presumably you don't know Pi yet! ... *Perhaps* it is possible to simulate the problem with a very rough approximation of Pi and to get a better approximation of Pi by this. ... in real life, and then write a computer program that kept track of how many line-crosses you got, and approximate Pi that way. ...
    (comp.lang.java.help)