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

SIGNIFICANCE AND USE
4.1 Computer simulation is known to be a very powerful analytical tool for both practitioners and researchers in the area of wood products and their applications in structural engineering. Complex structural systems can be analyzed by computer with the computer generating the system components, given the probability distribution of each component. Frequently the components are single boards for which a compatible set of strength and stiffness properties are needed. However, the entire structural simulation process is dependent upon the adequacy of the standard uniform number generator required to generate random observations from prescribed probability distribution functions.  
4.2 The technological capabilities and wide availability of microcomputers has encouraged their increased use for simulation studies. Tests of random number generators in commonly available microcomputers have disclosed serious deficiencies (1).3 Adequacy may be a function of intended end-use. This practice is concerned with generation of sets of random numbers, as may be required for simulations of large populations of material properties for simulation of complex structures. For more demanding applications, the use of packaged and pretested random number generators is encouraged.
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, RU, 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
31-Mar-2013
Technical Committee
Drafting Committee
Current Stage
Ref Project

Relations

Buy Standard

Standard
ASTM D5124-96(2013) - 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 (Reapproved 2013)
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 (´) indicates an editorial change since the last revision or reapproval.
1. Scope 3.1.3 serial correlation—the statistical correlation between
ordered observations. See 5.2.2.
1.1 This practice gives a minimum testing procedure of
3.1.4 standard normal deviate, R —a computer generated
computer generation routines for the standard uniform distri-
N
random observation from the normal probability distribution
bution. Random observations from the standard uniform
having a mean equal to zero and standard deviation equal to
distribution, R , range from zero to one with every value
U
one.
between zero and one having an equal chance of occurrence.
3.1.5 standard uniform deviate, R —a random observation
1.2 The tests described in this practice only support the U
from the standard uniform distribution.
basic use of random number generators, not their use in
complex or extremely precise simulations.
3.1.6 standard uniform distribution—the probability distri-
bution defined on the interval 0 to 1, with every value between
1.3 Simulation details for the normal, lognormal,
0 and 1 having an equal chance of occurrence.
2-parameter Weibull and 3-parameter Weibull probability dis-
tributions are presented. 3.1.7 trial—a computer experiment, and in this standard the
generation and statistical test of one set of random numbers.
1.4 This standard does not purport to address all of the
safety concerns, if any, associated with its use. It is the
4. Significance and Use
responsibility of the user of this standard to establish appro-
priate safety and health practices and determine the applica-
4.1 Computer simulation is known to be a very powerful
bility of regulatory limitations prior to use. See specific
analyticaltoolforbothpractitionersandresearchersinthearea
warning statement in 5.5.3.
of wood products and their applications in structural engineer-
ing. Complex structural systems can be analyzed by computer
2. Referenced Documents
with the computer generating the system components, given
2.1 ASTM Standards: the probability distribution of each component. Frequently the
components are single boards for which a compatible set of
E456Terminology Relating to Quality and Statistics
strength and stiffness properties are needed. However, the
3. Terminology
entire structural simulation process is dependent upon the
adequacyofthestandarduniformnumbergeneratorrequiredto
3.1 Definitions:
generate random observations from prescribed probability
3.1.1 period—the number of R deviates the computer
U
distribution functions.
generates before the sequence is repeated.
4.2 The technological capabilities and wide availability of
3.1.2 seed value—a number required to start the computer
microcomputers has encouraged their increased use for simu-
generation of random numbers. Depending upon the computer
lation studies. Tests of random number generators in com-
system, the seed value is internally provided or it must be user
monly available microcomputers have disclosed serious defi-
specified. Consult the documentation for the specific random
ciencies (1). Adequacymaybeafunctionofintendedend-use.
number generator used.
This practice is concerned with generation of sets of random
numbers, as may be required for simulations of large popula-
This practice is under the jurisdiction ofASTM Committee D07 on Wood and
tions of material properties for simulation of complex struc-
is the direct responsibility of Subcommittee D07.05 on Wood Assemblies.
tures. For more demanding applications, the use of packaged
Current edition approved April 1, 2013. Published April 2013. Originally
and pretested random number generators is encouraged.
approved in 1991. Last previous edition approved in 2007 as D5124–96(2007).
DOI: 10.1520/D5124-96R13.
For referenced ASTM standards, visit the ASTM website, www.astm.org, or
contact ASTM Customer Service at service@astm.org. For Annual Book of ASTM
Standards volume information, refer to the standard’s Document Summary page on Theboldfacenumbersinparenthesesrefertothelistofreferencesattheendof
the ASTM website. this standard.
Copyright © ASTM International, 100 Barr Harbor Drive, PO Box C700, West Conshohocken, PA 19428-2959. United States
D5124 − 96 (2013)
5. Uniformity of Generated Numbers more than two dimensions, all generated random numbers fall
mainlyonparallelhyperplanes,afactdiscoveredbyMarsaglia
5.1 Test of the Mean—The mean of the standard uniform
(2).
distribution is ⁄2 . Generate 100 sets of 1000 random uniform
5.2.1 The following shuffling technique is an effective
numbers and conduct the following statistical test on each set.
remedy for the general problem of “stripes” and random
¯
X 20.50
numbers falling on planes. Fill a 100-element array with
Z 5 (1)
0.009129
standard uniform deviates. Select a deviate from the array
using the integer portion of the product of a random deviate
where:
and 100. Replace the selected deviate with a new uniform
Z = test statistic,
deviate. Repeat the process until the desired number of
¯
X = ∑R /1000,
U
deviates has been generated. The plot of Fig. 2 resulted from
using the shuffling technique on the random number generator
the standard deviation is assumed to be , and
Œ
which produced Fig. 1.
the summation over 1000 values is implied. 5.2.2 Unless the R generator is extensively tested by
U
If the absolute value of Z exceeds 1.28 for more than 10% stringenttests (3, 4, 5)ashufflingprocedurecomparabletothat
described in 5.2.5 should be used.
and less than 30% of the trials, the random number generator
passes. If the random number generator fails the test using 100
5.3 Visual Test for Uniform Distribution Conformance:
sets, then the number of sets can be increased or the random
5.3.1 The purpose of the visual test for distribution confor-
number generator can be rejected.
mance is to detect some odd behavior of the random number
generatorbeyondwhatmightbedetectedbythemethodin5.4.
NOTE 1—The assumption of standard deviation being equal to
Œ It is impossible to predict the various shapes of the histograms
which might indicate a problem with the generator. However,
may be examined with a Chi-Square test where
a few examples given here may alert the user of the general
2 ¯ 2
~ ! form of a problem.
R 21000 X
( U
s 5Œ (2)
999 5.3.2 Histogram Preparation—Fig.3isahistogramof1000
generated standard uniform numbers. The theoretical density
where:
functionisahorizontaldashedlinecrossingtheordinateat1.0.
¯
X = estimated mean
The interval width is 0.1. The values of the ordinates for each
s = estimatedstandarddeviationofthe1000R values,and
U
interval were calculated as follows:
the summation over 1000 values is implied.
N
i
f 5 (3)
i
W 3T
I
A significant difference between s and Œ , suggests a
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
coordinate system. Inspect the resulting plot for signs of
patterns, such as “strips.” Fig. 1 is one example of “stripes”
generated by a BASIC function on a personal computer. In
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 Pat-
FIG. 1 Plotted Pairs of Random Numbers Showing “Stripes” terns
D5124 − 96 (2013)
i
D 5max 2 X ~i 51, N! (6)
F G
n i
N
i 21
D 5max X 2 i 51, N
F G
n i
N
1 2
D 5max D , D
@ #
n n n
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
n
~ = !
1.07/ N
for more than 10% and less than 30% of the trials, the ran-
FIG. 3 Histogram of Random Numbers with Theoretical Density
dom number generator passes. If the generator fails the tests
Function Superimposed
using 100 sets, then the number of sets can be increased or
the generator can be rejected.
Since the interval width, W, in this case equalled 0.1 and
I
5.5 Correlations Among Generated Numbers:
1000, values were generated as follows:
5.5.1 The computer generated values of R must appear to
U
N
i
be random and independent. The word “appear” is used since
f 5 (4)
i
0.1 31000
the numbers are actually being generated by a mathematical
algorithm and all such algorithms have a cycle. Provided the
N
i
f 5
i numbershavetheappropriatedistributionfunction(astestedin
5.3 and 5.4) and the numbers are not serially correlated, then
NOTE 2—If different sample sizes are used, bias may exist in making
visual interpretations from histograms. One way to lessen this bias is to thegeneratednumbersaremostusefulforsimulationpurposes.
apply the Sturgess Rule (6) to determine the number of cells for the
Since the generated numbers are not truly random they are
histograms.
often called “pseudo random.”
N 5113.3~log N ! (5)
c 10 g 5.5.2 Period—Some personal computer brands have a uni-
formnumbergeneratorwithanextremelyshortperioddepend-
where:
ingupontheseed.Somemachinesrepeatthesamesequenceof
N = number of histogram cells, and
c
numbers after approximately 200 numbers. Depending upon
N = number of generated numbers.
g
the simulatio
...

Questions, Comments and Discussion

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