Analytical Programming Lab
Analytical Programming Lab
Question 1:
Gender Did Not Survive Survived Grand Total
female 27.25% 72.75% 100.00%
male 80.90% 19.10% 100.00%
Grand Total 61.80% 38.20% 100.00%
Only 38.20% of Titanic passengers survived, while 61.80% of passengers did not survive.
Of all survivors, 72.75% were female and 19.10% were male.
ACTUAL VALUES
Gender Did Not Survive Survived Grand Total
female 127 339 466
male 682 161 843
Grand Total 809 500 1309
EXPECTED VALUES
Gender Did Not Survive Survived Grand Total
female 288 178 466
male 521 843 843
Grand Total 809 500 1309
ACTUAL VALUES
P. Class Did Not Survive Survived Grand Total
1 123 200 323
2 158 119 277
3 528 181 709
Grand Total 809 500 1309
EXPECTED VALUES
P. Class Did Not Survive Survived Grand Total
1 200 123 323
2 171 106 277
3 438 271 709
Grand Total 809 500 1309
The probability that the differences in variables from actual values and expected values could
occur by chance is significantly small, so close to zero that it is virtually impossible.
It is obvious from the data that passengers from Cherbourg and Queenstown were given
preferential treatment and survived at a higher rate than they should’ve if left to chance.
Kyrsti Deane
BCIS 1330 – Data Analytics
Lab 4 – Titanic Contingency Tables
Question 3:
Data shows that only 35.6% of passengers were female, and that about one in four females boarded the ship
from Cherbourg. 41% of all passengers to board from Cherbourg were female, which may suggest why that
specific port of embarkment saw such significantly higher survival rates.
The data also shows that over half of all first-class passengers boarded from the Cherbourg port, which would
be a good indication of why that specific port of embarkment saw significantly higher survival rates.
Passengers of higher status and wealth survived at a higher rate than those in second or third-class. Since more
first-class passengers boarded from Cherbourg, it is not surprising the port had such elevated survival rates.