Exploratory Data Analysis

Titanic Passenger Dataset

A compact analysis of passenger demographics, ticket classes, and survival outcomes based on the titanic.csv file (714 passengers, 8 variables). This report focuses on structure, distributions, and the main patterns associated with survival.

Rows 714 passengers
Columns 8 variables
Target survived (0/1)
Missingness 0 columns with NULLs

1. Dataset Structure

Schema Summary

Structure

The dataset contains 714 unique passengers with 8 attributes describing ticket class, demographics, and survival outcome.

Column Type Description (inferred)
survived BIGINT Target variable: 1 = survived, 0 = died
pclass BIGINT Passenger class: 1st, 2nd, or 3rd
name VARCHAR Passenger’s full name (includes title)
sex VARCHAR Biological sex: male, female
age DOUBLE Age in years (including fractional values for infants)
fare DOUBLE Ticket fare paid (in British pounds)
sibsp BIGINT Number of siblings and spouses aboard
parch BIGINT Number of parents and children aboard
Each row represents a unique passenger–there are 714 distinct names.

Global Metrics

Overview
Survival rate
40.6%
59.4% died
Class mix
~50% in 3rd class
1st: 26.1%, 2nd: 24.2%, 3rd: 49.7%
Sex distribution
63.4% male
36.6% female
Missing values
0 columns
No NULLs detected in any field
This Titanic extract is fully populated: no imputation is required for basic modeling and visualization.

2. Demographic and Ticket Distributions

Passenger Class & Sex

Categorical

The passenger list is dominated by third-class and male passengers, with roughly half of all travelers in third class and about two-thirds of passengers being men.

Class distribution

pclass Passengers Share
1st 186 26.1%
2nd 173 24.2%
3rd 355 49.7%

Sex distribution

sex Passengers Share
female 261 36.6%
male 453 63.4%
In visual form, bar charts of class and sex counts would quickly show the dominance of third-class and male passengers.

Age & Fare

Continuous

Ages range from infants to elderly passengers, while fares span several orders of magnitude and are strongly right-skewed.

Age summary

Metric Age (years)
Min 0.42
Median 28.0
Mean 29.7
Max 80.0
Std. dev. 14.5

Fare summary

Metric Fare
Min 0.00
Median 15.74
Mean 34.69
Max 512.33
Std. dev. 52.92
The large gap between median and mean fare reflects a handful of very high-priced tickets. In plots, a log-scale on fare makes the distribution easier to interpret.

3. Survival Patterns

Overall Survival

Target

Out of 714 passengers in this dataset, fewer than half survived. Survival is moderately imbalanced towards the negative class.

survived Passengers Share
0 (died) 424 59.4%
1 (survived) 290 40.6%
From a modeling perspective, this is a binary classification problem with a majority negative class.

Survival by Sex

Key Driver

Sex is one of the strongest predictors of survival. Women were heavily prioritized during evacuation.

sex survived Passengers % within sex
female 0 (died) 64 24.5%
female 1 (survived) 197 75.5%
male 0 (died) 360 79.5%
male 1 (survived) 93 20.5%
Roughly three-quarters of women survived, while about four out of five men died—capturing the historical “women and children first” policy in the data itself.

Survival by Class

Socioeconomic

Passenger class shows a clear socioeconomic gradient in survival: higher classes had substantially better outcomes.

pclass survived Passengers % within class
1st 0 (died) 64 34.4%
1st 1 (survived) 122 65.6%
2nd 0 (died) 90 52.0%
2nd 1 (survived) 83 48.0%
3rd 0 (died) 270 76.1%
3rd 1 (survived) 85 23.9%
About two-thirds of first-class passengers survived, compared with just one-quarter of third-class passengers. Cabin location and access to lifeboats are likely key mediating factors.

Class × Sex Interaction

Combined Effect

The combination of class and sex produces the most pronounced contrasts in survival rates.

pclass sex survived Passengers % within group
1st female 0 (died) 3 3.5%
1st female 1 (survived) 82 96.5%
1st male 0 (died) 61 60.4%
1st male 1 (survived) 40 39.6%
2nd female 0 (died) 6 8.1%
2nd female 1 (survived) 68 91.9%
2nd male 0 (died) 84 84.8%
2nd male 1 (survived) 15 15.2%
3rd female 0 (died) 55 53.9%
3rd female 1 (survived) 47 46.1%
3rd male 0 (died) 215 85.0%
3rd male 1 (survived) 38 15.0%
First-class women had an almost universal survival rate (~97%), while third-class men faced the worst outcomes (85% died). This interaction between class and sex provides a powerful narrative for visual storytelling (for example, as a heatmap).

4. Continuous Variables and Survival

Age vs. Survival

Demographic

Age differences between survivors and non-survivors are more subtle than those for sex or class, but still informative.

survived Mean age Median age
0 (died) 30.6 28
1 (survived) 28.3 28
Survivors are slightly younger on average, though the median age is identical. Density plots or age-band analyses (e.g., “children vs adults vs elderly”) would show that children tend to survive at higher rates.

Fare vs. Survival

Wealth Proxy

Ticket fare is a continuous proxy for wealth and cabin quality. Survivors, on average, paid substantially higher fares.

survived Mean fare Median fare
0 (died) 23.0 11.89
1 (survived) 51.8 26.25
Both mean and median fares for survivors are more than twice those of non-survivors, reflecting their concentration in higher classes. Box plots of fare by survival, especially on a log scale, visually reinforce this pattern.

5. Takeaways & Next Steps

Summary

Insights

This exploratory analysis confirms a clear, structured pattern in Titanic survival:

  • Sex and class are the dominant drivers of survival. Women, especially in first and second class, had very high survival rates, while third-class men fared the worst.
  • Fare and class align strongly with survival. Higher fares, typical of first-class cabins, are associated with much better outcomes.
  • Age plays a secondary but meaningful role. Survivors are slightly younger on average, with children more likely to survive than older adults, though the effect is weaker than that of sex or class.
  • No missingness simplifies downstream modeling. All variables are fully populated, so imputation is not required for this particular extract.

For modeling, useful next steps would include feature engineering (e.g. extracting titles from name, constructing family-size features from sibsp and parch), and training baseline classifiers to quantify the predictive power of these variables.