diff --git a/challenger.pdf b/challenger.pdf index 8e264cf11e7a737982a9f03f3f38a35eb9add6f2..e2648931f090ed3df283f19604f43214e5de3870 100644 Binary files a/challenger.pdf and b/challenger.pdf differ diff --git a/src/Python3/challenger.ipynb b/src/Python3/challenger.ipynb index 9bf774eb71e9ff75b5af437bd139aa337086cde6..da173e65a5765e798a532f1af76ca67bca05d16d 100644 --- a/src/Python3/challenger.ipynb +++ b/src/Python3/challenger.ipynb @@ -28,7 +28,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We will be using the python3 language using the pandas, statsmodels, and numpy library." + "We will be using the python3 language using the pandas, statsmodels, numpy, matplotlib and seaborn libraries." ] }, { @@ -477,7 +477,7 @@ "source": [ "## Logistic regression\n", "\n", - "Let's assume O-rings indpendently fail with the same probability which solely depends on temperature. A logistic regression should allow us to estimate the influence of temperature." + "Let's assume O-rings independently fail with the same probability which solely depends on temperature. A logistic regression should allow us to estimate the influence of temperature." ] }, { @@ -570,7 +570,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "The maximum likelyhood estimator of the intercept and of Temperature are thus $\\hat{\\alpha}=5.0849$ and $\\hat{\\beta}=-0.1156$. This **corresponds** to the values from the article of Dalal et al. The standard errors are $s_{\\hat{\\alpha}} = 7.477$ and $s_{\\hat{\\beta}} = 0.115$, which is **different** from the $3.052$ and $0.04702$ reported by Dallal et al. The deviance is $3.01444$ with 21 degrees of freedom. I cannot find any value similar to the Goodness of fit ($G^2=18.086$) reported by Dalal et al. There seems to be something wrong. Oh I know, I haven't indicated that my observations are actually the result of 6 observations for each rocket launch. Let's indicate these weights (since the weights are always the same throughout all experiments, it does not change the estimates of the fit but it does influence the variance estimates)." + "The maximum likelyhood estimator of the intercept and of Temperature are thus $\\hat{\\alpha}=5.0849$ and $\\hat{\\beta}=-0.1156$. This **corresponds** to the values from the article of Dalal *et al.* The standard errors are $s_{\\hat{\\alpha}} = 7.477$ and $s_{\\hat{\\beta}} = 0.115$, which is **different** from the $3.052$ and $0.04702$ reported by Dallal *et al.* The deviance is $3.01444$ with 21 degrees of freedom. I cannot find any value similar to the Goodness of fit ($G^2=18.086$) reported by Dalal *et al.* There seems to be something wrong. Oh I know, I haven't indicated that my observations are actually the result of 6 observations for each rocket launch. Let's indicate these weights (since the weights are always the same throughout all experiments, it does not change the estimates of the fit but it does influence the variance estimates)." ] }, { @@ -662,7 +662,7 @@ "Good, now I have recovered the asymptotic standard errors $s_{\\hat{\\alpha}}=3.052$ and $s_{\\hat{\\beta}}=0.047$.\n", "The Goodness of fit (Deviance) indicated for this model is $G^2=18.086$ with 21 degrees of freedom (Df Residuals).\n", "\n", - "**I have therefore managed to fully replicate the results of the Dalal et al. article**." + "**I have therefore managed to fully replicate the results of the Dalal *et al.* article**." ] }, { @@ -706,7 +706,7 @@ "scrolled": true }, "source": [ - "This figure is very similar to the Figure 4 of Dalal et al. **I have managed to replicate the Figure 4 of the Dalal et al. article.**" + "This figure is very similar to the Figure 4 of Dalal *et al.* **I have managed to replicate the Figure 4 of the Dalal *et al.* article.**" ] }, { @@ -772,7 +772,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.4" + "version": "3.6.6" } }, "nbformat": 4, diff --git a/src/Python3/challenger.pdf b/src/Python3/challenger.pdf index bdfbe0ac75dd1422de3cf057e27e9a3e63df22e0..7de76c2f992acfc1d9a3c5bd6d0f36d7e502aaa8 100644 Binary files a/src/Python3/challenger.pdf and b/src/Python3/challenger.pdf differ diff --git a/src/R/challenger.Rmd b/src/R/challenger.Rmd index 9d19787596f9da39aaae8efb141a55064d8389c2..8883e294f72a6789f3a490f07f703c19b992d55f 100644 --- a/src/R/challenger.Rmd +++ b/src/R/challenger.Rmd @@ -1,7 +1,7 @@ --- title: "Risk Analysis of the Space Shuttle: Pre-Challenger Prediction of Failure" author: "Arnaud Legrand" -date: "23 September 2018" +date: "25 October 2018" output: pdf_document --- @@ -39,7 +39,7 @@ plot(data=data, Malfunction/Count ~ Temperature, ylim=c(0,1)) # Logistic regression -Let's assume O-rings indpendently fail with the same probability which solely depends on temperature. A logistic regression should allow us to estimate the influence of temperature. +Let's assume O-rings independently fail with the same probability which solely depends on temperature. A logistic regression should allow us to estimate the influence of temperature. ```{r} logistic_reg = glm(data=data, Malfunction/Count ~ Temperature, weights=Count, @@ -47,7 +47,7 @@ logistic_reg = glm(data=data, Malfunction/Count ~ Temperature, weights=Count, summary(logistic_reg) ``` -The maximum likelyhood estimator of the intercept and of Temperature are thus $\hat{\alpha}=5.0849$ and $\hat{\beta}=-0.1156$ and their standard errors are $s_{\hat{\alpha}} = 3.052$ and $s_{\hat{\beta}} = 0.04702$. The Residual deviance corresponds to the Goodness of fit $G^2=18.086$ with 21 degrees of freedom. **I have therefore managed to replicate the results of the Dalal et al. article**. +The maximum likelyhood estimator of the intercept and of Temperature are thus $\hat{\alpha}=5.0849$ and $\hat{\beta}=-0.1156$ and their standard errors are $s_{\hat{\alpha}} = 3.052$ and $s_{\hat{\beta}} = 0.04702$. The Residual deviance corresponds to the Goodness of fit $G^2=18.086$ with 21 degrees of freedom. **I have therefore managed to replicate the results of the Dalal *et al.* article**. # Predicting failure probability The temperature when launching the shuttle was 31°F. Let's try to @@ -60,7 +60,7 @@ plot(tempv,rmv,type="l",ylim=c(0,1)) points(data=data, Malfunction/Count ~ Temperature) ``` -This figure is very similar to the Figure 4 of Dalal et al. **I have managed to replicate the Figure 4 of the Dalal et al. article.** +This figure is very similar to the Figure 4 of Dalal et al. **I have managed to replicate the Figure 4 of the Dalal *et al.* article.** # Confidence on the prediction Let's try to plot confidence intervals with ggplot2. diff --git a/src/R/challenger.pdf b/src/R/challenger.pdf index 8e264cf11e7a737982a9f03f3f38a35eb9add6f2..e2648931f090ed3df283f19604f43214e5de3870 100644 Binary files a/src/R/challenger.pdf and b/src/R/challenger.pdf differ