Deuxième modification du fichier toy_document_orgmode_R_fr.org

parent c549f78f
......@@ -11,14 +11,14 @@
#+HTML_HEAD: <script type="text/javascript" src="http://www.pirilampo.org/styles/lib/js/jquery.stickytableheaders.js"></script>
#+HTML_HEAD: <script type="text/javascript" src="http://www.pirilampo.org/styles/readtheorg/js/readtheorg.js"></script>
* En demandant à la lib maths
* 1. En demandant à la lib maths
Mon ordinateur m'indique que π vaut approximativement
#+begin_src R :results output :exports both
pi
#+end_src
* En utilisant la méthode des [[https://fr.wikipedia.org/wiki/Aiguille_de_Buffon][aiguilles de Buffon]]
* 2. En utilisant la méthode des [[https://fr.wikipedia.org/wiki/Aiguille_de_Buffon][aiguilles de Buffon]]
Mais calculé avec la *méthode* des aiguilles de Buffon, on obtiendrait comme *approximation* :
#+begin_src R :results output :exports both
......@@ -29,7 +29,7 @@ theta = pi/2*runif(N)
2/(mean(x+sin(theta)>1))
#+end_src
* Avec un argument "fréquentiel" de surface
* 3. Avec un argument "fréquentiel" de surface
Sinon, une méthode plus simple à comprendre et ne faisant pas intervenir d'appel à la fonction sinus se base sur le fait que si X∼U(0,1) et Y∼U(0,1) alors P[X2+Y2≤1]=π/4 (voir [[https://fr.wikipedia.org/wiki/M%C3%A9thode_de_Monte-Carlo#D%C3%A9termination_de_la_valeur_de_%CF%80][éthode de Monte Carlo sur Wikipedia)]]. Le code suivant illustre ce fait :
#+begin_src R :results output graphics :file "./MonteCarlo.png" :exports results :width 600 :height 400 :session *R*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment