Re: Bell-curve distribution wanted
- From: "Nick" <tulse04-news1@xxxxxxxxxxx>
- Date: Wed, 28 Feb 2007 18:45:17 -0000
"Michael Stemper" <mstemper@xxxxxxxxxxxxxxxx> wrote in message
news:200702281720.l1SHKBXm102824@xxxxxxxxxxxxxxxxxxxxxxx
For a simulation that I'm doing, I'd like to be able to generate
pseudo-random numbers with a "bell curve" distribution. My only
course in probability and statistics was one semester in high
school, in the late 1960s, and I didn't pay attention.
Given a random number in the interval [0.0,1.0], I can generate a
number in the interval [-1.0,1.0] that's somewhat more likely to
be in the middle than at the ends by simply multiplying it by its
absolute value. Cubing it will, of course, squeeze its distribution
in towards the center even more.
I tried walking up and down through the range, driven by coin flips,
but that gives too narrow a distribution if I use more than a few flips.
It seems to me that there must be a function that takes numbers
uniformly distributed over one range and produces numbers distributed
in a bell curve with a given standard deviation. What would a function
that does this look like? It doesn't even have to be exact, if there's
a choice between a complex function that is exact and a simple one
that's close (FSVO "close").
In Excel there is a function NORMSINV( )
"Returns the inverse of the standard normal cumulative distribution. The
distribution has a mean of zero and a standard deviation of one.
Syntax
NORMSINV(probability)
Probability is a probability corresponding to the normal distribution.
Remarks
If probability is nonnumeric, NORMSINV returns the #VALUE! error value.
If probability < 0 or if probability > 1, NORMSINV returns the #NUM! error
value."
So if you put the random number between 0 and 1 in to NORMSINV then this
will generate a N(0,1) distribution.
RAND can be used to generate a number between 0 and 1.
So copying and pasting these functions in to Excel will automatically
generate values from a N(0,1) distribution.
Col X Col Y
In combination
=RAND() =NORMSINV(cell containing random number) or
NORMSINV(RAND())
Everytime =RAND() is entered will generate a new random number.
Filling down can generate new numbers from the distribution.
Nick
.
- References:
- Bell-curve distribution wanted
- From: Michael Stemper
- Bell-curve distribution wanted
- Prev by Date: Re: Finding number of repetitions of an element in a series of periodic sequences
- Next by Date: Re: Review of Mueckenheims book.
- Previous by thread: Re: Bell-curve distribution wanted
- Next by thread: Re: Bell-curve distribution wanted
- Index(es):
Relevant Pages
|
Loading