Environmental Engineering Reference
In-Depth Information
6.1. RANDOM NUMBERS
In Chapter 5 random numbers were used to determine where samples were to be taken.
How does one obtain random numbers? A simple, unsophisticated way to do this is to
place little pieces of paper with numbers on them in a hat and pull them out one by one.
Random numbers can be more easily generated with many handheld calculators and with
all computers. Normally there will be a function called rand that will return random
numbers. Sometimes it will be necessary to multiply or truncate the numbers obtained to
produce numbers in the range you wish to have.
As long as the numbers are used as given by the program they are random, even if they
are multiplied by 10 or truncated to only one decimal place or a whole number. Table 6.2
is an example of random numbers generated by Excel using “= rand()*10.” The result of
this operation is the random numbers given in column 1. The truncated and rounded-up
TABLE 6.2 Random Numbers Generated by Excel Using=rand()* 10
Rand()*10 Rounded up
8.879528391 9
1.622723374 2
5.014714332 5
3.285093315 3
1.682229083 2
3.64113318 4
6.351850918 6
6.660649484 7
6.174987005 6
4.024443714 4
4.247216289 4
9.915704505 10
6.332125286 6
8.592222671 9
2.90158629 3
3.030321588 3
0.448112927 0
9.875606847 10
Note: Column 2 is the random numbers rounded to whole numbers.
numbers corresponding to these random numbers are given in column 2. Any time
 
Search WWH ::




Custom Search