Appendix 1 As 1.13 MB
Total Page:16
File Type:pdf, Size:1020Kb
Stochastic Empirical Loading and Dilution Model (SELDM) Version 1.0.0—Appendix 1. Monte Carlo Methods By Gregory E. Granato Prepared in cooperation with the U.S. Department of Transportation, Federal Highway Administration, Office of Project Development and Environmental Review Techniques and Methods 4–C3 U.S. Department of the Interior U.S. Geological Survey U.S. Department of the Interior KEN SALAZAR, Secretary U.S. Geological Survey Suzette M. Kimball, Acting Director U.S. Geological Survey, Reston, Virginia: 2013 For more information on the USGS—the Federal source for science about the Earth, its natural and living resources, natural hazards, and the environment, visit http://www.usgs.gov or call 1–888–ASK–USGS. For an overview of USGS information products, including maps, imagery, and publications, visit http://www.usgs.gov/pubprod To order this and other USGS information products, visit http://store.usgs.gov Any use of trade, firm, or product names is for descriptive purposes only and does not imply endorsement by the U.S. Government. Although this information product, for the most part, is in the public domain, it also may contain copyrighted materials as noted in the text. Permission to reproduce copyrighted items must be secured from the copyright owner. Suggested citation: Granato, G.E., 2013, Stochastic empirical loading and dilution model (SELDM) Version 1.0.0—Appendix 1, Monte Carlo methods: U.S. Geological Survey Techniques and Methods, book 4, chap. C3, 26 p., CD–ROM. (Also available at http://pubs.usgs.gov/tm/04/c03/.) iii Contents Introduction.....................................................................................................................................................1 Generating Random Numbers from a Uniform Distribution ....................................................................1 The MRG32k3a Multiple Recursive Pseudorandom-Number Generator ....................................2 Random-Seed Management in SELDM ............................................................................................3 Generating Random Numbers by Using the Inverse Cumulative Distribution Function ....................5 The One- or Two-Parameter Exponential Distribution....................................................................5 The Trapezoidal Distribution ...............................................................................................................5 Generating Random Numbers by Using the Frequency Factor Method ..............................................8 The Normal or Lognormal Distribution ..............................................................................................8 The Pearson Type III or Log-Pearson Type III Distribution ..........................................................10 Generating Random Numbers by Using a Regression Relation ..........................................................17 Generating Random Numbers with an Input Rank Correlation Coefficient .......................................17 Generating Random Numbers Adjusted for Conditional Probability ...................................................22 Calculating the Number of Storms to be Simulated in a Stochastic Sample ....................................24 References Cited..........................................................................................................................................25 Figures 1–1. Schematic diagram showing five possible probability-density functions of the trapezoidal distribution as defined by the location variables ...............................................6 1–2. Graph showing example of implementation of algorithm AS 241 (Wichura, 1988) for producing normal variates from uniform variates for a sample of 12,000 randomly generated points .........................................................................................................................11 1–3. Graphs showing three random samples of the standard normal distribution with the nominal values (average = 0, standard deviation = 1, and coefficient of skew = 0) and the 95-percent confidence intervals for these statistics .............................................12 1–4. Graph showing the normal variate and six Pearson type III variates generated by using the Kirby (1972) adjusted Wilson-Hilferty approximation ..........................................16 1–5. Graph showing the percent reduction in the standard deviation of the dependent uniform random-number sample as a function of the absolute value of the rank correlation coefficient (Spearman’s rho) ................................................................................19 1–6. Graphs showing examples of the theoretical 95-percent confidence intervals for selected values of Spearman’s rank correlation coefficients generated by using the large-sample approximation .....................................................................................................23 Tables 1–1. Parameters for the MRG32k3a combined multiple recursive random-number generator (CMRRNG) by L’Ecuyer (1999) ..................................................................................3 1–2. Coefficients for the polynomials used to implement algorithm AS241 by Wichura (1988) ..............................................................................................................................9 1–3. Interpolation table for the adjusted Wilson-Hilferty approximation by Kirby (1972) .......14 iv Abbreviations BMP best management practice CMRRNG combined multiple recursive random-number generator CDF cumulative distribution function INT integer function KN normal variate, a pseudorandom decimal value that is generated to represent a random variable with a normal distribution KP Pearson type III variate, a pseudorandom decimal value that is generated to represent a random variable with a Pearson type III distribution ln natural logarithm LCG linear congruential generator MRRNG multiple recursive random-number generator PC personal computer PPCC probability-plot correlation coefficient PRNG pseudorandom-number generator RAM random access memory SELDM Stochastic Empirical Loading and Dilution Model U01 uniform random variate, a pseudorandom decimal value that is generated to represent a random variable with a uniform distribution between 0 and 1 VB Microsoft Visual Basic® VBA Microsoft Visual Basic for Applications® Stochastic Empirical Loading and Dilution Model (SELDM) Version 1.0.0—Appendix 1. Monte Carlo Methods By Gregory E. Granato Introduction The Stochastic Empirical Loading and Dilution Model (SELDM) uses Monte Carlo methods to generate large stochastic datasets for the variables needed to provide planning-level estimates of runoff quality at a site of interest. The results of the stochastic analysis indicate the risk for exceeding water-quality objectives and therefore the potential need for mitigation measures to reduce effects of runoff on receiving waters. In SELDM, Monte Carlo methods are used with input statistics to generate multiyear samples of precipitation, prestorm streamflow, runoff coefficients, water-quality data, and metrics for the performance of best management practices (BMPs). Monte Carlo methods are used because the interplay of these variables is complex. Theoretical and analytical solutions cannot characterize the potential combinations of input variables because each variable may be best characterized by a different probability distribution. The purpose of this appendix is to document the numerical methods that are implemented in SELDM with references to literature that describes the theory and development of such methods. This appendix provides the information and equations needed to generate stochastic data for each statistical distribution used in SELDM. This appendix documents methods for adjusting these data to represent correlations between variables by using rank correlation coefficients or regression equations. Methods for adjusting data to represent conditional probabilities also are documented. Uses for different methods are described as examples in this appendix, but the applications of each method for individual hydrologic variables in the model are described in the main body of this report. Generating Random Numbers from a Uniform Distribution SELDM uses a pseudorandom-number generator (PRNG) to generate seemingly random numbers that simulate a uniform distribution. Computer-based random-number generators are identified as PRNGs because computers are, by design, precise and deterministic calculators that cannot produce a set of truly random numbers without an external random signal (Press and others, 1992; L’Ecuyer, 1999; Saucier, 2000; Gentle, 2003). A variate is commonly defined as a single pseudorandom number that is generated to represent a random variable (Devroye, 1986). A series of variates generated by a PRNG represents a sample of values from a specified probability distribution. All values within the specified range of a uniform distribution are equally likely to occur. Hydrologic processes do not commonly produce values that fit a uniform distribution (Haan, 1977; Chow and others, 1988; Stedinger and others, 1993), but the other distributions of interest for modeling hydrologic data are generated by using one or more variates generated from a uniform distribution (Devroye, 1986; Press and others, 1992; Salas, 1993; Saucier, 2000; Gentle, 2003; L’Ecuyer and Simard, 2007). A high-quality PRNG is needed for defensible stochastic simulation models. There are,