ASTM D5124-96(2022)
(Practice)Standard Practice for Testing and Use of a Random Number Generator in Lumber and Wood Products Simulation
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, health, and environmental practices and determine the applicability of regulatory limitations prior to use.See specific warning statement in 5.5.3.
1.5 This international standard was developed in accordance with internationally recognized principles on standardization established in the Decision on Principles for the Development of International Standards, Guides and Recommendations issued by the World Trade Organization Technical Barriers to Trade (TBT) Committee.
General Information
Relations
Standards Content (Sample)
This international standard was developed in accordance with internationally recognized principles on standardization established in the Decision on Principles for the
Development of International Standards, Guides and Recommendations issued by the World Trade Organization Technical Barriers to Trade (TBT) Committee.
Designation: D5124 − 96 (Reapproved 2022)
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.2 seed value—a number required to start the computer
generation of random numbers. Depending upon the computer
1.1 This practice gives a minimum testing procedure of
system, the seed value is internally provided or it must be user
computer generation routines for the standard uniform distri-
specified. Consult the documentation for the specific random
bution. Random observations from the standard uniform
number generator used.
distribution, R , range from zero to one with every value
U
3.1.3 serial correlation—the statistical correlation between
between zero and one having an equal chance of occurrence.
ordered observations. See 5.2.2.
1.2 The tests described in this practice only support the
3.1.4 standard normal deviate, R —a computer generated
basic use of random number generators, not their use in
N
random observation from the normal probability distribution
complex or extremely precise simulations.
having a mean equal to zero and standard deviation equal to
1.3 Simulation details for the normal, lognormal,
one.
2-parameter Weibull and 3-parameter Weibull probability dis-
3.1.5 standard uniform deviate, R —a random observation
U
tributions are presented.
from the standard uniform distribution.
1.4 This standard does not purport to address all of the
3.1.6 standard uniform distribution—the probability distri-
safety concerns, if any, associated with its use. It is the
bution defined on the interval 0 to 1, with every value between
responsibility of the user of this standard to establish appro-
0 and 1 having an equal chance of occurrence.
priate safety, health, and environmental practices and deter-
mine the applicability of regulatory limitations prior to use.See 3.1.7 trial—a computer experiment, and in this standard the
specific warning statement in 5.5.3. generation and statistical test of one set of random numbers.
1.5 This international standard was developed in accor-
4. Significance and Use
dance with internationally recognized principles on standard-
ization established in the Decision on Principles for the
4.1 Computer simulation is known to be a very powerful
Development of International Standards, Guides and Recom-
analyticaltoolforbothpractitionersandresearchersinthearea
mendations issued by the World Trade Organization Technical
of wood products and their applications in structural engineer-
Barriers to Trade (TBT) Committee.
ing. Complex structural systems can be analyzed by computer
with the computer generating the system components, given
2. Referenced Documents
the probability distribution of each component. Frequently the
2.1 ASTM Standards: components are single boards for which a compatible set of
E456Terminology Relating to Quality and Statistics
strength and stiffness properties are needed. However, the
entire structural simulation process is dependent upon the
3. Terminology
adequacyofthestandarduniformnumbergeneratorrequiredto
3.1 Definitions: generate random observations from prescribed probability
3.1.1 period—the number of R deviates the computer distribution functions.
U
generates before the sequence is repeated.
4.2 The technological capabilities and wide availability of
microcomputers has encouraged their increased use for simu-
This practice is under the jurisdiction ofASTM Committee D07 on Wood and
lation studies. Tests of random number generators in com-
is the direct responsibility of Subcommittee D07.05 on Wood Assemblies.
monly available microcomputers have disclosed serious defi-
Current edition approved Aug. 1, 2022. Published September 2022. Originally
ciencies (1). Adequacymaybeafunctionofintendedend-use.
approved in 1991. Last previous edition approved in 2018 as D5124–96(2018).
This practice is concerned with generation of sets of random
DOI: 10.1520/D5124-96R22.
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 (2022)
numbers, as may be required for simulations of large popula-
tions of material properties for simulation of complex struc-
tures. For more demanding applications, the use of packaged
and pretested random number generators is encouraged.
5. Uniformity of Generated Numbers
5.1 Test of the Mean—The mean of the standard uniform
distribution is ⁄2 . Generate 100 sets of 1000 random uniform
numbers and conduct the following statistical test on each set.
¯
X 20.50
Z 5 (1)
0.009129
where:
Z = test statistic,
¯
X = ∑R /1000,
U
FIG. 1 Plotted Pairs of Random Numbers Showing “Stripes”
the standard deviation is assumed to beŒ , and
the summation over 1000 values is implied.
If the absolute value of Z exceeds 1.28 for more than 10%
and less than 30% of the trials, the random number generator
passes. If the random number generator fails the test using 100
sets, then the number of sets can be increased or the random
number generator can be rejected.
NOTE 1—The assumption of standard deviation being equal to
Œ
may be examined with a Chi-Square test where
2 ¯ 2
~ R 21000 X !
( U
s 5Œ (2)
where:
¯
X = estimated mean
s = estimatedstandarddeviationofthe1000R values,and
NOTE 1—The plot resulted from using the shuffling technique on the
U
generator which produced Fig. 1.
the summation over 1000 values is implied.
FIG. 2 Plotted Pairs of Random Numbers with no Detectable Pat-
terns
A significant difference between s and , suggests a
Œ
non-random generator.
5.2 Test for Patterns in Pairs—The purpose of this visual
test is to evaluate the tendency of pairs of deviates to form
5.2.2 Unless the R generator is extensively tested by
U
patternswhenplotted.Generate2000pairsofstandarduniform
stringenttests (3, 4, 5)ashufflingprocedurecomparabletothat
deviates. Plot each pair of deviates on an x-y Cartesian
described in 5.2.1 should be used.
coordinate system. Inspect the resulting plot for signs of
5.3 Visual Test for Uniform Distribution Conformance:
patterns, such as “strips.” Fig. 1 is one example of “stripes”
5.3.1 The purpose of the visual test for distribution confor-
generated by a BASIC function on a personal computer. In
mance is to detect some odd behavior of the random number
more than two dimensions, all generated random numbers fall
generatorbeyondwhatmightbedetectedbythemethodin5.4.
mainlyonparallelhyperplanes,afactdiscoveredbyMarsaglia
It is impossible to predict the various shapes of the histograms
(2).
which might indicate a problem with the generator. However,
5.2.1 The following shuffling technique is an effective
a few examples given here may alert the user of the general
remedy for the general problem of “stripes” and random
form of a problem.
numbers falling on planes. Fill a 100-element array with
5.3.2 Histogram Preparation—Fig.3isahistogramof1000
standard uniform deviates. Select a deviate from the array
generated standard uniform numbers. The theoretical density
using the integer portion of the product of a random deviate
functionisahorizontaldashedlinecrossingtheordinateat1.0.
and 100. Replace the selected deviate with a new uniform
The interval width is 0.1. The values of the ordinates for each
deviate. Repeat the process until the desired number of
interval were calculated as follows:
deviates has been generated. The plot of Fig. 2 resulted from
using the shuffling technique on the random number generator N
i
f 5 (3)
i
which produced Fig. 1. W 3T
I
D5124 − 96 (2022)
random numbers to the standard uniform distribution. The KS
test should be conducted on 100 sets of generated random
number data each containing 1000 observations.
5.4.2 Kolmogorov-Smirnov Test—Generate the R numbers
U
and store in an array. Rank the data from smallest to largest.
Calculate the following:
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
FIG. 3 Histogram of Random Numbers with Theoretical Density the ranked array, X is the second smallest and so on. D as
2 n
Function Superimposed
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
where:
~1.07/=N!
f = adjusted relative frequency,
I
for more than 10% and less than 30% of the trials, the ran-
N = number observed in interval i,
I
dom number generator passes. If the generator fails the tests
W = interval width, and
I
using 100 sets, then the number of sets can be increased or
T = total number generated.
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
thegenerate
...
Questions, Comments and Discussion
Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.