random numbers

R

Randi R

How do I generate random numbers from a normal distribution in excel? I want
to generate a set of random numbers with a normal distribution of
(mean=162.7, standard deviation=6.2)
 
M

Martin P

Go to Tools, Data Analysis, Random Number Generation and choose the
distribution giving your required mean and standard deviation. The mean and
standard deviation of the list generated will not be exactly the same as
those you entered. First multiply every item by the required standard
deviation divided by 6.2. You will now have the required standard deviation.
The mean will also have changed. Add the required mean minus the new mean to
every item.
 
M

Mike Middleton

Randi R -
How do I generate random numbers from a normal distribution in excel? I
want to generate a set of random numbers with a normal distribution of
(mean=162.7, standard deviation=6.2) <

For a dynamic worksheet function approach, in general use

=NORMINV(RAND(),Mean,StDev)

and for your specific case

=NORMINV(RAND(),162.7,6.2)

Both NORMINV and RAND are numerically improved in Excel 2003 (and NORMINV is
considerably slower).

For more info, browse to Google Groups and search for "Excel random normal"
(without the quotes).

- Mike
www.mikemiddleton.com
 
D

David J. Braden

No No No No No!
Do NOT use ATP for any of its stat functions, unless you want to
demonstrate the degree to which MS can demonstrate total ineptitude when
it comes to long-standing (since 1990, at least) problems with many of
its functions (core worksheet functions, as well as those supplied by
the analysis ToolPak).

PopTools is a free add-in that will do the trick; unlike MS, its author
is good about documenting what's going on (he uses the very modern
Mersenne Twister for the underlying variates).

Many of us who write add-ins for this stuff use a Box-Muller algorithm
when the variates aren't from a truncated distribution; I assume the
(IMO excellent) commercial package Crystal Ball approaches this
differently, given its age.

There are more free add-ins out there for what you request, but none I
have seen are as well documented, and modern, as PopTools.

HTH
Dave Braden
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top