Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Rejection sampling
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Algorithm== The algorithm, which was used by [[John von Neumann]]<ref>{{Cite journal |last=Forsythe |first=George E. |date=1972 |title=Von Neumann's Comparison Method for Random Sampling from the Normal and Other Distributions |url=https://www.jstor.org/stable/2005864 |journal=Mathematics of Computation |volume=26 |issue=120 |pages=817β826 |doi=10.2307/2005864 |jstor=2005864 |issn=0025-5718}}</ref> and dates back to [[Georges-Louis Leclerc, Comte de Buffon|Buffon]] and [[Buffon's needle|his needle]],<ref>{{Cite journal |last1=Legault |first1=Geoffrey |last2=Melbourne |first2=Brett A. |date=2019-03-01 |title=Accounting for environmental change in continuous-time stochastic population models |url=https://doi.org/10.1007/s12080-018-0386-z |journal=Theoretical Ecology |language=en |volume=12 |issue=1 |pages=31β48 |doi=10.1007/s12080-018-0386-z |issn=1874-1746}}</ref> obtains a sample from distribution <math>X</math> with density <math>f</math> using samples from distribution <math>Y</math> with density <math>g</math> as follows: * Obtain a sample <math>y</math> from distribution <math>Y</math> and a sample <math>u</math> from <math>\mathrm{Unif}(0,1)</math> (the uniform distribution over the unit interval). * Check if <math display="inline">u<f(y)/Mg(y)</math>. ** If this holds, accept <math>y</math> as a sample drawn from <math>f</math>; ** if not, reject the value of <math>y</math> and return to the sampling step. The algorithm will take an average of <math>M</math> iterations to obtain a sample.<ref>{{Cite book |last=Thomopoulos |first=Nick T. |title=Essentials of Monte Carlo Simulation: Statistical Methods for Building Simulation Models |date=2012-12-19 |publisher=Springer |isbn=978-1-4614-6021-3 |edition=2013th |location=New York, NY Heidelberg |language=English}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)