Scientific Computing: An Introductory Survey

Similar documents
Computational Methods. Randomness and Monte Carlo Methods

You ve already read basics of simulation now I will be taking up method of simulation, that is Random Number Generation

What We ll Do... Random

Random Number Generation. Biostatistics 615/815 Lecture 16

Lecture 2: Introduction to Numerical Simulation

Random Number Generators

Reproducibility in Stochastic Simulation

Monte Carlo Integration COS 323

RANDOM NUMBERS GENERATION

Sampling and Monte-Carlo Integration

Monte Carlo Integration COS 323

Scientific Computing: An Introductory Survey

ROLE OF RANDOM NUMBERS IN SIMULATIONS OF ECONOMIC PROCESSES

Physics 736. Experimental Methods in Nuclear-, Particle-, and Astrophysics. - Statistical Methods -

Chapter 1. Introduction

Chapter 2 Random Number Generators

DECISION SCIENCES INSTITUTE. Exponentially Derived Antithetic Random Numbers. (Full paper submission)

CPSC 531: System Modeling and Simulation. Carey Williamson Department of Computer Science University of Calgary Fall 2017

Physics 736. Experimental Methods in Nuclear-, Particle-, and Astrophysics. Lecture 14

Physics 736. Experimental Methods in Nuclear-, Particle-, and Astrophysics. - Statistics and Error Analysis -

Random Number Generators for Parallel Computers

Monte Carlo Simula/on and Copula Func/on. by Gerardo Ferrara

Random Numbers Random Walk

UNIT 9A Randomness in Computation: Random Number Generators

VARIANCE REDUCTION TECHNIQUES IN MONTE CARLO SIMULATIONS K. Ming Leung

Laboratory Exercise #5

Combinatorial Search; Monte Carlo Methods

Data Handling. Moving from A to A* Calculate the numbers to be surveyed for a stratified sample (A)

Proposed Pseudorandom Number Generator

Monte Carlo Integration and Random Numbers

The Plan: Basic statistics: Random and pseudorandom numbers and their generation: Chapter 16.

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science

Scientific Computing with Case Studies SIAM Press, Lecture Notes for Unit IV Monte Carlo

RANDOM NUMBERS GENERATION

PSEUDORANDOM numbers are very important in practice

Monte Carlo Methods; Combinatorial Search

Recurrent Neural Network Models for improved (Pseudo) Random Number Generation in computer security applications

GENERATION OF RANDOM NUMBERS BY COMPUTER

A Random Number Based Method for Monte Carlo Integration

Package simed. November 27, 2017

Network Traffic Characterisation

Random and Pseudorandom Bit Generators

SIMULATION SYSTEMS PART 1: RANDOM NUMBER GENERATION. Prof. Yasser Mostafa Kadah

Lecture VII : Random systems and random walk

Hashing. Hashing Procedures

Monte Carlo Simulations

Random Numbers and Monte Carlo Methods

Prentice Hall Mathematics: Course Correlated to: Massachusetts State Learning Standards Curriculum Frameworks (Grades 7-8)

Two-dimensional Totalistic Code 52

Tutorial: Random Number Generation

Statistical Computing

Stochastic Simulation: Algorithms and Analysis

Random Number Generation and Monte Carlo Methods

CS 450 Numerical Analysis. Chapter 7: Interpolation

Testing parallel random number generators

Lecture 8 Mathematics

Probability Models.S4 Simulating Random Variables

Generating random samples from user-defined distributions

CS 179: GPU Computing. Lecture 16: Simulations and Randomness

Quasi-Monte Carlo Methods Combating Complexity in Cost Risk Analysis

Photon Maps. The photon map stores the lighting information on points or photons in 3D space ( on /near 2D surfaces)

Integration. Volume Estimation

Lecture: Simulation. of Manufacturing Systems. Sivakumar AI. Simulation. SMA6304 M2 ---Factory Planning and scheduling. Simulation - A Predictive Tool

ACCURACY AND EFFICIENCY OF MONTE CARLO METHOD. Julius Goodman. Bechtel Power Corporation E. Imperial Hwy. Norwalk, CA 90650, U.S.A.

Year 9 Maths Overview

Chapter 6 Random Number Generation

Chapter Four: Loops II

Review Questions 26 CHAPTER 1. SCIENTIFIC COMPUTING

CS61B Lecture #32. Last modified: Sun Nov 5 19:32: CS61B: Lecture #32 1

