Assignment 8

2025-04-07

Introduction

The sinking of the RMS Titanic in April 1912 remains one of history’s most tragic maritime disasters, claiming the lives of over two-thirds of those on board. This catastrophic event has prompted extensive research into the factors that influenced survival, revealing stark disparities based on social categories. Studies have consistently shown that women and children had a significantly higher probability of survival compared to men, while first-class passengers experienced substantially better survival rates than those in second and third class (Frey, Savage & Torgler, 2009). These patterns underscore the potential influence of both social norms and economic standing in life-or-death situations.

Building upon this established body of work, this analysis delves further into the role of social stratification in the Titanic disaster, with a particular focus on how passenger class shaped survival chances. While some research has explored the impact of individual resources such as occupation on male survival (de Jager & Knegt, 2017), the primary evidence strongly suggests that broader structural inequalities played a critical role in determining who lived and who perished.

Research Motivation & Objectives

This study examines Titanic data to highlight how social class shaped vulnerability and resilience in the face of disaster. By doing so, it contributes to broader sociological discussions on inequality in crisis situations.

Research Questions

  1. What were the average ticket prices (Fare) for male and female passengers on the RMS Titanic, and how did these averages differ across the passenger classes (Pclass)?

  2. What were the average survival rates (Survived) for male and female passengers on the RMS Titanic, and how did these rates vary across the different passenger classes (Pclass)?

  3. To what extent did gender (Sex) and passenger class (Pclass) have a statistically significant association with ticket price (Fare) on the RMS Titanic?

Data Preparation

# Load necessary libraries
library(tidyverse)
library(modelsummary)
library(ggplot2)

# Load data
titanic_data <- read_csv("C:/Users/Shamp/OneDrive/Desktop/Data 712/titanic_data.csv")

Analysis

Gender Differences in Fare Prices

To understand how ticket prices varied by gender, I utilized the dplyr package to group the data by Sex and calculate both the mean and median Fare values.

# Calculate mean and median fares by gender
gender_fare_stats <- titanic_data %>%
  group_by(Sex) %>%
  summarise(
    Mean_Fare = mean(Fare, na.rm = TRUE),
    Median_Fare = median(Fare, na.rm = TRUE)
  )

# Display results
gender_fare_stats
## # A tibble: 2 × 3
##   Sex    Mean_Fare Median_Fare
##   <chr>      <dbl>       <dbl>
## 1 female      44.5        23  
## 2 male        25.5        10.5

Interpretation of Results

The output indicates significant differences in fare prices between men and women. Specifically:

  • The mean fare for women (M = 44.48) was nearly twice that of men (M = 25.52).

  • The median fare also showed a considerable gap, with women paying 23.00 and men only 10.50.

These disparities suggest that women were more likely to travel in higher classes, where fares were substantially more expensive.

Connection to Research Question 1

This analysis directly answers Research Question 1, confirming that women paid higher fares, likely due to their increased presence in first and second class.

Visualizing Fare Distribution by Gender

To further explore fare differences, I used ggplot2 to create a boxplot displaying the distribution of fares by gender. Additionally, I added red diamonds to indicate the mean fare values for each gender.

    # Enhanced boxplot with mean indicators
    ggplot(titanic_data, aes(x = Sex, y = Fare, fill = Sex)) +
      geom_boxplot() +
      stat_summary(fun = mean, geom = "point", shape = 18, size = 3, color = "red") +
      labs(title = "Fare Distribution by Gender with Mean Values (Red Diamonds)") + theme_minimal()

Interpretation of Boxplot

The boxplot provides a clear visual representation of the disparities in ticket prices between men and women:

  • Women had a higher central tendency in fares, as evidenced by their higher median and mean values.

  • The distribution of fares for women showed a wider spread, with a larger number of upper outliers, suggesting that more women traveled in higher fare categories.

  • In contrast, men’s fares were concentrated in a lower range, with fewer extreme values, indicating that men were more frequently found in lower passenger classes.

Comprehensive Survival Rates

To gain a detailed understanding of how survival rates varied by gender and class, I used dplyr to group the dataset by Sex and Pclass, calculating both the mean survival rate and average fare for each group.

