From cadd5847092108afb7c7d8dd810c9f611ba349ca Mon Sep 17 00:00:00 2001 From: amarell Date: Sat, 10 Jun 2023 00:44:45 +0200 Subject: [PATCH] Exercice 02 (5th part) critical analysis --- module2/exo5/exo5_en.Rmd | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/module2/exo5/exo5_en.Rmd b/module2/exo5/exo5_en.Rmd index f9003e3..cf5e3b3 100644 --- a/module2/exo5/exo5_en.Rmd +++ b/module2/exo5/exo5_en.Rmd @@ -3,6 +3,8 @@ title: "Analysis of the risk of failure of the O-rings on the Challenger shuttle author: "Arnaud Legrand" date: "28 juin 2018" output: html_document +editor_options: + chunk_output_type: console --- On January 27, 1986, the day before the takeoff of the shuttle _Challenger_, had @@ -26,7 +28,7 @@ Challenger. We start by loading this data: ```{r} -data = read.csv("shuttle.csv",header=T) +data = read.csv(here::here("module2", "exo5", "shuttle.csv"), header=T) data ``` @@ -52,6 +54,7 @@ simplify the analysis. How does the frequency of failure vary with temperature? ```{r} plot(data=data, Malfunction/Count ~ Temperature, ylim=c(0,1)) +plot(data=data, Malfunction/Count ~ Pressure, ylim=c(0,1)) ``` At first glance, the dependence does not look very important, but let's try to @@ -97,7 +100,7 @@ O-rings. It will be about 0.2, as in the tests where we had a failure of at least one joint. Let's get back to the initial dataset to estimate the probability of failure: ```{r} -data_full = read.csv("shuttle.csv",header=T) +data_full = read.csv(here::here("module2", "exo5", "shuttle.csv"),header=T) sum(data_full$Malfunction)/sum(data_full$Count) ``` -- 2.18.1