1 / 52

The Monte Carlo Method: an Introduction

The Monte Carlo Method: an Introduction. Detlev Reiter. Research Centre Jülich (FZJ) D -52425 Jülich http://www.fz-juelich.de e-mail: d.reiter@fz-juelich.de Tel.: 02461 / 61-5841. Vorlesung HHU Düsseldorf , WS 07/08 March 2008. There are two dominant methods of simulation

lyndon
Download Presentation

The Monte Carlo Method: an Introduction

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The Monte Carlo Method: an Introduction Detlev Reiter Research Centre Jülich (FZJ) D -52425 Jülich http://www.fz-juelich.de e-mail: d.reiter@fz-juelich.de Tel.: 02461 / 61-5841 Vorlesung HHU Düsseldorf, WS 07/08 March 2008

  2. There are two dominant methods of simulation • for complex many particle systems • Molecular Dynamics • Solve the classical equations of motion from mechanics. • Particles interact via a given interaction potential. • Deterministic behaviour (within numerical precision). • Find temporal evolution. • 2) Monte Carlo Simulation • Find mean values (expectation values) of some system components. • Random behaviour from given probability distribution laws. The Monte Carlo technique is a very far spread technique, because it is not limited to systems of particles.

  3. This lecture • Brief introduction: simulation • What is the Monte Carlo Method • Random number generation • Integration by Monte Carlo • Tomorrow: one (of many) particular application: • particle transport by Monte Carlo

  4. ASDEX-UPDRADE (IPP Garching)

  5. Monte Carlo particle trajectories, ions and neutral particles

  6. Basic principle of the Monte Carlo method The task: calculate (estimate) a number I (one number only. Not an entire functional dependence). Historic example: A dull way to calculate p Numerically: look for an appropriate convergent series and evaluate this approximately by Monte Carlo: look for a stochastic model (i.e.: (W, s, p, X): probability space with random variable X) Example: throw a needle an a sheet with equidistant parallel stripes. Distance between stripes: D, length of needle: L, L<D.

  7. First application of Monte Carlo Method The needle experiment of Comte de Buffon, 1733 (french biologist, 1707-1788) What is the probability p, that a needle (length L), which randomly falls on a sheet, crosses one of the lines (distance D)? (N trials, n „hits“)

  8. Yt =1, if crossing, Yt=0 else, then

  9. Today: • Using a computer to generate random events: • We need to be able to generate random numbers X • with any given probability function f(x), or • a given cumulative distribution F(x) . • Uniformly distributed random numbers • General random numbers: can be obtained • from a sequence of independent uniform random • numbers

  10. Random number generation f(x) 1/(b-a) a b

  11. We will see next: Any continuous distribution can be generated from uniform random numbers on [0,1] Any discrete distribution can be generated from uniform random numbers on [0,1] Hence: Any given distribution can be generated from uniform random numbers on [0,1]

  12. Strategy: try to transform F to another distribution, such that inverse of new F is explicitly known.

  13. Example: Normal (Gaussian) distribution Cumulative distr. function Inverse cumul. distr. fct. best format of storing distributions for Monte Carlo applications: „Inverse cumulative distribution function F-1(x)“, x uniform [0,1]

  14. Exercise (and most important example:) Generate random numbers from a Gaussian. Let X, Y two independent Gaussian random numbers. Transform to polar coordiantes (Jacobian!) R, Φ Sample Φ (trivial, it is uniform on 2π) Apply inversion method for R Transform sampled Φ, R back to X, Y. This is a pair of Gaussians. (Box-Muller Method)

  15. Exponential distribution by „inversion“ Note: Z and 1-Z have same distrib. (see tomorrow)

  16. Cauchy: e.g.: natural Line broadening

  17. (stepwise constant, with steps at points T)

  18. Rejection enclosing rectangle Reject z Accept z, take x=z y uniform z, uniform f(x): distribution density y=f(x) sample x from f(x) X

  19. NEXT: Any Monte Carlo estimate can be regarded as a mean value, i.e. an integral (or sum) over a given probability distribution, ususally in a high dimensional space (e.g. of random walks….) Generic Monte Carlo: Integration Hence: How does Monte Carlo integration work?

  20. Hit or Miss known area miss hit x2 uniform x1, uniform I: unknown area f(x) I = ∫ f(x) dx X

  21. Suggestion: try again with previous example from dull and crude Monte Carlo

  22. Outlook: next lecture (tomorrow)

  23. END

More Related