Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Pi
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
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!
=== Monte Carlo methods === {{multiple image | direction = horizontal | image1 = Buffon needle.svg | caption1 = [[Buffon's needle]]. Needles ''a'' and ''b'' are dropped randomly. | alt1 = Needles of length ''ℓ'' scattered on stripes with width ''t'' | image2 = Pi 30K.gif | caption2 = Random dots are placed on a square and a circle inscribed inside. | alt2 = Thousands of dots randomly covering a square and a circle inscribed in the square. | align = left | total_width = 225 }} [[Monte Carlo methods]], which evaluate the results of multiple random trials, can be used to create approximations of {{pi}}.{{sfn|Arndt|Haenel|2006|p=39}} [[Buffon's needle]] is one such technique: If a needle of length {{math|''ℓ''}} is dropped {{math|''n''}} times on a surface on which parallel lines are drawn {{math|''t''}} units apart, and if {{math|''x''}} of those times it comes to rest crossing a line ({{math|''x''}} > 0), then one may approximate {{pi}} based on the counts:<ref name="bn">{{cite journal |last=Ramaley |first=J. F. |title=Buffon's Needle Problem |jstor=2317945 |journal=The American Mathematical Monthly |volume=76 |issue=8 |date=October 1969 |pages=916–918 |doi=10.2307/2317945}}</ref> <math display=block>\pi \approx \frac{2n\ell}{xt}.</math> Another Monte Carlo method for computing {{pi}} is to draw a circle inscribed in a square, and randomly place dots in the square. The ratio of dots inside the circle to the total number of dots will approximately equal {{math|π/4}}.<ref>{{harvnb|Arndt|Haenel|2006|pp=39–40}}.{{br}} {{harvnb|Posamentier|Lehmann|2004|p=105}}.</ref> [[File:Five random walks.png|thumb|Five random walks with 200 steps. The sample mean of {{math|{{abs|''W''<sub>200</sub>}}}} is {{math|''μ'' {{=}} 56/5}}, and so {{math|2(200)''μ''<sup>−2</sup> ≈ 3.19}} is within {{math|0.05}} of {{pi}}.|left]] Another way to calculate {{pi}} using probability is to start with a [[random walk]], generated by a sequence of (fair) coin tosses: independent [[random variable]]s {{math|''X<sub>k</sub>''}} such that {{math|''X<sub>k</sub>'' ∈ {{mset|−1,1}}}} with equal probabilities. The associated random walk is <math display=block>W_n = \sum_{k=1}^n X_k</math> so that, for each {{mvar|n}}, {{math|''W<sub>n</sub>''}} is drawn from a shifted and scaled [[binomial distribution]]. As {{mvar|n}} varies, {{math|''W<sub>n</sub>''}} defines a (discrete) [[stochastic process]]. Then {{pi}} can be calculated by<ref>{{cite journal |last=Grünbaum |first=B. |author-link=Branko Grünbaum |title=Projection Constants |journal=[[Transactions of the American Mathematical Society]] |volume=95 |issue=3 |pages=451–465 |year=1960 |doi=10.1090/s0002-9947-1960-0114110-9 |doi-access=free}}</ref> <math display=block>\pi = \lim_{n\to\infty} \frac{2n}{E[|W_n|]^2}.</math> This Monte Carlo method is independent of any relation to circles, and is a consequence of the [[central limit theorem]], discussed [[#Gaussian integrals|below]]. These Monte Carlo methods for approximating {{pi}} are very slow compared to other methods, and do not provide any information on the exact number of digits that are obtained. Thus they are never used to approximate {{pi}} when speed or accuracy is desired.<ref>{{harvnb|Arndt|Haenel|2006|p=43}}.{{br}}{{harvnb|Posamentier|Lehmann|2004|pp=105–108}}.</ref>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Pi
(section)
Add topic