Commit cadd5847 authored by amarell's avatar amarell

Exercice 02 (5th part) critical analysis

parent 0742b89c
...@@ -3,6 +3,8 @@ title: "Analysis of the risk of failure of the O-rings on the Challenger shuttle ...@@ -3,6 +3,8 @@ title: "Analysis of the risk of failure of the O-rings on the Challenger shuttle
author: "Arnaud Legrand" author: "Arnaud Legrand"
date: "28 juin 2018" date: "28 juin 2018"
output: html_document output: html_document
editor_options:
chunk_output_type: console
--- ---
On January 27, 1986, the day before the takeoff of the shuttle _Challenger_, had On January 27, 1986, the day before the takeoff of the shuttle _Challenger_, had
...@@ -26,7 +28,7 @@ Challenger. ...@@ -26,7 +28,7 @@ Challenger.
We start by loading this data: We start by loading this data:
```{r} ```{r}
data = read.csv("shuttle.csv",header=T) data = read.csv(here::here("module2", "exo5", "shuttle.csv"), header=T)
data data
``` ```
...@@ -52,6 +54,7 @@ simplify the analysis. ...@@ -52,6 +54,7 @@ simplify the analysis.
How does the frequency of failure vary with temperature? How does the frequency of failure vary with temperature?
```{r} ```{r}
plot(data=data, Malfunction/Count ~ Temperature, ylim=c(0,1)) 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 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 ...@@ -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: 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} ```{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) sum(data_full$Malfunction)/sum(data_full$Count)
``` ```
......
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