# Logistic Regression - Binning - Interpretting p values

My name is Abhi and I am trying to teach myself regression by solving some practice problems available on the internet. I am using RStudio as my development environment.

Problem Statement
Given the age, sex, class(first,second,third), ticket_id for each passenger can you predict if he survived or died when the titanic sank.

I did some initial data analysis and it seems passenger class and ticket id are fairly predictive. Here are the results from my first model

Deviance Residuals:
Min       1Q   Median       3Q      Max
-1.4431  -0.8649  -0.6772   0.9332   1.7806

Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept)   1.1713     0.2171   5.396 6.80e-08 ***
Pclass       -0.5654     0.1110  -5.094 3.50e-07 ***
Ticket2      -0.4361     0.2421  -1.801   0.0716 .
Ticket3      -0.8311     0.2033  -4.089 4.33e-05 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for binomial family taken to be 1)

Null deviance: 1186.7  on 890  degrees of freedom
Residual deviance: 1067.8  on 887  degrees of freedom
AIC: 1075.8

Number of Fisher Scoring iterations: 4


My question is why do I get poor p values for Ticket2? Does this mean Ticket1 and Ticket2 should be merged? Not enough samples for Ticket2?

Any help would be much appreciated.

• In addition to my answer, I have a suggestion for learning. While practice problems are absolutely essential, you should also study some of the basic theory behind regression and statistics in general from a cohesive source such as a textbook. Being able to carry out a regression analysis in R won't mean much if you can't identify the appropriate times to apply each method and interpret the output. Aug 1 '14 at 15:01