Computing and Statistical Data Analysis Stat 3: The Monte Carlo Method

Slides:



Advertisements
Similar presentations
Generating Random Numbers
Advertisements

Monte Carlo Methods and Statistical Physics
Random Numbers. Two Types of Random Numbers 1.True random numbers: True random numbers are generated in non- deterministic ways. They are not predictable.
Random number generation Algorithms and Transforms to Univariate Distributions.
G. Cowan RHUL Physics Profile likelihood for systematic uncertainties page 1 Use of profile likelihood to determine systematic uncertainties ATLAS Top.
Using random numbers Simulation: accounts for uncertainty: biology (large number of individuals), physics (large number of particles, quantum mechanics),
Pseudorandom Number Generators
Statistics.
K. Desch – Statistical methods of data analysis SS10
Chapter 14 Simulation. Monte Carlo Process Statistical Analysis of Simulation Results Verification of the Simulation Model Computer Simulation with Excel.
CSCE Monte Carlo Methods When you can’t do the math, simulate the process with random numbers Numerical integration to get areas/volumes Particle.
Introduction to Statistics − Day 2
G. Cowan RHUL Physics Bayesian Higgs combination page 1 Bayesian Higgs combination using shapes ATLAS Statistics Meeting CERN, 19 December, 2007 Glen Cowan.
1 CE 530 Molecular Simulation Lecture 7 David A. Kofke Department of Chemical Engineering SUNY Buffalo
Simulation of Random Walk How do we investigate this numerically? Choose the step length to be a=1 Use a computer to generate random numbers r i uniformly.
Simulation Examples ~ By Hand ~ Using Excel
Uniovi1 Some distributions Distribution/pdfExample use in HEP BinomialBranching ratio MultinomialHistogram with fixed N PoissonNumber of events found UniformMonte.
CPSC 531: RN Generation1 CPSC 531:Random-Number Generation Instructor: Anirban Mahanti Office: ICT Class Location:
Chapter 7 Random-Number Generation
CS 450 – Modeling and Simulation Dr. X. Topics What Does Randomness Mean? Randomness in games Generating Random Values Random events in real life: measuring.
Module 1: Statistical Issues in Micro simulation Paul Sousa.
Basic Concepts in Number Theory Background for Random Number Generation 1.For any pair of integers n and m, m  0, there exists a unique pair of integers.
Random Numbers and Simulation  Generating truly random numbers is not possible Programs have been developed to generate pseudo-random numbers Programs.
Random Number Generators 1. Random number generation is a method of producing a sequence of numbers that lack any discernible pattern. Random Number Generators.
Pseudo-random generators Random Number Generating There are three types of generators table look-up generators hardware generators algorithmic (software)
Monte Carlo Methods.
Experimental Method and Data Process: “Monte Carlo Method” Presentation # 1 Nafisa Tasneem CHEP,KNU
G. Cowan Statistical Methods in Particle Physics1 Statistical Methods in Particle Physics Day 1: Introduction 清华大学高能物理研究中心 2010 年 4 月 12—16 日 Glen Cowan.
G. Cowan Computing and Statistical Data Analysis / Stat 2 1 Computing and Statistical Data Analysis Stat 2: Catalogue of pdfs London Postgraduate Lectures.
G. Cowan Lectures on Statistical Data Analysis Lecture 1 page 1 Lectures on Statistical Data Analysis London Postgraduate Lectures on Particle Physics;
Monte Carlo Methods So far we have discussed Monte Carlo methods based on a uniform distribution of random numbers on the interval [0,1] p(x) = 1 0  x.
APPENDIX D R ANDOM N UMBER G ENERATION Organization of chapter in ISSO* – General description and linear congruential generators Criteria for “good” random.
Random Number Generator. Random number Random number: Uniform distribution on [0,1] Random device: dice, coin -> cannot generate the equal sequence.
G. Cowan RHUL Physics Bayesian Higgs combination page 1 Bayesian Higgs combination based on event counts (follow-up from 11 May 07) ATLAS Statistics Forum.
G. Cowan Computing and Statistical Data Analysis / Stat 9 1 Computing and Statistical Data Analysis Stat 9: Parameter Estimation, Limits London Postgraduate.
1 Introduction to Statistics − Day 2 Glen Cowan Lecture 1 Probability Random variables, probability densities, etc. Brief catalogue of probability densities.
G. Cowan Lectures on Statistical Data Analysis Lecture 5 page 1 Statistical Data Analysis: Lecture 5 1Probability, Bayes’ theorem 2Random variables and.
0 Simulation Modeling and Analysis: Input Analysis 7 Random Numbers Ref: Law & Kelton, Chapter 7.
Module 9.2 Simulations. Computer simulation Having computer program imitate reality, in order to study situations and make decisions Applications?
Chapter 3 Generating Uniform Random Variables. In any kind of simulation, we need data, or we have to produce them. Especially in Monte Marco simulation.
MONTE CARLO METHOD DISCRETE SIMULATION RANDOM NUMBER GENERATION Chapter 3 : Random Number Generation.
Random Numbers and Simulation
Independent Cascade Model and Linear Threshold Model
Introduction to Statistics − Day 2
3. Random Number Generator
MONTE CARLO SIMULATION
iSTEP 2016 Tsinghua University, Beijing July 10-20, 2016
Generating Random Numbers
Lectures on Statistical Data Analysis
An Introduction to Random Number Generators and Monte Carlo Methods
Random Number Generators
Independent Cascade Model and Linear Threshold Model
Random-Number Generation
Chapter 7 Random Number Generation
Chapter 7 Random-Number Generation
Graduierten-Kolleg RWTH Aachen February 2014 Glen Cowan
Properties of Random Numbers
Lecture 2 – Monte Carlo method in finance
Computing and Statistical Data Analysis / Stat 8
Statistics for Particle Physics Lecture 1: Fundamentals
Computing and Statistical Data Analysis Stat 5: Multivariate Methods
Computing and Statistical Data Analysis / Stat 6
Computing and Statistical Data Analysis / Stat 7
Computer Simulation Techniques Generating Pseudo-Random Numbers
Monte Carlo Methods for Pricing Financial Options
Statistical Methods for Data Analysis Random number generators
Random Number Generation
Independent Cascade Model and Linear Threshold Model
Computing and Statistical Data Analysis / Stat 10
Maximum Likelihood Estimation (MLE)
Presentation transcript:

