Page 372 - Excel for Scientists and Engineers: Numerical Methods
P. 372
CHAPTER 15 RANDOM NUMBERS & MONTE CARLO METHOD 349
Figure 15-8. The Sampling tool dialog box.
The randomly sampled integers, returned in column C, are then used with the
INDEX worksheet function to return the corresponding text value from column B;
the formula in cell D2 is
=INDEX(Name,C2)
Simulating a Normal Random Distribution
of a Variable
You can create a table of random values having a normal distribution by
using the NORMINV worksheet function. The syntax of the function is
N 0 R M NV( probability, m ean, standard-dev)
I
For example, to create a table of 10,000 random values having a normal
distribution with mean 0 and standard deviation 1, enter the formula
=NORMINV(RAND(), 0 , 1) in a cell and Fill Down into 10,000 cells. Figure 15-
9 shows the distribution of these 10,000 values.