We can see that there are a lot of males in 3rd class.
Let's split this even further as male, female and children (under 16 years old)
There are also a more children in 3rd class than other classes
Overall, 3rd class has the most passengers, I guess it is the cheapest class. We'll look into it later
The average age is 29.7, 50% of passengers are under 28 years old. There some babies on board and also a elder at 80 years old.
Male and female passengers' age seem to be similar
1st class looks like they have more middle age passenger
2nd and 3rd class are similar but 3rd class passengers appear to be a bit younger.
This makes sense since there are many children in 3rd class
Most people are in the middle cabins.
I'm guessing that cabin F/G are the more expensive ones since they skew the data
It looks like I was wrong! Cabins F and G are extremely low!
They were probably for the cap and crew meanwhile cabins B and C overall have higher fares;
especially some passengers paid a lot for cabin B.
Queenstown passengers seemed to be from 3rd class
Cherbourg had only a few 2nd class
Most passengers were from Southampton
There are outliers from Cherbourg, let's get a closer look without the outlier
People from Queenstown who are mostly in 3rd class pays cheaper fare. Seems like 3rd class is the lower class
People from Cherboug have the most expensive fare but also cheaper fare. Cherboug passengers were a mixed bunch
For the purpose of this investigation, 'with family' means with either siblings, children or parents
More passengers went on the Titanic alone but there are many going with family
Out of 891 passengers, 342 survived (38.4%)
Looks like 3rd class' survival rate is very low.
However, 3rd class also has a lot more male passengers!
Maybe it is because "Women and Children First" instead of class?
Children and female passengers survived more than male passengers regardless of class.
So class might not have affected survival rates
The older the passenger, the less likely they are to survive overall.
Regarless of class, the older you are, the less likely you are to survive
This is interesting!
As a female passenger, you are more likely to survive the older you are,
but it is the opposite for male passengers
At first glance, cabin A and G seems to have lower survival rate but their standard deviations are huge so we may need to carry out a hypothesis testing
I will perfrom a chi-square test:
Null Hypothesis: There is no different in survival rates among cabins
alpha = 0.05.
from scipy import stats
stats.chisquare(Cabin_Obs, Cabin_Exp)
Result: the p-value is roughly 0.8 which is higher than 0.05. Thus, we failed to reject our null hypothesis.
There is not statistically significant evidence that there are differences in survival rates among cabins