Random processes and probability distributions. Phys 420/580 Lecture 20

Size: px
Start display at page:

Download "Random processes and probability distributions. Phys 420/580 Lecture 20"

Transcription

1 Random processes and probability distributions Phys 420/580 Lecture 20

2 Random processes Many physical processes are random in character: e.g., nuclear decay (Poisson distributed event count) P (k, τ) = e λτ (λτ) k! motion of thermalized interacting particles (Maxwell-Boltzmann speed profile) f(v) v 2 exp mv2 2kT

3 Random processes Probabilistic descriptions often arise from the complex behaviour of many interacting degrees of freedom E.g., Temperature is an emergent phenomenon: it s a collective property of a large number of interacting particles particles exchange energy and establish a MB distribution, characterized by a single parameter T

4 Ergodicity For a large collection of noninteracting oscillators, the phase space trajectory of each individual p oscillator is a closed circle q

5 Ergodicity For a large collection of noninteracting oscillators, the phase space trajectory of each individual p oscillator is a closed circle As we turn on interactions, the trajectories are perturbed q

6 Ergodicity For a large collection of noninteracting oscillators, the phase space trajectory of each individual p oscillator is a closed circle As we turn on interactions, the trajectories are perturbed q The trajectory density averaged over all oscillators can be understood as a probability density

7 Ergodicity Consider an idealized billiards system... non-ergodic ergodic

8 Statistical physics Ergodicity is the basis for statistical physics We assume that all states in the phase space are accessible and have equal weight In a system at fixed temperature, states are visited according to the Boltzmann factor: Z = e E n/kt n Stochastic process with transition probabilities given by P n m e (E n E m )/kt

9 Random numbers What is a random number? Really no such thing Loose term of art referring to a sequence of independent numbers drawn randomly from some distribution Typically these are integer or real values uniformly distributed in some finite range

10 Random numbers An infinite sequence of digits: Is it random? (Humans are terrible at judging) Each of the digits 0 9occurs 10 of the time 1 Each pair of two successive digits occurs of the time

11 Random numbers Consider the first one million digits of the sequence: digit counts are distributed around the average every pattern is equally probable P ( )=P ( ) digits are completely uncorrelated given x, P (x = 0) = 1 10

12 Random numbers How do we generate sequences of random numbers? Strictly speaking, this isn t possible on a deterministic computer using finite arithmetic Nonetheless, it may be possible to construct long sequences with the appearance of randomness Probably okay if the relationship between numbers has no physical significance

13 Linear congruential generator Want a random sequence of real numbers (U n ) [0, 1) Popular strategy: use fractions U n = X n /m built from the sequence of integers (X n ) {0, 1, 2,...,m 1} linear congruence scheme (Lehmer 1948) X n+1 =(ax n + c) mod m

14 Linear congruential generator Want a random sequence of real numbers (U n ) [0, 1) Popular strategy: use fractions U n = X n /m built from the sequence of integers (X n ) {0, 1, 2,...,m 1} linear congruence scheme (Lehmer 1948) X n+1 =(ax n + c) mod m multiplier increment modulus

15 Linear congruential generator Recursion builds off an initial seed value, X 0 X 0 X 1 =(ax 0 + c) mod m X 2 =(a[(ax 0 + c) mod m]+c) mod m... Requires careful choice of parameters: (X n )=7, 6, 9, 0, 7, 6, 9, 0,... X 0 = a = c =7 m = 10

16 Linear congruential generator Recursion builds off an initial seed value, X 0 X 0 X 1 =(ax 0 + c) mod m X 2 =(a[(ax 0 + c) mod m]+c) mod m... Requires careful choice of parameters: (X n )=7, 6, 9, 0, 7, 6, 9, 0,... X 0 = a = c =7 m = 10 very non-random, period 4

17 Linear congruential generator Any generator of the form X n+1 = F (X n ) taking m distinct values must be periodic with period P m For a linear congruential generator, one can show that the period is maximum if c is relatively prime to m; b = a 1 is a multiple of p, for very prime p dividing m b is a multiple of 4, if m is a multiple of 4.

18 Linear congruential generator For the sake of efficiency, specialize to the case m =2 32 Advantages: each integer fits into exactly one computer word the modulus (an expensive division operation) is automatically handled in hardware by overflow A specialized version of the maximum period rule: c =1 a 5 mod 8

19 Linear congruential generator A long repeating cycle does not imply randomness: (X n )=0, 1, 2,...,m 1 (a = c = 1) We require weak correlation between elements, X j X k X j X k (j = k), especially when j k is small Judged empirically via statistical tests (Die Hard)

20 Linear congruential generator Some other considerations: a = 10,c= 23,m= 566 best if a/m is not too small least significant bits are more X 2n+1 highly correlated complete orbits lie in hyperplanes (Marsaglia 1968): X 2n (X 0,X 1,...,X q 1 ), (X q,x q+1,...,x 2q 1 ),...

21 Probability distributions Suppose there are N discrete events occur with probabilities p 1,p 2,...,p N Since something must happen, the total sum is p 1 + p p N =1 Given a randomly generated number ξ [0, 1], how can we select one of the N events?

