From 9e9a12325fa12a34dd8660105f6fc60f7fe25154 Mon Sep 17 00:00:00 2001 From: 3a0afacf91c0cf56b72bd72775670cb7 <3a0afacf91c0cf56b72bd72775670cb7@app-learninglab.inria.fr> Date: Thu, 10 Feb 2022 10:52:18 +0000 Subject: [PATCH] Update toy_document_fr.Rmd --- module2/exo1/toy_document_fr.Rmd | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/module2/exo1/toy_document_fr.Rmd b/module2/exo1/toy_document_fr.Rmd index ffb0dce..49d651d 100644 --- a/module2/exo1/toy_document_fr.Rmd +++ b/module2/exo1/toy_document_fr.Rmd @@ -19,3 +19,12 @@ print(p) #Lien aiguille de buffon [Aiguille de Buffon](https://fr.wikipedia.org/wiki/Aiguille_de_Buffon) + +```{r} +set.seed(42) +N = 100000 +x = runif(N) +theta = pi/2*runif(N) +R=2/(mean(x+sin(theta)>1)) +plot=R +``` -- 2.18.1