How do you generate random numbers in a normal distribution?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
How do you generate 100 random numbers with a normal distribution between 0
and 90? And when this is done how do you stop the random numbers changing
each time you do something else?
Thanks
 
Option Explicit

Sub genRan()
Dim index As Long
For index = 1 To 100
Cells(index, 1).Value = Rnd() * 90
Next
End Sub
 
Thanks,
I'm a complete novice at this. So you just enter this into the equation bar?
Thanks
 
This will not generate a normal distribution, unfortunately. Rnd() has an
equal probability for every number in the range, so its distribution is flat,
not normal.
 
Ladee_bird -
How do you generate 100 random numbers with a normal distribution between
0 and 90? <

The normal distribution is determined by its mean and standard deviation,
not by a range "between 0 and 90."

Theoretically, the possible values from a normal distribution range from
minus infinity to plus infinity. But most values are within three or four
standard deviations from the mean.

One way to get normal distribution values with mean 45 and standard
deviation 5 is to use the worksheet functions =NORMINV(RAND(),45,5). Copy to
100 cells for 100 such random numbers.
And when this is done how do you stop the random numbers changing each
time you do something else? <

Edit Copy. Edit Paste Special Values.

- Mike
www.mikemiddleton.com
 

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

Back
Top