# Detailed survival rates by gender and class
titanic_data %>%
  group_by(Sex, Pclass) %>%
  summarise(
    Survival_Rate = round(mean(Survived), 2),
    Avg_Fare = round(mean(Fare), 2),
    .groups = 'drop'
  ) %>%
  arrange(desc(Survival_Rate)) %>%
  as.data.frame() # Converts to regular dataframe for clean printing
##      Sex Pclass Survival_Rate Avg_Fare
## 1 female      1          0.97   106.13
## 2 female      2          0.92    21.97
## 3 female      3          0.50    16.12
## 4   male      1          0.37    67.23
## 5   male      2          0.16    19.74
## 6   male      3          0.14    12.66

Interpretation of Results

  • First-class women had the highest survival rate (97%), reinforcing the “women and children first” evacuation norm.

  • First-class men had significantly lower survival rates (37%) despite paying higher fares, suggesting that gender played a stronger role than wealth in survival likelihood.

  • Survival rates declined across classes for both genders, indicating that class played a significant role in survival chances.

  • Third-class men had the lowest survival rate (14%), reinforcing the notion that economic status significantly impacted survival chances.

Connection to Research Question 2

These findings directly answer Research Question 2, showing that both gender and class strongly influenced survival rates.

Predicting Fare Prices by Gender & Class

To further investigate the economic component of survival disparities, I conducted a multiple linear regression analysis examining how gender and class influenced fare prices.

# Regression analysis: Predicting Fare Prices by Gender and Class
fare_model <- lm(Fare ~ Sex + Pclass, data = titanic_data)
modelsummary(fare_model, title = "Regression Analysis: Predicting Fare Prices by Gender and Class")
Regression Analysis: Predicting Fare Prices by Gender and Class
(1)
(Intercept) 113.109
(4.284)
Sexmale -11.623
(2.915)
Pclass -31.784
(1.666)
Num.Obs. 891
R2 0.314
R2 Adj. 0.313
AIC 9159.7
BIC 9178.9
Log.Lik. -4575.857
F 203.449
RMSE 41.13

Interpretation of Results

  • Men paid significantly lower fares than women (Estimate = -11.62, p < 0.05).

  • Lower-class passengers paid significantly lower fares (Estimate = -31.78, p < 0.05).

  • Gender and class together explained 31.4% of the variance in fare prices.

Connection to Research Question 3

This model confirms that gender and class were statistically significant determinants of fare prices, addressing Research Question 3.

Conclusion

This analysis of the Titanic disaster provides strong evidence that social stratification, particularly passenger class played a decisive role in determining survival. Consistent with earlier research (Frey, Savage & Torgler, 2009), my findings show clear disparities in survival based on both gender and class. Women, who paid higher average fares, were more likely to travel in upper classes, which offered a significant survival advantage.

Logistic regression models confirmed that both gender and class were independently and significantly associated with survival. While the “women and children first” norm contributed to men’s lower odds of survival, lower-class passengers also faced sharply reduced chances even after controlling for gender.

The breakdown of survival rates by gender and class highlights this inequality in stark terms: first-class women had near-total survival, while third-class men faced the lowest odds. These results align with Frey et al.’s (2009) emphasis on economic barriers to survival, and further support Jager & Knegt’s (2017) argument that class-based inequalities shaped outcomes even beyond the influence of gender norms.

Ultimately, this study reinforces the idea that the Titanic disaster reflected deeper societal hierarchies. Survival was not merely a matter of chance, it was structured by access to resources, shaped by class, and filtered through the lens of social expectations around gender. These findings speak to the broader relevance of sociology in understanding how crises can expose and magnify structural inequalities.

Bibliography

  1. Frey, Bruno S., David A. Savage, and Benno Torgler. 2009. “Surviving The Titanic Disaster: Economic, Natural and Social Determinants” Journal Article of eScholarship. Retrieved from https://escholarship.org/uc/item/2xk4c1x2

  2. de Jager, Leen, and Thijs Knegt. 2017. “Prestige, strength or altruism? An investigation into the role of occupation on the chance of survival on board of the RMS Titanic.” Utrecht University UU Theses Respiratory. Retrieved from https://dspace.library.uu.nl/handle/1874/354658