Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
| Function: | RANNOR |
|---|---|
| Purpose: | To generate random numbers that are normally distributed. This function generates random numbers that come from a distribution with a mean of 0 and a standard deviation of 1. You can easily scale this to generate any normally distributed values. For example, to generate normally distributed numbers with a mean of 100 and a standard deviation of 10, you multiply the result of the RANNOR function by 10 and add 100. |
| Syntax: | RANNOR (seed) |
| seed is either a 0, in which case you will obtain a different series of normally distributed random numbers each time you run your program (it uses the computer's clock to generate the seed), or a number of your choosing, in which case every time the program runs, it produces the same series of random numbers. |
| Function | Returns |
|---|---|
| RANNOR(0) | A random number from a normal distribution (mean = 0, standard deviation =1) with a machine-generated seed |
| RANNOR(1234) | A random number from a normal distribution (mean = 0, standard deviation =1) with user-defined seed |
| 10*RANNOR(0) + 100 | A random number from a normal distribution (mean = 100, standard deviation =10) with a machine-generated seed |