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 method
(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!
=== An example === Suppose we want to know how many times we should expect to throw three eight-sided dice for the total of the dice throws to be at least <math>T</math>. We know the expected value exists. The dice throws are randomly distributed and independent of each other. So simple Monte Carlo is applicable: <small>''s'' = 0; '''for''' ''i'' = 1 to ''n'' '''do''' throw the three dice until ''T'' is met or first exceeded</small>; <small>''r<sub>i</sub>'' = the number of throws</small>; <small>''s'' = ''s'' + ''r<sub>i</sub>'';</small> <small>'''repeat''' ''m'' = ''s'' / ''n'';</small> If <math>n</math> is large enough, <math>m</math> will be within <math>\epsilon</math> of <math>\mu</math> for any <math>\epsilon > 0</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)