Network Security. Random Number Generation. Chapter 6. Network Security (WS 2003): 06 Random Number Generation 1 Dr.-Ing G.

lecture 19: monte carlo methods

MULTI-DIMENSIONAL MONTE CARLO INTEGRATION

Big Ideas. Objects can be transferred in an infinite number of ways. Transformations can be described and analyzed mathematically.

Recursive Estimation

Grade 5: PA Academic Eligible Content and PA Common Core Crosswalk

Themes in the Texas CCRS - Mathematics

Scope and Sequence for the New Jersey Core Curriculum Content Standards

Probabilistic (Randomized) algorithms

AN APPROXIMATE INVENTORY MODEL BASED ON DIMENSIONAL ANALYSIS. Victoria University, Wellington, New Zealand

GPU-based Quasi-Monte Carlo Algorithms for Matrix Computations

Static Analysis and Bugfinding

Section 2.3: Monte Carlo Simulation

Fast Automated Estimation of Variance in Discrete Quantitative Stochastic Simulation

Randomized algorithms have several advantages over deterministic ones. We discuss them here:

Dynamic Programming. Other Topics

Random Number Generator of STMC and simple Monte Carlo Integration

Forrest B. Brown, Yasunobu Nagaya. American Nuclear Society 2002 Winter Meeting November 17-21, 2002 Washington, DC

LECTURE 8: Random numbers

Grade 6 Number Strand

Hands-On Standards Deluxe Grades: 7, 8 States: California Content Standards

UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering. Digital Computer Arithmetic ECE 666

Introduction to Computational Mathematics

Use of Extreme Value Statistics in Modeling Biometric Systems

DOWNLOAD PDF BIG IDEAS MATH VERTICAL SHRINK OF A PARABOLA

Random-Number Generation

PRNGCL: OpenCL Library of Pseudo-Random Number Generators for Monte Carlo Simulations

CS 106 Winter 2016 Craig S. Kaplan. Module 08 Randomness and noise Topics

Year 8 Review 1, Set 1 Number confidence (Four operations, place value, common indices and estimation)

Chapter 4: (0,1) Random Number Generation

Smoothers. < interactive example > Partial Differential Equations Numerical Methods for PDEs Sparse Linear Systems

Transcription:

Scientific Computing: An Introductory Survey Chapter 13 Random Numbers and Stochastic Simulation Prof. Michael T. Heath Department of Computer Science University of Illinois at Urbana-Champaign Copyright c 2002. Reproduction permitted for noncommercial, educational use only. Michael T. Heath Scientific Computing 1 / 17

Stochastic Simulation Stochastic simulation mimics or replicates behavior of system by exploiting randomness to obtain statistical sample of possible outcomes Because of randomness involved, simulation methods are also known as Monte Carlo methods Such methods are useful for studying Nondeterministic (stochastic) processes Deterministic systems that are too complicated to model analytically Deterministic problems whose high dimensionality makes standard discretizations infeasible (e.g., Monte Carlo integration) < interactive example > < interactive example > Michael T. Heath Scientific Computing 2 / 17

Stochastic Simulation, continued Two main requirements for using stochastic simulation methods are Knowledge of relevant probability distributions Supply of random numbers for making random choices Knowledge of relevant probability distributions depends on theoretical or empirical information about physical system being simulated By simulating large number of trials, probability distribution of overall results can be approximated, with accuracy attained increasing with number of trials < interactive example > < interactive example > Michael T. Heath Scientific Computing 3 / 17

Randomness Randomness is somewhat difficult to define, but we usually associate randomness with unpredictability One definition is that sequence of numbers is random if it has no shorter description than itself Physical processes, such as flipping coin or tossing dice, are deterministic if enough is known about equations governing their motion and appropriate initial conditions Even for deterministic systems, extreme sensitivity to initial conditions can make their chaotic behavior unpredictable in practice Wheter deterministic or not, highly complicated systems are often tractable only by stochastic simulation methods Michael T. Heath Scientific Computing 4 / 17

Repeatability In addition to unpredictability, another distinguishing characteristic of true randomness is lack of repeatability However, lack of repeatability could make testing algorithms or debugging computer programs difficult, if not impossible Repeatability is desirable in this sense, but care must taken to ensure independence among trials Michael T. Heath Scientific Computing 5 / 17

