Question

The Titanic

What was the probability of survival on the Titanic based on a passengers class, sex, and age?

Data Breakdown

PassengerId

Survived

Pclass

Name

Sex

Age

SibSp

Parch

Ticket

Fare

Cabin

Embarked

1

0

3

Braund, Mr. Owen Harris

male

22

1

0

A/5 21171

7.2500

S

2

1

1

Cumings, Mrs. John Bradley (Florence Briggs Thayer)

female

38

1

0

PC 17599

71.2833

C85

C

3

1

3

Heikkinen, Miss. Laina

female

26

0

0

STON/O2. 3101282

7.9250

S

4

1

1

Futrelle, Mrs. Jacques Heath (Lily May Peel)

female

35

1

0

113803

53.1000

C123

S

5

0

3

Allen, Mr. William Henry

male

35

0

0

373450

8.0500

S

6

0

3

Moran, Mr. James

male

0

0

330877

8.4583

Q

Number of Passengers:  891

Probability

Probability is the measure of how likely a specific event or outcome is to happen.

The formula for probability is

\(P(A) = \frac{\text{Number of times A occurs}}{\text{Total number of possible outcomes}}\)

For the titanic

\(P(Survival) = \frac{\text{Number of survivors}}{\text{Total passengers}}\)

Probability of Survival: 0.3838384 or 38%

The probability of surviving the sinking of the Titanic was approximately 38%.

Survival

This chart shows that more passengers died in the sinking of the Titanic than survived. We want to know how different factors impacted a passengers survival.

Probability by Gender

\(P(Survival | Female) = \frac{\text{Female survivors}}{\text{Total female passengers}}\)

Female passengers had a survival rate of approximately 74%

\(P(Survival | Male) = \frac{\text{Male survivors}}{\text{Total male passengers}}\)

Male passengers had a survival rate of approximately 19%

Female passengers had a higher survival rate than male passengers. This was likely due to the women and children being prioritized for lifeboat evacuation.

Visualizing Gender Survival

Probability by Class

Passengers traveled in first, second, or third class.

\(P(Survival | Class) = \frac{\text{Survivors in class}}{\text{Total passengers in class}}\)

First class passengers had a survival rate of approximately 63%
Second class passengers had a survival rate of approximately 47%
Third class passengers had a survival rate of approximately 24%

First class passengers had the highest survival rate, while third class passengers had this lowest. This is likely due to third class being trapped below deck and first class being prioritized in the evacuation.

Visualizing Class Survival

Passenger Info

From this analysis and the accompanying visualizations, the probability of a passengers survival did change depending on their gender, class, age, etc.