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  

            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.

  • 1
    $\begingroup$ 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. $\endgroup$
    – P Schnell
    Aug 1, 2014 at 15:01

1 Answer 1


An insignificant p-value indicates that the estimated coefficient (first column) is not significantly different from zero. In interpretation, there's insufficient evidence to conclude that having ticket level 2 changes your odds of survival versus having ticket level 1.

This is not necessarily a problem with the analysis at all, it's just telling you what the data show. If for some reason you think people with ticket level 2 should have different survival odds from those with ticket level 1, a larger sample size for Ticket2 might detect a difference, but of course that difference might be close to zero, anyway.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.