wun2k2 - ing regions and h ( u ) functional forms as for...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Duke University Department of Physics Physics 392 Fall Term 2011 WUN2K FOR LECTURE 2 These are notes summarizing the main concepts you need to understand and be able to apply. Methods for generation of random numbers u from a given function Q ( u ) (assume normalized) include: The simple “weighting” method: for each uniformly thrown point u i , assign a “weight” w i = Q ( u i ). This is simple, and can always be done, but one needs to keep track of the weights. Disadvantages are that it’s not obvious what the MC statistics are, and points with very small weight have in some way “wasted” random number generation cycles. The “acceptance-rejection” method: this is similar to the cor- responding integration method. One chooses a function Ch ( u ) which completely encloses Q ( u ). Points ( u,v ) points are uni- formly generated; v is generated on [0 , 1] and points are accepted if vCh ( u ) Q ( u ), and rejected otherwise. Similar tricks for select-
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ing regions and h ( u ) functional forms as for the integration case can be employed. This method has the disadvantage that two random numbers per event (entry in the distribution) are needed, but this method can almost always be used (assuming that the maximum value of Q ( u ) can be known). The inverse transform method: if the goal is to choose v from distribution Q ( v ), one rst calculates F ( v ) = R v Q ( v ) dv , the cu-mulative distribution function. Then one chooses u uniformly: v = F-1 ( u ) will be distributed according to Q ( v ). This method requires only one random number per event; however it must be feasible to compute the inverse cumulative distribution function. Good software for implementing this method is called UNURAN ; this software is employed by Root....
View Full Document

This note was uploaded on 01/16/2012 for the course PHYSICS 392 taught by Professor Scholberg during the Fall '11 term at Duke.

Page1 / 2

wun2k2 - ing regions and h ( u ) functional forms as for...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online