normal random variable

  • Thread starter Thread starter Bob Weiner
  • Start date Start date
B

Bob Weiner

I have a distribution with a mean and std. dev. and would like to generate a
random number on the curve. It has been years since I've done stats and
everything I read now, seems to confuse me!

What I am trying to achieve is to simulate a process in a queueing network.
Given a time slice, I want to know if a server with a known mean and std dev
will finish servicing a request.

Hopefully, I'm not asking for an entire lesson. I'm assuming that Excel has
a function that will do this.

Thanks,
bob
 
thanks, but that will give me a uniform distribution between a and b. I
need a normally distributed value.
 
Thanks!

I was looking at the NORMXXX funtions but wasn't sure which I needed. This
one seems to do the trick.

bob
 
If you are using a pre-XP version of Excel, NORMSINV will produce
totally unacceptable results. XP's NORMSINV does not produce random
numbers millions of standard deviations from the mean, but is still
crude enough that it is only acceptable for casual work. If you don't
have 2003 you may get better results from the Box-Muller method
=SQRT(-2*LN(RAND()))*COS(2*PI()*RAND())

If you have 2003, either method will probably work reasonably well
provided that you have downloaded the RAND patch from Microsoft.

Jerry

Bob said:
Thanks!

I was looking at the NORMXXX funtions but wasn't sure which I needed. This
one seems to do the trick.

bob
 
Jerry W. Lewis said:
If you are using a pre-XP version of Excel, NORMSINV will produce
totally unacceptable results. XP's NORMSINV does not produce random
numbers millions of standard deviations from the mean, but is still
crude enough that it is only acceptable for casual work. If you don't
have 2003 you may get better results from the Box-Muller method
=SQRT(-2*LN(RAND()))*COS(2*PI()*RAND())

If you have 2003, either method will probably work reasonably well
provided that you have downloaded the RAND patch from Microsoft.

Jerry

People are often surprised to find that you can do quite well
generating normal deviates by summing random deviates. For example, if
you sum 12 successive values of RAND() and subtract 6 you get normal
deviates which are perhaps better than those obtained by the Excel
NORMSINV formula and the calculation is considerably faster. There's
nothing sacred about 12 values but the formula is very simple then.
(See Abramowitz and Stegun, Handbook of Mathematical Functions, 1965
for this and also refinements on the method).
 
Sum of 12 independent uniform random numbers is used because it matches
the unit variance of the standard normal; otherwise you have to divide
the result by by SQRT(n/12). As n gets large, the approximation to
Normality improves by the Central Limit Theorem. Whether the
approximation to Normality is adequate or not, for any given n, depends
on your purpose. The distribution of the sum is symmetric with the
correct mean and standard deviation, but zero probability mass from
beyond +/-SQRT(3*n), with that tail probability shifted toward the
center of the distribution. For n=12, the probability of falling beyond
+/-6 in a normal distribution is roughly 2E-9.

Congruential generators (such as Excel uses) have higher order
autocorrelations that belie the independence assumption. I do not know
what the impact would be on any of the three methods of generating
normal pseudo-random numbers.

Jerry
 
Back
Top