22 Probability distributions Each even i occupies a width p i in the interval: 1 0 < ξ <p 1 2 p 1 < ξ <p 1 + p 2 3 p 1 + p 2 < ξ <p 1 + p 2 + p 3... N p p N 1 < ξ < 1 p 0 1 p 2 p N 1

23 Probability distributions The relevant quantity is the cumulative probability, P i = i j=1 p j Similarly, for continuous distributions, we construct a cumulative probability distribution P (x) = x from the probability density dy p(y) p(x)

24 Probability distributions Sampling via p(x) x P 1 ([0, 1]) P(x) ξ x x p(x) P(x) ξ x x

25 Inverse transform method Example: p(x) = (1/λ)e x/λ if 0 x< 0 if x<0 Back map gives ξ P (x) = x 0 dy p(y) =1 e x/λ By inversion, we see that x λ ln(1 ξ) with ξ drawn uniformly from [0, 1] is equivalent to x drawn from the nonuniform distribution p(x)

26 Inverse transform method What about cases where no analytic inverse exists? In some cases, related multivariate distributions are invertible: e.g. Gaussian distribution p(x) = e x2 /2σ 2 2πσ 2 Consider the product p(x, y) =p(x)p(y) = e (x2 +y 2 )/2σ 2 2πσ 2

27 Inverse transform method From radial coordinates r = x 2 + y 2 θ = tan 1 (y/x) we can further transform ρ = r 2 /2 so that p(ρ, θ)dρ dθ = 1 2π e ρ dρ dθ x = 2ρ cos θ y = 2ρ sin θ Sampling is now possible with two random variables: x 2 ln(1 ξ 1 ) cos(2πξ 2 ) (Box-Muller)

28 Rejection method When P (x) is not easily invertible and no other tricks can be applied, try the following rejection method: Generate a sequence (x 1,x 2,x 3, ) with the elements drawn uniformly from [x min,x max ] Generate a sequence (ξ 1, ξ 2, ξ 3, ) with the elements drawn uniformly from [0,p max ] Discard elements from the first sequence if p(x i ) < ξ i

29 Rejection method Works by throwing away p(x) reject results that are rare p max Some limitations: the probability distribution must be bounded and have a finite range x min x max x accept

Class 12. Random Numbers

Class 12. Random Numbers Class 12. Random Numbers NRiC 7. Frequently needed to generate initial conditions. Often used to solve problems statistically. How can a computer generate a random number? It can t! Generators are pseudo-random.

More information

Monte Carlo Techniques

Monte Carlo Techniques Physics 75.502 Part III: Monte Carlo Methods 40 Monte Carlo Techniques Monte Carlo refers to any procedure that makes use of random numbers. Monte Carlo methods are used in: Simulation of natural phenomena

More information

Lecture 20. Randomness and Monte Carlo. J. Chaudhry. Department of Mathematics and Statistics University of New Mexico

Lecture 20. Randomness and Monte Carlo. J. Chaudhry. Department of Mathematics and Statistics University of New Mexico Lecture 20 Randomness and Monte Carlo J. Chaudhry Department of Mathematics and Statistics University of New Mexico J. Chaudhry (UNM) CS 357 1 / 40 What we ll do: Random number generators Monte-Carlo integration

More information

Review of Statistical Terminology

Review of Statistical Terminology Review of Statistical Terminology An experiment is a process whose outcome is not known with certainty. The experiment s sample space S is the set of all possible outcomes. A random variable is a function

More information

14 Random Variables and Simulation

14 Random Variables and Simulation 14 Random Variables and Simulation In this lecture note we consider the relationship between random variables and simulation models. Random variables play two important roles in simulation models. We assume

More information

Random numbers and generators

Random numbers and generators Chapter 2 Random numbers and generators Random numbers can be generated experimentally, like throwing dice or from radioactive decay measurements. In numerical calculations one needs, however, huge set

More information

Random Number Generation. Stephen Booth David Henty

Random Number Generation. Stephen Booth David Henty Random Number Generation Stephen Booth David Henty Introduction Random numbers are frequently used in many types of computer simulation Frequently as part of a sampling process: Generate a representative

More information

2008 Winton. Review of Statistical Terminology

2008 Winton. Review of Statistical Terminology 1 Review of Statistical Terminology 2 Formal Terminology An experiment is a process whose outcome is not known with certainty The experiment s sample space S is the set of all possible outcomes. A random

More information

CPSC 531: Random Numbers. Jonathan Hudson Department of Computer Science University of Calgary

CPSC 531: Random Numbers. Jonathan Hudson Department of Computer Science University of Calgary CPSC 531: Random Numbers Jonathan Hudson Department of Computer Science University of Calgary http://www.ucalgary.ca/~hudsonj/531f17 Introduction In simulations, we generate random values for variables

More information

Chapter 4: Monte Carlo Methods. Paisan Nakmahachalasint

Chapter 4: Monte Carlo Methods. Paisan Nakmahachalasint Chapter 4: Monte Carlo Methods Paisan Nakmahachalasint Introduction Monte Carlo Methods are a class of computational algorithms that rely on repeated random sampling to compute their results. Monte Carlo

More information

From Random Numbers to Monte Carlo. Random Numbers, Random Walks, Diffusion, Monte Carlo integration, and all that

