From aaf83be1122c1566dcf4934418ed02527fb2b41e Mon Sep 17 00:00:00 2001 From: 5e8f2f6f9510097f7ca432f11b95d1cc <5e8f2f6f9510097f7ca432f11b95d1cc@app-learninglab.inria.fr> Date: Thu, 17 Sep 2020 18:46:39 +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 e556b59..8ef211e 100644 --- a/module2/exo1/toy_document_fr.Rmd +++ b/module2/exo1/toy_document_fr.Rmd @@ -48,3 +48,12 @@ df$Accept = (df$X**2 + df$Y**2 <=1) library(ggplot2) ggplot(df, aes(x=X,y=Y,color=Accept)) + geom_point(alpha=.2) + coord_fixed() + theme_bw() ``` + +Il est alors aisé d'obtenir une approximation (pas terrible) de $\pi$ en +comptant combien de fois, en moyenne, $X^2 + Y^2$ est inférieur à 1 : + +l est alors aisé d’obtenir une approximation (pas terrible) de \(\pi\) en comptant combien de fois, en moyenne, \(X^2 + Y^2\) est inférieur à 1: + +```{r pt} +4*mean(df$Accept) +``` \ No newline at end of file -- 2.18.1