Directions:
R
code and/or written/typed calculations, for a third party to understand how you arrived at your solution.\(~\)
This problem has to do with odds.
\(~\)
On January 28, 1986, a routine launch was anticipated for the Challenger space shuttle. Seventy-three seconds into the flight, disaster happened: the shuttle broke apart, killing all seven crew members on board. An investigation into the cause of the disaster focused on a critical seal called an O-ring, and it is believed that damage to these O-rings during a shuttle launch may be related to the ambient temperature during the launch.
The table below summarizes observational data on O-rings for 23 shuttle missions, where the mission order is based on the temperature at the time of the launch. Temp gives the temperature in Fahrenheit, Damaged represents the number of damaged O-rings (out of six).
library(alr4)
data("Challeng")
data.frame(Mission = 1:nrow(Challeng),
Damaged = Challeng$fail,
Temp = Challeng$temp)
## Mission Damaged Temp
## 1 1 0 66
## 2 2 1 70
## 3 3 0 69
## 4 4 0 68
## 5 5 0 67
## 6 6 0 72
## 7 7 0 73
## 8 8 0 70
## 9 9 1 57
## 10 10 1 63
## 11 11 1 70
## 12 12 0 78
## 13 13 0 67
## 14 14 2 53
## 15 15 0 67
## 16 16 0 75
## 17 17 0 70
## 18 18 0 81
## 19 19 0 76
## 20 20 0 79
## 21 21 2 75
## 22 22 0 76
## 23 23 1 58
summary(glm(fail >= 1 ~ temp, data = Challeng, family = "binomial"))
##
## Call:
## glm(formula = fail >= 1 ~ temp, family = "binomial", data = Challeng)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -1.0611 -0.7613 -0.3783 0.4524 2.2175
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 15.0429 7.3786 2.039 0.0415 *
## temp -0.2322 0.1082 -2.145 0.0320 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 28.267 on 22 degrees of freedom
## Residual deviance: 20.315 on 21 degrees of freedom
## AIC: 24.315
##
## Number of Fisher Scoring iterations: 5
\(~\)
Exercise 9.16 introduced us to O-rings that were identified as a plausible explanation for the breakup of the Challenger space shuttle 73 seconds into takeoff in 1986. The investigation found that the ambient temperature at the time of the shuttle launch was closely related to the damage of O-rings, which are a critical component of the shuttle. See this earlier exercise if you would like to browse the original data
coef(glm(fail >= 1 ~ temp, data = Challeng, family = "binomial"))
## (Intercept) temp
## 15.0429016 -0.2321627
plot(Challeng$temp, Challeng$fail >= 1, pch = 3)
m <- glm(fail >= 1 ~ temp, data = Challeng, family = "binomial")
lines(Challeng$temp[order(Challeng$temp, decreasing = TRUE)], m$fitted.values[order(m$fitted.values, decreasing = FALSE)], type = "both")
\(~\)
Determine which of the following statements are true and false. For each statement that is false, explain why it is false.
\(~\)
Previously, we encountered a data set where we applied logistic regression to aid in spam classification for individual emails. In this exercise, we’ve taken a small set of these variables (all of which are binary) and fit a formal model with the following output:
Predictor | Estimate | Std Error | Z | p-value |
---|---|---|---|---|
(Intercept) | -0.8124 | 0.0870 | -9.34 | 0.0000 |
multiple | -2.6351 | 0.3036 | -8.68 | 0.0000 |
winner | 1.6272 | 0.3185 | 5.11 | 0.0000 |
format | -1.5881 | 0.1196 | -13.28 | 0.0000 |
re_subj | -3.0467 | 0.3625 | -8.40 | 0.0000 |
\(~\)