Categorical Variables, Two-Way Tables, and Proportions: Titanic Survival Case Study
Research Context and Variable Classification
Primary Investigation Objective:
- The study investigates whether a passenger's class of travel served as a predictor of survival status during the sinking of the Titanic.
- The analytical focus is placed on the relationship between two specific categorical variables: class of travel and survival status.
Variable Identification:
- Explanatory Variable: Class of travel.
- The categories within the explanatory variable are First Class, Second Class, and Third Class.
- Standard two-way table design convention specifies that the explanatory variable labels the rows of the contingency table.
- Response Variable: Survival status.
- The categories within the response variable are Survived (Yes) and Did Not Survive (No).
- Standard two-way table design convention specifies that the response variable labels the columns of the contingency table.
Construction and Calculation of the Two-Way Table
Summary Data Inputs:
- First Class: Exactly passengers survived, and passengers did not survive.
- Second Class: There were total passengers, of whom did not survive.
- Third Class: A total of out of passengers survived.
Mathematical Derivations for Cell Frequencies:
- First Class Totals:
- Survived ():
- Did Not Survive ():
- Total First Class Passengers:
- Second Class Cell Values:
- The proportion of non-survivors is given as of .
- Set up the proportion formula:
- Because represents a discrete count of human passengers, it is rounded to the nearest whole number: .
- Calculating the number of survivors in Second Class:
- Third Class Cell Values:
- Survived ():
- Total Third Class Passengers:
- Calculating non-survivors in Third Class:
- Marginal and Grand Totals:
- Total Survived ():
- Total Did Not Survive ():
- Grand Total of Passengers: (equivalently confirmed by ).
Complete Contingency Table:
- First Class: Survived (), Did Not Survive (), Total = .
- Second Class: Survived (), Did Not Survive (), Total = .
- Third Class: Survived (), Did Not Survive (), Total = .
- Marginal Column Totals: Total Survived () = , Total Did Not Survive () = , Grand Total = .
Limitations of Comparing Raw Counts
Comparison of Raw Frequencies:
- When comparing raw survivor counts between Second Class and Third Class passengers, Third Class recorded more survivors in raw numbers ( survivors) than Second Class ( survivors).
Methodological Invalidation of Raw Counts:
- Raw counts do not provide a meaningful or useful basis for comparison between groups of differing sizes.
- The total number of passengers in Third Class () was substantially larger than the total number of passengers in Second Class ().
- Because group baselines vary substantially, relative proportions or rates must be calculated to evaluate whether an association exists between passenger class and survival status.
Population Proportions and Group Comparisons
Population Parameter Framework:
- The Titanic data set is treated as an entire population rather than a sample.
- Consequently, the population parameter symbol is utilized for survival proportions rather than the sample statistic symbol .
Proportion Calculations by Class:
- First Class Survival Proportion ():
- Rounded to three decimal places: (or ).
- Second Class Survival Proportion ():
- Rounded to three decimal places: (or ).
- Third Class Survival Proportion ():
- Rounded to three decimal places: (or ).
Proportional Comparison Between Second and Third Class:
- Comparing the rates reveals that is significantly higher than .
- Although Third Class had more survivors in absolute count ( vs. ), Second Class passengers survived at a substantially higher proportion ( vs. ).
Difference of Proportions Analysis
Parameter Definitions and Notation:
- Let represent the proportion of all First Class passengers who survived: .
- Let represent the proportion of all Third Class passengers who survived: .
- The direction of subtraction must be clearly specified through subscript notation to define the groups being contrasted.
Calculation:
Substantive Interpretation:
- The difference in survival proportions between First Class and Third Class is (or percentage points).
- A First Class passenger was percentage points more likely to survive the sinking than a Third Class passenger.
Visualizing Association: Segmented and Grouped Bar Charts
Segmented Bar Chart Characteristics:
- Displays stacked absolute frequencies representing survival status categories (, ) across the three passenger classes on the horizontal axis.
- Bar heights reflect the total passenger capacity of each class ( in Class , in Class , and in Class ).
- Visual inspection illustrates that while Class dominates total passenger volume, the shaded segment denoting survivors () constitutes a noticeably smaller fraction of the Third Class column relative to the First Class column.
Grouped Bar Chart Characteristics:
- Places separate bars side-by-side for non-survivors () and survivors () within each travel class.
- Class 1: The survivor bar () exceeds the non-survivor bar ().
- Class 2: The non-survivor bar () exceeds the survivor bar ().
- Class 3: The non-survivor bar () vastly exceeds the survivor bar ().
Evidence of Association:
- The graphical representations establish a strong association between class of travel and survival status.
- Survival rates show a consistent, monotonic decline as class rank decreases from First Class () to Second Class () to Third Class ().
- The proportion of survivors was dramatically higher in First Class compared to Third Class, confirming that travel class was a strong predictor of survival.