table(T_data$Sex, T_data$Survided)
table2 <- table(T_data$Sex, T_data$Survided)
mosaicplot(table2, main = "Titanic Data",
sub = "",
xlab = "Sex",
ylab = "Survided",
las = 1,
color = c("skyblue2","lightgreen"),
border = "chocolate")
table2 <- table(T_data$Sex, T_data$Survided)
fisher.test(table2)
chisq.test(table2, correct = FALSE)