From Random Numbers to Monte Carlo. Random Numbers, Random Walks, Diffusion, Monte Carlo integration, and all that From Random Numbers to Monte Carlo Random Numbers, Random Walks, Diffusion, Monte Carlo integration, and all that Random Walk Through Life Random Walk Through Life If you flip the coin 5 times you will

More information

Monte Carlo. Lecture 15 4/9/18. Harvard SEAS AP 275 Atomistic Modeling of Materials Boris Kozinsky

Monte Carlo. Lecture 15 4/9/18. Harvard SEAS AP 275 Atomistic Modeling of Materials Boris Kozinsky Monte Carlo Lecture 15 4/9/18 1 Sampling with dynamics In Molecular Dynamics we simulate evolution of a system over time according to Newton s equations, conserving energy Averages (thermodynamic properties)

More information

B. Maddah ENMG 622 Simulation 11/11/08

B. Maddah ENMG 622 Simulation 11/11/08 B. Maddah ENMG 622 Simulation 11/11/08 Random-Number Generators (Chapter 7, Law) Overview All stochastic simulations need to generate IID uniformly distributed on (0,1), U(0,1), random numbers. 1 f X (

More information

Random numbers and random number generators

Random numbers and random number generators Random numbers and random number generators It was a very popular deterministic philosophy some 300 years ago that if we know initial conditions and solve Eqs. of motion then the future is predictable.

More information

( x) ( ) F ( ) ( ) ( ) Prob( ) ( ) ( ) X x F x f s ds

( x) ( ) F ( ) ( ) ( ) Prob( ) ( ) ( ) X x F x f s ds Applied Numerical Analysis Pseudo Random Number Generator Lecturer: Emad Fatemizadeh What is random number: A sequence in which each term is unpredictable 29, 95, 11, 60, 22 Application: Monte Carlo Simulations

More information

UNIT 5:Random number generation And Variation Generation

UNIT 5:Random number generation And Variation Generation UNIT 5:Random number generation And Variation Generation RANDOM-NUMBER GENERATION Random numbers are a necessary basic ingredient in the simulation of almost all discrete systems. Most computer languages

More information

Probability Distributions

Probability Distributions 02/07/07 PHY310: Statistical Data Analysis 1 PHY310: Lecture 05 Probability Distributions Road Map The Gausssian Describing Distributions Expectation Value Variance Basic Distributions Generating Random

More information

Slides 3: Random Numbers

Slides 3: Random Numbers Slides 3: Random Numbers We previously considered a few examples of simulating real processes. In order to mimic real randomness of events such as arrival times we considered the use of random numbers

More information

Physics 403. Segev BenZvi. Monte Carlo Techniques. Department of Physics and Astronomy University of Rochester

Physics 403. Segev BenZvi. Monte Carlo Techniques. Department of Physics and Astronomy University of Rochester Physics 403 Monte Carlo Techniques Segev BenZvi Department of Physics and Astronomy University of Rochester Table of Contents 1 Simulation and Random Number Generation Simulation of Physical Systems Creating

More information

Topics in Computer Mathematics

Topics in Computer Mathematics Random Number Generation (Uniform random numbers) Introduction We frequently need some way to generate numbers that are random (by some criteria), especially in computer science. Simulations of natural

More information

Systems Simulation Chapter 7: Random-Number Generation

Systems Simulation Chapter 7: Random-Number Generation Systems Simulation Chapter 7: Random-Number Generation Fatih Cavdur fatihcavdur@uludag.edu.tr April 22, 2014 Introduction Introduction Random Numbers (RNs) are a necessary basic ingredient in the simulation

More information

Algorithms and Networking for Computer Games

Algorithms and Networking for Computer Games Algorithms and Networking for Computer Games Chapter 2: Random Numbers http://www.wiley.com/go/smed What are random numbers good for (according to D.E. Knuth) simulation sampling numerical analysis computer

More information

Uniform random numbers generators

Uniform random numbers generators Uniform random numbers generators Lecturer: Dmitri A. Moltchanov E-mail: moltchan@cs.tut.fi http://www.cs.tut.fi/kurssit/tlt-2707/ OUTLINE: The need for random numbers; Basic steps in generation; Uniformly

More information

Intelligent Systems I

Intelligent Systems I 1, Intelligent Systems I 12 SAMPLING METHODS THE LAST THING YOU SHOULD EVER TRY Philipp Hennig & Stefan Harmeling Max Planck Institute for Intelligent Systems 23. January 2014 Dptmt. of Empirical Inference

More information

B.N.Bandodkar College of Science, Thane. Random-Number Generation. Mrs M.J.Gholba

B.N.Bandodkar College of Science, Thane. Random-Number Generation. Mrs M.J.Gholba B.N.Bandodkar College of Science, Thane Random-Number Generation Mrs M.J.Gholba Properties of Random Numbers A sequence of random numbers, R, R,., must have two important statistical properties, uniformity

More information

Sources of randomness

Sources of randomness Random Number Generator Chapter 7 In simulations, we generate random values for variables with a specified distribution Ex., model service times using the exponential distribution Generation of random

More information

Probability Distributions - Lecture 5

Probability Distributions - Lecture 5 Probability Distributions - Lecture 5 1 Introduction There are a number of mathematical models of probability density functions that represent the behavior of physical systems. In this lecture we explore

More information

Generating Uniform Random Numbers

Generating Uniform Random Numbers 1 / 43 Generating Uniform Random Numbers Christos Alexopoulos and Dave Goldsman Georgia Institute of Technology, Atlanta, GA, USA March 1, 2016 2 / 43 Outline 1 Introduction 2 Some Generators We Won t

More information

Monte Carlo methods for kinetic equations

Monte Carlo methods for kinetic equations Monte Carlo methods for kinetic equations Lecture 2: Monte Carlo simulation methods Lorenzo Pareschi Department of Mathematics & CMCS University of Ferrara Italy http://utenti.unife.it/lorenzo.pareschi/

More information

Random Number Generation. CS1538: Introduction to simulations

Random Number Generation. CS1538: Introduction to simulations Random Number Generation CS1538: Introduction to simulations Random Numbers Stochastic simulations require random data True random data cannot come from an algorithm We must obtain it from some process

More information

One-Parameter Processes, Usually Functions of Time

One-Parameter Processes, Usually Functions of Time Chapter 4 One-Parameter Processes, Usually Functions of Time Section 4.1 defines one-parameter processes, and their variations (discrete or continuous parameter, one- or two- sided parameter), including

More information

Physics 403 Probability Distributions II: More Properties of PDFs and PMFs

Physics 403 Probability Distributions II: More Properties of PDFs and PMFs Physics 403 Probability Distributions II: More Properties of PDFs and PMFs Segev BenZvi Department of Physics and Astronomy University of Rochester Table of Contents 1 Last Time: Common Probability Distributions

More information

How does the computer generate observations from various distributions specified after input analysis?

How does the computer generate observations from various distributions specified after input analysis? 1 How does the computer generate observations from various distributions specified after input analysis? There are two main components to the generation of observations from probability distributions.

More information

Lecture 2 : CS6205 Advanced Modeling and Simulation

Lecture 2 : CS6205 Advanced Modeling and Simulation Lecture 2 : CS6205 Advanced Modeling and Simulation Lee Hwee Kuan 21 Aug. 2013 For the purpose of learning stochastic simulations for the first time. We shall only consider probabilities on finite discrete

More information

Generating Random Variables

Generating Random Variables Generating Random Variables These slides are created by Dr. Yih Huang of George Mason University. Students registered in Dr. Huang's courses at GMU can make a single machine-readable copy and print a single

More information

Random number generation

Random number generation CE 391F April 4, 2013 ANNOUNCEMENTS Homework 3 due today Homework 4 coming... Announcements Webinar announcement Femke van Wageningen-Kessels from TU Delft will be giving a webinar titled Traffic Flow

More information

Department of Electrical- and Information Technology. ETS061 Lecture 3, Verification, Validation and Input

Department of Electrical- and Information Technology. ETS061 Lecture 3, Verification, Validation and Input ETS061 Lecture 3, Verification, Validation and Input Verification and Validation Real system Validation Model Verification Measurements Verification Break model down into smaller bits and test each bit

More information

STA 294: Stochastic Processes & Bayesian Nonparametrics

STA 294: Stochastic Processes & Bayesian Nonparametrics MARKOV CHAINS AND CONVERGENCE CONCEPTS Markov chains are among the simplest stochastic processes, just one step beyond iid sequences of random variables. Traditionally they ve been used in modelling a

More information

Numerical methods for lattice field theory

Numerical methods for lattice field theory Numerical methods for lattice field theory Mike Peardon Trinity College Dublin August 9, 2007 Mike Peardon (Trinity College Dublin) Numerical methods for lattice field theory August 9, 2007 1 / 37 Numerical

More information

Brandon C. Kelly (Harvard Smithsonian Center for Astrophysics)

Brandon C. Kelly (Harvard Smithsonian Center for Astrophysics) Brandon C. Kelly (Harvard Smithsonian Center for Astrophysics) Probability quantifies randomness and uncertainty How do I estimate the normalization and logarithmic slope of a X ray continuum, assuming

More information

Statistics, Data Analysis, and Simulation SS 2013

Statistics, Data Analysis, and Simulation SS 2013 Mainz, May 2, 2013 Statistics, Data Analysis, and Simulation SS 2013 08.128.730 Statistik, Datenanalyse und Simulation Dr. Michael O. Distler 2. Random Numbers 2.1 Why random numbers:

More information

MTH739U/P: Topics in Scientific Computing Autumn 2016 Week 6

MTH739U/P: Topics in Scientific Computing Autumn 2016 Week 6 MTH739U/P: Topics in Scientific Computing Autumn 16 Week 6 4.5 Generic algorithms for non-uniform variates We have seen that sampling from a uniform distribution in [, 1] is a relatively straightforward

More information

Physics 403 Monte Carlo Techniques

Physics 403 Monte Carlo Techniques Physics 403 Monte Carlo Techniques Segev BenZvi Department of Physics and Astronomy University of Rochester Table of Contents 1 Simulation and Random Number Generation Simulation of Physical Systems Creating

More information

2 Random Variable Generation

2 Random Variable Generation 2 Random Variable Generation Most Monte Carlo computations require, as a starting point, a sequence of i.i.d. random variables with given marginal distribution. We describe here some of the basic methods

More information

A simple algorithm that will generate a sequence of integers between 0 and m is:

A simple algorithm that will generate a sequence of integers between 0 and m is: Using the Pseudo-Random Number generator Generating random numbers is a useful technique in many numerical applications in Physics. This is because many phenomena in physics are random, and algorithms

More information

Generating Uniform Random Numbers

Generating Uniform Random Numbers 1 / 41 Generating Uniform Random Numbers Christos Alexopoulos and Dave Goldsman Georgia Institute of Technology, Atlanta, GA, USA 10/13/16 2 / 41 Outline 1 Introduction 2 Some Lousy Generators We Won t

More information

PHY411 Lecture notes Part 5

PHY411 Lecture notes Part 5 PHY411 Lecture notes Part 5 Alice Quillen January 27, 2016 Contents 0.1 Introduction.................................... 1 1 Symbolic Dynamics 2 1.1 The Shift map.................................. 3 1.2

More information

General Principles in Random Variates Generation

General Principles in Random Variates Generation General Principles in Random Variates Generation E. Moulines and G. Fort Telecom ParisTech June 2015 Bibliography : Luc Devroye, Non-Uniform Random Variate Generator, Springer-Verlag (1986) available on

More information

How does the computer generate observations from various distributions specified after input analysis?

How does the computer generate observations from various distributions specified after input analysis? 1 How does the computer generate observations from various distributions specified after input analysis? There are two main components to the generation of observations from probability distributions.

More information

Lecture 5: Random numbers and Monte Carlo (Numerical Recipes, Chapter 7) Motivations for generating random numbers

Lecture 5: Random numbers and Monte Carlo (Numerical Recipes, Chapter 7) Motivations for generating random numbers Lecture 5: Random numbers and Monte Carlo (Numerical Recipes, Chapter 7) Motivations for generating random numbers To sample a function in a statistically controlled manner (i.e. for Monte Carlo integration)

More information

Uniform Random Number Generators

Uniform Random Number Generators JHU 553.633/433: Monte Carlo Methods J. C. Spall 25 September 2017 CHAPTER 2 RANDOM NUMBER GENERATION Motivation and criteria for generators Linear generators (e.g., linear congruential generators) Multiple

More information

Random number generators and random processes. Statistics and probability intro. Peg board example. Peg board example. Notes. Eugeniy E.

Random number generators and random processes. Statistics and probability intro. Peg board example. Peg board example. Notes. Eugeniy E. Random number generators and random processes Eugeniy E. Mikhailov The College of William & Mary Lecture 11 Eugeniy Mikhailov (W&M) Practical Computing Lecture 11 1 / 11 Statistics and probability intro

More information

Monte Carlo Simulations

Monte Carlo Simulations Monte Carlo Simulations What are Monte Carlo Simulations and why ones them? Pseudo Random Number generators Creating a realization of a general PDF The Bootstrap approach A real life example: LOFAR simulations

More information

Today: Fundamentals of Monte Carlo

Today: Fundamentals of Monte Carlo Today: Fundamentals of Monte Carlo What is Monte Carlo? Named at Los Alamos in 940 s after the casino. Any method which uses (pseudo)random numbers as an essential part of the algorithm. Stochastic - not

More information

Monte Carlo integration (naive Monte Carlo)

Monte Carlo integration (naive Monte Carlo) Monte Carlo integration (naive Monte Carlo) Example: Calculate π by MC integration [xpi] 1/21 INTEGER n total # of points INTEGER i INTEGER nu # of points in a circle REAL x,y coordinates of a point in

More information

functions Poisson distribution Normal distribution Arbitrary functions

functions Poisson distribution Normal distribution Arbitrary functions Physics 433: Computational Physics Lecture 6 Random number distributions Generation of random numbers of various distribuition functions Normal distribution Poisson distribution Arbitrary functions Random

More information

Discrete Mathematics and Probability Theory Fall 2018 Alistair Sinclair and Yun Song Note 6

Discrete Mathematics and Probability Theory Fall 2018 Alistair Sinclair and Yun Song Note 6 CS 70 Discrete Mathematics and Probability Theory Fall 2018 Alistair Sinclair and Yun Song Note 6 1 Modular Arithmetic In several settings, such as error-correcting codes and cryptography, we sometimes

More information

11 Division Mod n, Linear Integer Equations, Random Numbers, The Fundamental Theorem of Arithmetic

11 Division Mod n, Linear Integer Equations, Random Numbers, The Fundamental Theorem of Arithmetic 11 Division Mod n, Linear Integer Equations, Random Numbers, The Fundamental Theorem of Arithmetic Bezout s Lemma Let's look at the values of 4x + 6y when x and y are integers. If x is -6 and y is 4 we

More information

Physics Dec The Maxwell Velocity Distribution

Physics Dec The Maxwell Velocity Distribution Physics 301 7-Dec-2005 29-1 The Maxwell Velocity Distribution The beginning of chapter 14 covers some things we ve already discussed. Way back in lecture 6, we calculated the pressure for an ideal gas

More information

4.5 Applications of Congruences

4.5 Applications of Congruences 4.5 Applications of Congruences 287 66. Find all solutions of the congruence x 2 16 (mod 105). [Hint: Find the solutions of this congruence modulo 3, modulo 5, and modulo 7, and then use the Chinese remainder

More information

Random Number Generators

Random Number Generators 1/18 Random Number Generators Professor Karl Sigman Columbia University Department of IEOR New York City USA 2/18 Introduction Your computer generates" numbers U 1, U 2, U 3,... that are considered independent

More information

Cheng Soon Ong & Christian Walder. Canberra February June 2018

Cheng Soon Ong & Christian Walder. Canberra February June 2018 Cheng Soon Ong & Christian Walder Research Group and College of Engineering and Computer Science Canberra February June 2018 Outlines Overview Introduction Linear Algebra Probability Linear Regression

More information

Generating Uniform Random Numbers

Generating Uniform Random Numbers 1 / 44 Generating Uniform Random Numbers Christos Alexopoulos and Dave Goldsman Georgia Institute of Technology, Atlanta, GA, USA 10/29/17 2 / 44 Outline 1 Introduction 2 Some Lousy Generators We Won t

More information

cse 311: foundations of computing Fall 2015 Lecture 12: Primes, GCD, applications

cse 311: foundations of computing Fall 2015 Lecture 12: Primes, GCD, applications cse 311: foundations of computing Fall 2015 Lecture 12: Primes, GCD, applications n-bit unsigned integer representation Represent integer x as sum of powers of 2: If x = n 1 i=0 b i 2 i where each b i

More information

Lecture - 30 Stationary Processes

Lecture - 30 Stationary Processes Probability and Random Variables Prof. M. Chakraborty Department of Electronics and Electrical Communication Engineering Indian Institute of Technology, Kharagpur Lecture - 30 Stationary Processes So,

More information

Lecture Notes. Advanced Discrete Structures COT S

Lecture Notes. Advanced Discrete Structures COT S Lecture Notes Advanced Discrete Structures COT 4115.001 S15 2015-01-13 Recap Divisibility Prime Number Theorem Euclid s Lemma Fundamental Theorem of Arithmetic Euclidean Algorithm Basic Notions - Section

More information

Hochdimensionale Integration

Hochdimensionale Integration Oliver Ernst Institut für Numerische Mathematik und Optimierung Hochdimensionale Integration 14-tägige Vorlesung im Wintersemester 2010/11 im Rahmen des Moduls Ausgewählte Kapitel der Numerik Contents

More information

Lehmer Random Number Generators: Introduction

Lehmer Random Number Generators: Introduction Lehmer Random Number Generators: Introduction Revised version of the slides based on the book Discrete-Event Simulation: a first course LL Leemis & SK Park Section(s) 21, 22 c 2006 Pearson Ed, Inc 0-13-142917-5

More information

cse 311: foundations of computing Spring 2015 Lecture 12: Primes, GCD, applications

cse 311: foundations of computing Spring 2015 Lecture 12: Primes, GCD, applications cse 311: foundations of computing Spring 2015 Lecture 12: Primes, GCD, applications casting out 3s Theorem: A positive integer n is divisible by 3 if and only if the sum of its decimal digits is divisible

More information

MA1131 Lecture 15 (2 & 3/12/2010) 77. dx dx v + udv dx. (uv) = v du dx dx + dx dx dx

MA1131 Lecture 15 (2 & 3/12/2010) 77. dx dx v + udv dx. (uv) = v du dx dx + dx dx dx MA3 Lecture 5 ( & 3//00) 77 0.3. Integration by parts If we integrate both sides of the proct rule we get d (uv) dx = dx or uv = d (uv) = dx dx v + udv dx v dx dx + v dx dx + u dv dx dx u dv dx dx This

More information

MD Thermodynamics. Lecture 12 3/26/18. Harvard SEAS AP 275 Atomistic Modeling of Materials Boris Kozinsky

MD Thermodynamics. Lecture 12 3/26/18. Harvard SEAS AP 275 Atomistic Modeling of Materials Boris Kozinsky MD Thermodynamics Lecture 1 3/6/18 1 Molecular dynamics The force depends on positions only (not velocities) Total energy is conserved (micro canonical evolution) Newton s equations of motion (second order

More information

Ch3. Generating Random Variates with Non-Uniform Distributions

Ch3. Generating Random Variates with Non-Uniform Distributions ST4231, Semester I, 2003-2004 Ch3. Generating Random Variates with Non-Uniform Distributions This chapter mainly focuses on methods for generating non-uniform random numbers based on the built-in standard

More information

Section 2.1: Lehmer Random Number Generators: Introduction

Section 2.1: Lehmer Random Number Generators: Introduction Section 21: Lehmer Random Number Generators: Introduction Discrete-Event Simulation: A First Course c 2006 Pearson Ed, Inc 0-13-142917-5 Discrete-Event Simulation: A First Course Section 21: Lehmer Random

More information

METHODS FOR GENERATION OF RANDOM NUMBERS IN PARALLEL STOCHASTIC ALGORITHMS FOR GLOBAL OPTIMIZATION

METHODS FOR GENERATION OF RANDOM NUMBERS IN PARALLEL STOCHASTIC ALGORITHMS FOR GLOBAL OPTIMIZATION METHODS FOR GENERATION OF RANDOM NUMBERS IN PARALLEL STOCHASTIC ALGORITHMS FOR GLOBAL OPTIMIZATION Algirdas Lančinskas, Julius Žilinskas Institute of Mathematics and Informatics 1. Introduction Generation

More information

Commutative Rings and Fields

Commutative Rings and Fields Commutative Rings and Fields 1-22-2017 Different algebraic systems are used in linear algebra. The most important are commutative rings with identity and fields. Definition. A ring is a set R with two

More information

Today: Fundamentals of Monte Carlo

Today: Fundamentals of Monte Carlo Today: Fundamentals of Monte Carlo What is Monte Carlo? Named at Los Alamos in 1940 s after the casino. Any method which uses (pseudo)random numbers as an essential part of the algorithm. Stochastic -

More information

Data Analysis I. Dr Martin Hendry, Dept of Physics and Astronomy University of Glasgow, UK. 10 lectures, beginning October 2006

Data Analysis I. Dr Martin Hendry, Dept of Physics and Astronomy University of Glasgow, UK. 10 lectures, beginning October 2006 Astronomical p( y x, I) p( x, I) p ( x y, I) = p( y, I) Data Analysis I Dr Martin Hendry, Dept of Physics and Astronomy University of Glasgow, UK 10 lectures, beginning October 2006 4. Monte Carlo Methods

More information

( ) ( ) Monte Carlo Methods Interested in. E f X = f x d x. Examples:

( ) ( ) Monte Carlo Methods Interested in. E f X = f x d x. Examples: Monte Carlo Methods Interested in Examples: µ E f X = f x d x Type I error rate of a hypothesis test Mean width of a confidence interval procedure Evaluating a likelihood Finding posterior mean and variance

More information

Finally, a theory of random number generation

Finally, a theory of random number generation Finally, a theory of random number generation F. James, CERN, Geneva Abstract For a variety of reasons, Monte Carlo methods have become of increasing importance among mathematical methods for solving all

More information

Generating the Sample

Generating the Sample STAT 80: Mathematical Statistics Monte Carlo Suppose you are given random variables X,..., X n whose joint density f (or distribution) is specified and a statistic T (X,..., X n ) whose distribution you

More information

1. Prove that the number cannot be represented as a 2 +3b 2 for any integers a and b. (Hint: Consider the remainder mod 3).

1. Prove that the number cannot be represented as a 2 +3b 2 for any integers a and b. (Hint: Consider the remainder mod 3). 1. Prove that the number 123456782 cannot be represented as a 2 +3b 2 for any integers a and b. (Hint: Consider the remainder mod 3). Solution: First, note that 123456782 2 mod 3. How did we find out?

More information

A field F is a set of numbers that includes the two numbers 0 and 1 and satisfies the properties:

A field F is a set of numbers that includes the two numbers 0 and 1 and satisfies the properties: Byte multiplication 1 Field arithmetic A field F is a set of numbers that includes the two numbers 0 and 1 and satisfies the properties: F is an abelian group under addition, meaning - F is closed under

More information

Monte Carlo Methods. Jesús Fernández-Villaverde University of Pennsylvania

Monte Carlo Methods. Jesús Fernández-Villaverde University of Pennsylvania Monte Carlo Methods Jesús Fernández-Villaverde University of Pennsylvania 1 Why Monte Carlo? From previous chapter, we want to compute: 1. Posterior distribution: π ³ θ Y T,i = f(y T θ,i)π (θ i) R Θ i

More information

Modern Methods of Data Analysis - WS 07/08

Modern Methods of Data Analysis - WS 07/08 Modern Methods of Data Analysis Lecture III (29.10.07) Contents: Overview & Test of random number generators Random number distributions Monte Carlo The terminology Monte Carlo-methods originated around

More information

MATH 115, SUMMER 2012 LECTURE 12

MATH 115, SUMMER 2012 LECTURE 12 MATH 115, SUMMER 2012 LECTURE 12 JAMES MCIVOR - last time - we used hensel s lemma to go from roots of polynomial equations mod p to roots mod p 2, mod p 3, etc. - from there we can use CRT to construct

More information

So we will instead use the Jacobian method for inferring the PDF of functionally related random variables; see Bertsekas & Tsitsiklis Sec. 4.1.

So we will instead use the Jacobian method for inferring the PDF of functionally related random variables; see Bertsekas & Tsitsiklis Sec. 4.1. 2011 Page 1 Simulating Gaussian Random Variables Monday, February 14, 2011 2:00 PM Readings: Kloeden and Platen Sec. 1.3 Why does the Box Muller method work? How was it derived? The basic idea involves

More information

2x 1 7. A linear congruence in modular arithmetic is an equation of the form. Why is the solution a set of integers rather than a unique integer?

2x 1 7. A linear congruence in modular arithmetic is an equation of the form. Why is the solution a set of integers rather than a unique integer? Chapter 3: Theory of Modular Arithmetic 25 SECTION C Solving Linear Congruences By the end of this section you will be able to solve congruence equations determine the number of solutions find the multiplicative

More information

In Z: x + 3 = 2 3x = 2 x = 1 No solution In Q: 3x = 2 x 2 = 2. x = 2 No solution. In R: x 2 = 2 x = 0 x = ± 2 No solution Z Q.

In Z: x + 3 = 2 3x = 2 x = 1 No solution In Q: 3x = 2 x 2 = 2. x = 2 No solution. In R: x 2 = 2 x = 0 x = ± 2 No solution Z Q. THE UNIVERSITY OF NEW SOUTH WALES SCHOOL OF MATHEMATICS AND STATISTICS MATH 1141 HIGHER MATHEMATICS 1A ALGEBRA. Section 1: - Complex Numbers. 1. The Number Systems. Let us begin by trying to solve various

More information

Symbolic Dynamics of Digital Signal Processing Systems

Symbolic Dynamics of Digital Signal Processing Systems Symbolic Dynamics of Digital Signal Processing Systems Dr. Bingo Wing-Kuen Ling School of Engineering, University of Lincoln. Brayford Pool, Lincoln, Lincolnshire, LN6 7TS, United Kingdom. Email: wling@lincoln.ac.uk

More information

STEP Support Programme. Pure STEP 1 Questions

STEP Support Programme. Pure STEP 1 Questions STEP Support Programme Pure STEP 1 Questions 2012 S1 Q4 1 Preparation Find the equation of the tangent to the curve y = x at the point where x = 4. Recall that x means the positive square root. Solve the

More information

Today: Fundamentals of Monte Carlo

Today: Fundamentals of Monte Carlo Today: Fundamentals of Monte Carlo What is Monte Carlo? Named at Los Alamos in 1940 s after the casino. Any method which uses (pseudo)random numbers as an essential part of the algorithm. Stochastic -

More information

π π π points:= { seq([n*cos(pi/4*n), N*sin(Pi/4*N)], N=0..120) }:

π π π points:= { seq([n*cos(pi/4*n), N*sin(Pi/4*N)], N=0..120) }: ITEGER SPIRAL Several years ago we found a way to conveniently plot all positive integers as points along an Archimedes spiral. We want here to examine this problem in more detail. We begin by defining

More information

FERMAT S TEST KEITH CONRAD

FERMAT S TEST KEITH CONRAD FERMAT S TEST KEITH CONRAD 1. Introduction Fermat s little theorem says for prime p that a p 1 1 mod p for all a 0 mod p. A naive extension of this to a composite modulus n 2 would be: for all a 0 mod

More information

cse 311: foundations of computing Fall 2015 Lecture 11: Modular arithmetic and applications

cse 311: foundations of computing Fall 2015 Lecture 11: Modular arithmetic and applications cse 311: foundations of computing Fall 2015 Lecture 11: Modular arithmetic and applications arithmetic mod 7 a + 7 b = (a + b) mod 7 a 7 b = (a b) mod 7 5 6 0 1 2 4 3 + 0 1 2 3 4 5 6 0 0 1 2 3 4 5 6 1

More information

Monte Carlo Radiation Transfer I

Monte Carlo Radiation Transfer I Monte Carlo Radiation Transfer I Monte Carlo Photons and interactions Sampling from probability distributions Optical depths, isotropic emission, scattering Monte Carlo Basics Emit energy packet, hereafter

More information

Monte Carlo (MC) Simulation Methods. Elisa Fadda

Monte Carlo (MC) Simulation Methods. Elisa Fadda Monte Carlo (MC) Simulation Methods Elisa Fadda 1011-CH328, Molecular Modelling & Drug Design 2011 Experimental Observables A system observable is a property of the system state. The system state i is

More information

Discrete Mathematics and Probability Theory Summer 2014 James Cook Note 5

Discrete Mathematics and Probability Theory Summer 2014 James Cook Note 5 CS 70 Discrete Mathematics and Probability Theory Summer 2014 James Cook Note 5 Modular Arithmetic In several settings, such as error-correcting codes and cryptography, we sometimes wish to work over a

More information

Topic Contents. Factoring Methods. Unit 3: Factoring Methods. Finding the square root of a number

Topic Contents. Factoring Methods. Unit 3: Factoring Methods. Finding the square root of a number Topic Contents Factoring Methods Unit 3 The smallest divisor of an integer The GCD of two numbers Generating prime numbers Computing prime factors of an integer Generating pseudo random numbers Raising

More information

ALGEBRA. 1. Some elementary number theory 1.1. Primes and divisibility. We denote the collection of integers

ALGEBRA. 1. Some elementary number theory 1.1. Primes and divisibility. We denote the collection of integers ALGEBRA CHRISTIAN REMLING 1. Some elementary number theory 1.1. Primes and divisibility. We denote the collection of integers by Z = {..., 2, 1, 0, 1,...}. Given a, b Z, we write a b if b = ac for some

More information

Engineering Physics 1 Dr. B. K. Patra Department of Physics Indian Institute of Technology-Roorkee

Engineering Physics 1 Dr. B. K. Patra Department of Physics Indian Institute of Technology-Roorkee Engineering Physics 1 Dr. B. K. Patra Department of Physics Indian Institute of Technology-Roorkee Module-05 Lecture-04 Maxwellian Distribution Law of Velocity Part 02 So, we have already told to experiment

More information