Chapter8: 8.2, 8.4, 8.8, 8.16, 8.18
8.2 (a)Write the equation :
#weight = 120.07 - 1.93*parity
#First baby: 120.07 - 1.93*0=120.07
#others baby: 120.07 - 1.93*1=118.14
8.4 (a) Write the equation : avgDayAbsent = 18.93 ???9.11???eth +3.10???sex +2.15???lrn
(b)Interpret: The model estimates that one unit not-aboriginal lower 9.11 in the average daily absent, one unit male increases 3.10 in the average daily absent, one unit slow learner increases 2.15 average daily absent.
Residual of the first observation: 2=18.93 ???9.11???0 +3.10???1 +2.15???1+e -> e=-22.18
x be the variance of the residuals and X is the variance of the number of absent days for all students
#R-Sqare: 1 - var(x)/var(X) = 1 - 240.57/264.17 = 8.9336%
#adjusted R-Sqare: 1 - var(x)/var(X) * (146 -1)/(146 -3 -1) = 20.9252%
8.8 Answer: remove “No learner status” first since it has the largest p-value.
8.16 (a) Examine these data damaged O-rings: There are 23 shuttle missions and one of each present number of degree for the temperature, number of damaged and undamaged O-rings. Total number of O-rings for each shuttle missions is 6. The data shows lower temperature (< 63 degree) causes more damaged O-rings.
Describe the key components of the summary table The model estimates that one unit temperature decreases 0.2163 unit of damaged O-ring. This model has a standar deviation 0.0532 and z value at -4.07, that means temperature is a significan statistic factor since p-value approximates to 0.
Write out the logistic model:
#log(p/(1???p)) = 11.663 ???0.2162???temperature
8.18 (a)
#log(p/(1???p)) = 11.663 ???0.2162???temperature where temperatures are 51, 53, 55
#p51=0.65405 p53=0.550923 p55=0.443246
prob<-c(0.65405,0.550923,0.443246,0.341,0.251,0.179,0.124,0.084,0.056,0.037,0.024)
temp<-c(51,53,55,57,59,61,63,65,67,69,71)
scatter.smooth(temp, prob, span = 2/3, degree = 1, evaluation = 50, col = 'red')