Standard Practice for Testing and Use of a Random Number Generator in Lumber and Wood Products Simulation

SCOPE
1.1 This practice gives a minimum testing procedure of computer generation routines for the standard uniform distribution. Random observations from the standard uniform distribution, R U, range from zero to one with every value between zero and one having an equal chance of occurrence.
1.2 The tests described in this practice only support the basic use of random number generators, not their use in complex or extremely precise simulations.
1.3 Simulation details for the normal, lognormal, 2-parameter Weibull and 3-parameter Weibull probability distributions are presented.
1.4 This standard does not purport to address all of the safety concerns, if any, associated with its use. It is the responsibility of the user of this standard to establish appropriate safety and health practices and determine the applicability of regulatory limitations prior to use. See specific warning statement in 5.5.3.

General Information

Status
Historical
Publication Date
09-Apr-2001
Technical Committee
Drafting Committee
Current Stage
Ref Project

Relations

Buy Standard

Standard
ASTM D5124-96(2001) - Standard Practice for Testing and Use of a Random Number Generator in Lumber and Wood Products Simulation
English language
5 pages
sale 15% off
Preview
sale 15% off
Preview

Standards Content (Sample)


NOTICE: This standard has either been superseded and replaced by a new version or withdrawn.
Contact ASTM International (www.astm.org) for the latest information
Designation:D5124–96 (Reapproved2001)
Standard Practice for
Testing and Use of a Random Number Generator in Lumber
and Wood Products Simulation
This standard is issued under the fixed designation D5124; the number immediately following the designation indicates the year of
original adoption or, in the case of revision, the year of last revision.Anumber in parentheses indicates the year of last reapproval.A
superscript epsilon (e) indicates an editorial change since the last revision or reapproval.
1. Scope 3.1.4 standard normal deviate, R —a computer generated
N
random observation from the normal probability distribution
1.1 This practice gives a minimum testing procedure of
having a mean equal to zero and standard deviation equal to
computer generation routines for the standard uniform distri-
one.
bution. Random observations from the standard uniform dis-
3.1.5 standard uniform deviate, R —a random observation
U
tribution, R ,rangefromzerotoonewitheveryvaluebetween
U
from the standard uniform distribution.
zero and one having an equal chance of occurrence.
3.1.6 standard uniform distribution—the probability distri-
1.2 The tests described in this practice only support the
bution defined on the interval 0 to 1, with every value between
basic use of random number generators, not their use in
0 and 1 having an equal chance of occurrence.
complex or extremely precise simulations.
3.1.7 trial—acomputerexperiment,andinthisstandardthe
1.3 Simulation details for the normal, lognormal,
generation and statistical test of one set of random numbers.
2-parameter Weibull and 3-parameter Weibull probability dis-
tributions are presented.
4. Significance and Use
1.4 This standard does not purport to address all of the
4.1 Computer simulation is known to be a very powerful
safety concerns, if any, associated with its use. It is the
analyticaltoolforbothpractitionersandresearchersinthearea
responsibility of the user of this standard to establish appro-
of wood products and their applications in structural engineer-
priate safety and health practices and determine the applica-
ing. Complex structural systems can be analyzed by computer
bility of regulatory limitations prior to use. See specific
with the computer generating the system components, given
warning statement in 5.5.3.
the probability distribution of each component. Frequently the
2. Referenced Documents components are single boards for which a compatible set of
strength and stiffness properties are needed. However, the
2.1 ASTM Standards:
2 entire structural simulation process is dependent upon the
E456 Terminology Relating to Quality and Statistics
adequacyofthestandarduniformnumbergeneratorrequiredto
3. Terminology generate random observations from prescribed probability
distribution functions.
3.1 Definitions:
4.2 The technological capabilities and wide availability of
3.1.1 period—the number of R deviates the computer
U
microcomputers has encouraged their increased use for simu-
generates before the sequence is repeated.
lation studies. Tests of random number generators in com-
3.1.2 seed value—a number required to start the computer
monly available microcomputers have disclosed serious defi-
generation of random numbers. Depending upon the computer
ciencies (1). Adequacymaybeafunctionofintendedend-use.
system, the seed value is internally provided or it must be user
This practice is concerned with generation of sets of random
specified. Consult the documentation for the specific random
numbers, as may be required for simulations of large popula-
number generator used.
tions of material properties for simulation of complex struc-
3.1.3 serial correlation—the statistical correlation between
tures. For more demanding applications, the use of packaged
ordered observations. See 5.2.2.
and pretested random number generators is encouraged.
This practice is under the jurisdiction ofASTM Committee D07 on Wood and
is the direct responsibility of Subcommittee D07.05 on Wood Assemblies.
Current edition approved April 10, 1996. Published June 1996. Originally
published as D5124–91. Last previous edition D5124–91. Theboldfacenumbersinparenthesesrefertothelistofreferencesattheendof
Annual Book of ASTM Standards, Vol 14.02. this standard.
Copyright © ASTM International, 100 Barr Harbor Drive, PO Box C700, West Conshohocken, PA 19428-2959, United States.
D5124
5. Uniformity of Generated Numbers 5.2.1 The following shuffling technique is an effective
remedy for the general problem of “stripes” and random
5.1 Test of the Mean—The mean of the standard uniform
numbers falling on planes. Fill a 100-element array with
distribution is ⁄2. Generate 100 sets of 1000 random uniform
standard uniform deviates. Select a deviate from the array
numbers and conduct the following statistical test on each set.
using the integer portion of the product of a random deviate
¯
X 20.50
and 100. Replace the selected deviate with a new uniform
Z 5 (1)
0.009129
deviate. Repeat the process until the desired number of
deviates has been generated. The plot of Fig. 2 resulted from
where:
using the shuffling technique on the random number generator
Z = test statistic,
¯ which produced Fig. 1.
X = (R /1000,
U
5.2.2 Unless the R generator is extensively tested by
U
the standard deviation is assumed to be 1 12 , and
=
/
stringenttests (4, 5, 6)ashufflingprocedurecomparabletothat
the summation over 1000 values is implied.
described in 5.2.5 should be used.
If the absolute value of Z exceeds 1.28 for more than 10%
5.3 Visual Test for Uniform Distribution Conformance:
and less than 30% of the trials, the random number generator
5.3.1 The purpose of the visual test for distribution con-
passes. If the random number generator fails the test using 100
formanceistodetectsomeoddbehavioroftherandomnumber
sets, then the number of sets can be increased or the random
generatorbeyondwhatmightbedetectedbythemethodin5.4.
number generator can be rejected.
It is impossible to predict the various shapes of the histograms
which might indicate a problem with the generator. However,
NOTE 1—The assumption of standard deviation being equal to
1 12 may be examined with a Chi-Square test where a few examples given here may alert the user of the general
=
/
form of a problem.
2 2
¯
~(R 21000 X !
U
5.3.2 Histogram Preparation—Fig.3isahistogramof1000
s 5Œ (2)
generated standard uniform numbers. The theoretical density
functionisahorizontaldashedlinecrossingtheordinateat1.0.
where:
¯ The interval width is 0.1. The values of the ordinates for each
X = estimated mean
interval were calculated as follows:
s = estimated standard deviation of the 1000 R values,
U
and
N
i
f 5 (3)
i
the summation over 1000 values is implied. W 3 T
I
Asignificantdifferencebetween sand=1 12, suggestsa
/
where:
non-random generator.
f = adjusted relative frequency,
i
5.2 Test for Patterns in Pairs—The purpose of this visual
N = number observed in interval i,
i
test is to evaluate the tendency of pairs of deviates to form
W = interval width, and
I
patternswhenplotted.Generate2000pairsofstandarduniform T = total number generated.
deviates. Plot each pair of deviates on an x-y Cartesian
Since the interval width, W, in this case equalled 0.1 and
I
coordinate system. Inspect the resulting plot for signs of
1000, values were generated as follows:
patterns, such as “strips.” Fig. 1 is one example of “stripes”
N
i
f 5 (4)
generated by a BASIC function on a personal computer. In
i
0.1 31000
more than two dimensions, all generated random numbers fall
mainlyonparallelhyperplanes,afactdiscoveredbyMarsaglia
(3).
NOTE 1—The plot resulted from using the shuffling technique on the
generator which produced Fig. 1.
FIG. 2 Plotted Pairs of Random Numbers with no Detectable
FIG. 1 Plotted Pairs of Random Numbers Showing “Stripes” Patterns
D5124
where:
N = sample size, (1000),
th
X =i value of the ranked array, and
i
D = Kolmogorov-Smirnov (K-S) test statistic.
n
Forthetestin5.4, Nequals1000. X isthesmallestvalueof
the ranked array, X is the second smallest and so on. D as
2 n
calculated is the largest vertical distance between the sample
density function and the hypothesized distribution, in this case
the standard uniform distribution. If D is greater than (1.07/
n
N ) for more than 10% and less than 30% of the trials, the
=
randomnumbergeneratorpasses.Ifthegeneratorfailsthetests
using 100 sets, then the number of sets can be increased or the
generator can be rejected.
5.5 Correlations Among Generated Numbers:
5.5.1 The computer generated values of R must appear to
U
be random and independent. The word “appear” is used since
the numbers are actually being generated by a mathematical
algorithm and all such algorithms have a cycle. Provided the
numbershavetheappropriatedistributionfunction(astestedin
FIG. 3 Histogram of Random Numbers with Theoretical Density
5.3 and 5.4) and the numbers are not serially correlated, then
Function Superimposed
thegeneratednumbersaremostusefulforsimulationpurposes.
Since the generated numbers are not truly random they are
N
i
f 5
i often called “pseudo random.”
5.5.2 Period—Some personal computer brands have a uni-
NOTE 2—If different sample sizes are used, bias may exist in making
formnumbergeneratorwithanextremelyshortperioddepend-
visual interpretations from histograms. One way to lessen this bias is to
ingupontheseed.Somemachinesrepeatthesamesequenceof
apply the Sturgess Rule (7) to determine the number of cells for the
numbers after approximately 200 numbers. Depending upon
histograms.
the simulation application, the user must determine if the
N 51 13.3~log N ! (5)
c 10 g
period of the machine is adequate. Reference (1) is useful for
evaluating the period of various random number generators.
where:
N = number of histogram ce
...

Questions, Comments and Discussion

Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.