a)The regression line equation \[ \hat{bodyWeight}=120.05−1.93∗parity \]
b)The estimated body weight of babies who wasn’t the first born is 1.93 ounces lower than for first-born babies.
c)The t-value and P value is -.162 and 0.1052. As the p-value is > 0.05, we can confirm there is no statistical significance relationship between the average birth weight and parity.
a)The regression line equation is: \[ \hat{absentDays}=18.93−9.11∗eth+3.10∗sex+2.15∗lrn \]
b)eth slope predicts 9.11 absent days decrease in non-aboriginal children.
sex slope predits 3.10 absent days increase in male.
lrn slope predicts 2.15 absent days increase in slow learners.
c)From above regression line equation:
absent <- 18.93 - 9.11 * (0) + 3.10 * (1) + 2.15 * (1)
residual <- 2 - absent
residual
## [1] -22.18
d)Calculate R^2 and adjusted R^2
R2 <- 1 - (240.57/264.17)
R2
## [1] 0.08933641
R2.adjusted <- 1 - (240.57/264.17)*((146-1)/(146-3-1))
R2.adjusted
## [1] 0.07009704
a)It appears that there is a threshold where Orings no longer function. Somehwere between 57 degrees F and 53 degrees F the Orings begin to fail. Anything above 57 degrees appears safe.
b)The slope of of temperature is negative and statistically significant as p-value is shown zero. This means that as temperature increases by 1, the number of estimated damages of O-rings drops by .2162. This is simplification and not interpretable in this context as we don’t have observations of temp 0 degrees.
c)The logisitic model:
\[ \hat{oringFailure}=11.6630−0.2162∗temp \]
d)Yes, as the p-value is 0, this is statistically significant to state it is justified for the concerns regarding O-rings for temperature.
a)Calculate probability
p <- c(51, 53, 55)
logP <- 11.6630 - 0.2162 * p
pFinal <- exp(logP) / (1 + exp(logP))
pFinal
## [1] 0.6540297 0.5509228 0.4432456
b)Estimated probabilties curve
library(ggplot2)
## Warning: package 'ggplot2' was built under R version 3.4.4
data <- data.frame(prob=c(0.341, 0.251, 0.179, 0.124, 0.084, 0.056, 0.037, 0.024, 0.654, 0.551, 0.443),
temp=c(57, 59, 61, 63, 65, 67, 69, 71, 51, 53, 55))
ggplot(data, aes(temp, prob)) +
geom_point() +
geom_smooth()
## `geom_smooth()` using method = 'loess'
c) In order to use a logistic regression 2 conditions are required.
1)First the predictor is linearly related to the logP and
2)second, each outcome is independent of the other outcomes.
Both conditions are difficult to verify so unable to conlude whether logistic regression can be used with the given information