Computing and Statistical Data Analysis Stat 3: The Monte Carlo Method London Postgraduate Lectures on Particle Physics; University of London MSci course PH4515 Glen Cowan Physics Department Royal Holloway, University of London g.cowan@rhul.ac.uk www.pp.rhul.ac.uk/~cowan Course web page: www.pp.rhul.ac.uk/~cowan/stat_course.html G. Cowan Computing and Statistical Data Analysis / Stat 3

Computing and Statistical Data Analysis / Stat 3 The Monte Carlo method What it is: a numerical technique for calculating probabilities and related quantities using sequences of random numbers. The usual steps: (1) Generate sequence r1, r2, ..., rm uniform in [0, 1]. (2) Use this to produce another sequence x1, x2, ..., xn distributed according to some pdf f (x) in which we’re interested (x can be a vector). (3) Use the x values to estimate some property of f (x), e.g., fraction of x values with a < x < b gives → MC calculation = integration (at least formally) MC generated values = ‘simulated data’ → use for testing statistical procedures G. Cowan Computing and Statistical Data Analysis / Stat 3

Random number generators Goal: generate uniformly distributed values in [0, 1]. Toss coin for e.g. 32 bit number... (too tiring). → ‘random number generator’ = computer algorithm to generate r1, r2, ..., rn. Example: multiplicative linear congruential generator (MLCG) ni+1 = (a ni) mod m , where ni = integer a = multiplier m = modulus n0 = seed (initial value) N.B. mod = modulus (remainder), e.g. 27 mod 5 = 2. This rule produces a sequence of numbers n0, n1, ... G. Cowan Computing and Statistical Data Analysis / Stat 3

Random number generators (2) The sequence is (unfortunately) periodic! Example (see Brandt Ch 4): a = 3, m = 7, n0 = 1 ← sequence repeats Choose a, m to obtain long period (maximum = m - 1); m usually close to the largest integer that can represented in the computer. Only use a subset of a single period of the sequence. G. Cowan Computing and Statistical Data Analysis / Stat 3

Random number generators (3) are in [0, 1] but are they ‘random’? Choose a, m so that the ri pass various tests of randomness: uniform distribution in [0, 1], all values independent (no correlations between pairs), e.g. L’Ecuyer, Commun. ACM 31 (1988) 742 suggests a = 40692 m = 2147483399 Far better generators available, e.g. TRandom3, based on Mersenne twister algorithm, period = 219937 - 1 (a “Mersenne prime”). See F. James, Comp. Phys. Comm. 60 (1990) 111; Brandt Ch. 4 G. Cowan Computing and Statistical Data Analysis / Stat 3