# This graph conveys that men between the ages of eighteen and thirty have a high probability of surviving, whereas female survival chances are higher between 14 and 40.

## Males between the ages of 5 and 18 have the lowest survival chance.

### But, how is the gender and age distribution in each class?

# This distribution by class shows us that the passengers in 3rd class were younger than those in class 1 and 2.

# It can also be seen that more children are found in the 3rd class when compared to 1st and 2nd class. But the is not enough evidence to test the hypotheses.

### In order to determine whether people travelled alone or accompanied, I created a bar plot showing that most males and females ravelled alone, with no spouses (or relatives).

# The probability survive is higher than the probability to die when you're alone, but families with 4 are more likely to survive than a couple for instance.

After creating the relatives column, it is evident that the chances to survive increase with 1-3 relatives.

# Here it is evident that survival probability for males and females increases the more relatives they have when between 1-3, whilst chances to survive decrease when family size exceeds this threshold. However, there is an exception for families with 5-6 members.

# Lets do this for each class

# The above graphs demonstrate that most of the variance and lowest survival p are in the 3rd class (most passengers, youngest population), therefore survival chances were lowest here.

# It is also evident that chances of survival for single females in 3rd class is similar to having 2 relatives, whereas men are more likely to die regardless of relatives in 3rd class.

# Females with 4-10 relatives had an almost 0% chance at survival, apart from females with 6 relatives.

# We can see evidence that more females in 3rd class died because they didn't want to leave behind their families, but we must compute logistic regression to be sure of this. The results are significant if the p value is <0.05

coefficients of logistic regression show a positive correlation between survival by being female and negative by having siblings or spouses.

the results passed the significance test and convey that chances to survive ultimately decrease when a passenger traveled with "sibsp" or parch.

the coefficient of LR for male passengers show a negative correlation by having siblings/spouses. Only "sibsp" passed the significance test, showing that probability so survive decrease when a male passenger travels with a sibling or spouse.

Coefficients of Logistical regression for female passengers ultimately shows a negative correlation by having sibling or spouses. Only the significance test for "sibsp" was passed, showing us that chances to survive decreases when a female passenger is travelling with "sibsp"

# Coefficient of logistical regression conveys a positive correlation between survival by being female and negative by having spouse/siblings accompanying them.

the results passed the significance test, showing us that chances of survival ultimately decrease when a passenger travels with a "sibsp" or "parch"