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
Monte Carlo integration
(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!
=== Example === [[File:Relative error of a Monte Carlo integration to calculate pi.svg|thumb|right|350px|Relative error as a function of the number of samples, showing the scaling <math>\tfrac{1}{\sqrt{N}}</math>]] A paradigmatic example of a Monte Carlo integration is the estimation of Ο. Consider the function <math display="block">H\left(x,y\right)=\begin{cases} 1 & \text{if }x^{2}+y^{2}\leq1\\ 0 & \text{else} \end{cases}</math> and the set Ξ© = [β1,1] Γ [β1,1] with ''V'' = 4. Notice that <math display="block">I_\pi = \int_\Omega H(x,y) dx dy = \pi.</math> Thus, a crude way of calculating the value of Ο with Monte Carlo integration is to pick ''N'' random numbers on Ξ© and compute <math display="block">Q_N = 4 \frac{1}{N}\sum_{i=1}^N H(x_{i},y_{i})</math> In the figure on the right, the relative error <math>\tfrac{Q_N-\pi}{\pi}</math> is measured as a function of ''N'', confirming the <math>\tfrac{1}{\sqrt{N}}</math>.
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)