Pseudorandom Numbers Although random numbers were once supplied by physical processes or tables, they are now produced by computers Computer algorithms for generating random numbers are in fact deterministic, although sequence generated may appear random in that it exhibits no apparent pattern Such sequences of numbers are more accurately called pseudorandom Although pseudorandom sequence may appear random, it is in fact quite predictable and reproducible, which is important for debugging and verifying results Because only finite number of numbers can be represented in computer, any sequence must eventually repeat Michael T. Heath Scientific Computing 6 / 17

Properties of good random number generator as possible Random pattern : passes statistical tests of randomness Long period : goes as long as possible before repeating Efficiency : executes rapidly and requires little storage Repeatability : produces same sequence if started with same initial conditions Portability : runs on different kinds of computers and is capable of producing same sequence on each Michael T. Heath Scientific Computing 7 / 17

, continued Early attempts at producing random number generators on computers often relied on complicated procedures whose very complexity was presumed to ensure randomness Example is midsquare method, which squares each member of sequence and takes middle portion of result as next member of sequence Lack of theoretical understanding of such methods proved disastrous, and it was soon recognized that simple methods with well-understood theoretical basis are far preferable Michael T. Heath Scientific Computing 8 / 17

Congruential Generators Congruential random number generators have form x k = (ax k 1 + c) (mod M) where a and c are given integers Starting integer x 0 is called seed Integer M is approximately (often equal to) largest integer representable on machine Quality of such generator depends on choices of a and c, and in any case its period cannot exceed M Michael T. Heath Scientific Computing 9 / 17

Congruential Generators, continued It is possible to obtain reasonably good random number generator using this method, but values of a and c must be chosen very carefully Random number generators supplied with many computer systems are of congruential type, and some are notoriously poor Congruential generator produces random integers between 0 and M To produce random floating-point numbers, say uniformly distributed on interval [0, 1), random integers must be divided by M (not integer division!) < interactive example > Michael T. Heath Scientific Computing 10 / 17

Fibonacci Generators Fibonacci generators produce floating-point random numbers on interval [0, 1) directly as difference, sum, or product of previous values Typical example is subtractive generator x k = x k 17 x k 5 This generator is said to have lags of 17 and 5 Lags must be chosen carefully to produce good subtractive generator Such formula may produce negative result, in which case remedy is to add 1 to get back into interval [0, 1) Michael T. Heath Scientific Computing 11 / 17

Fibonacci Generators, continued Fibonacci generators require more storage than congruential generator, and also require special procedure to get started Fibonacci generators require no division to produce floating-point results Well-designed Fibonacci generators have very good statistical properties Fibonacci generators can have much longer period than congruential generators, since repetition of one member of sequence does not entail that all subsequent members will also repeat in same order Michael T. Heath Scientific Computing 12 / 17

Sampling on Other Intervals If we need uniform distribution on some other interval [a, b), then we can modify values x k generated on [0, 1) by transformation (b a)x k + a to obtain random numbers that are uniformly distributed on desired interval Michael T. Heath Scientific Computing 13 / 17

Nonuniform Distributions Sampling from nonuniform distributions is more difficult If cumulative distribution function of desired probability density function is easily invertible, then we can generate random samples with desired distribution by generating uniform random numbers and inverting them For example, to sample from exponential distribution we can take where y k is uniform on [0, 1) f(t) = λe λt, t > 0 x k = log(1 y k )/λ Unfortunately, many important distributions are not easily invertible, and special methods must be employed to generate random numbers efficiently for these distributions Michael T. Heath Scientific Computing 14 / 17

Normal Distribution Important example is generation of random numbers that are normally distributed with given mean and variance Available routines often assume mean 0 and variance 1 If some other mean µ and variance σ 2 are desired, then each value x k produced by routine can be modified by transformation σx k + µ to achieve desired normal distribution Michael T. Heath Scientific Computing 15 / 17

For some applications, achieving reasonably uniform coverage of sampled volume can be more important than whether sample points are truly random Truly random sequences tend to exhibit random clumping, leading to uneven coverage of sampled volume for given number of points Perfectly uniform coverage can be achieved by using regular grid of sample points, but this approach does not scale well to higher dimensions Compromise between these extremes of coverage and randomness is provided by quasi-random sequences Michael T. Heath Scientific Computing 16 / 17

, continued Quasi-random sequences are not random at all, but are carefully constructed to give uniform coverage of sampled volume while maintaining reasonably random appearance By design, points tend to avoid each other, so clumping associated with true randomness is eliminated < interactive example > Michael T. Heath Scientific Computing 17 / 17