Download Titanic

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Coefficient of determination wikipedia , lookup

Transcript
Multiple Logistic Regression for Grouped (Table) Data
The Titanic was a passenger liner that sank in the North Atlantic Ocean on April 15, 1912 after colliding
with an iceberg. The sinking of the Titanic caused the deaths of 1,514 people out of 2,223 passengers
and crew. Due to outdated maritime safety regulations, she carried only enough lifeboats for 1,178
peopleā€”one-third her total passenger and crew capacity. The outcomes (survival or death) of 1,207
adult passengers are shown in the table below.
Gender
Male
Female
1 Class Ticket
Yes
No
Yes
No
st
Yes
57
89
140
156
Survived
No
118
541
4
102
1. Fit a logistic regression model predicting the probability of survival on the Titanic from Gender and
Class. Paste the code used to fit the model.
2. Give a precise interpretation of the coefficients for Gender and Class in the context of this problem.
3. Compute the predicted probabilities of survival for a 1st Class Male, 1st Class Female, Lower Class
Male, Lower Class Female.
4. Compute pseudo-š¯‘…š¯‘… 2 for this model. Paste the code you used and report the value.
5. Paste the code used to conduct a goodness of fit test for the model. What is the p-value and your
conclusion about the model fit?