Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

12. (9 marks 2+1+1+1+2+2 The Titanic was a British passenger ship that sank when

ID: 3223071 • Letter: 1

Question

12. (9 marks 2+1+1+1+2+2 The Titanic was a British passenger ship that sank when it collided with an iceberg on 14 April 1912, four days into its maiden voyage from Southampton England to New York City USA. At the time of its sinking there were over 2,000 people aboard and approximately 75% of them perished as a result of the collision. Logistic regression was used to model the probability of survival The data consists of Variable Values NA survived 1 survived, 0 died. gender male, female female adult 1st class passenger 2-2nd class passenger 1st class class 3- 3rd class passenger passenger crew ship staff or crew member modell -glm (survived class, family binomial,data titanic) summary (modell) Coefficients Estimate Std. Error z value Pr Izi) Intercept 0.5092 0.1146 4.445 8.79e-06 class2 0.8565 0.1661 5.157 2.51e-07 class 3 1.5965 0.1436 -11.114 2e-16 classcrew 1.6643 0.1390 -11.972 2e-16 model2

Explanation / Answer

a. The model1 equation is log(p/1-p) = 0.5092 - 0.8565 I(Class2) - 1.5965 I(Class3) - 1.6643 I(Crew)
So , the left hand side of the equation will have log(p/1-p) where p is the probability of survived. if p>0.5, survived =1, p< 0.5, survived =0

b. As, the coefficient of Class 3 (- 1.5965) > coefficient of Crew (- 1.6643), Class 3 passenger have higher probability of survival than crew member.

c. As, the coefficient of Class 3 (- 3.7261) < coefficient of Crew (- 1.6653) and all other values of coefficients will be 0 for female, female crew member have higher probability of survival than female Class 3 passenger.

d. As, the coefficient of Male Class 3 (- 3.7261 + 2.8020 = -0.9241) < coefficient of Male Crew (- 1.6653 + 1.0591 = -0.6062), male crew member have higher probability of survival than male Class 3 passenger.

e. We prefer model 2 , as the p-values for all coefficients are less than 0.05 and statistically significant. (which is the case not for model3, for e.g. p-value for class2:gendermale is 0.51457)

f. The value of survived for child = -0.78790 + 0.87971 = 0.09181
The probability that a child survived the sinking of titanic is 1/(1+e^(-0.09181))

= 0.523