## Parsed with column specification:
## cols(
## Survived = col_integer(),
## Pclass = col_integer(),
## Sex = col_character(),
## Age = col_double(),
## SibSp = col_integer(),
## Parch = col_integer(),
## Fare = col_double(),
## Embarked = col_character()
## )
1.table showing the average age of the survivors and the average age of the people who died
## Survived Age
## 1 0 30.41530
## 2 1 28.42382
The average age of the survivors=28.42382
The average age of the people who died=30.41530
2.Hypothesis : The Titanic survivors were younger than the passengers who died H0: There is no significant difference between the age titanic survivors and the passengers who died H1:There is significant difference between the age titanic survivors and the passengers who died
##
## Welch Two Sample t-test
##
## data: Age by Survived
## t = 2.1816, df = 667.56, p-value = 0.02949
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## 0.1990628 3.7838912
## sample estimates:
## mean in group 0 mean in group 1
## 30.41530 28.42382
the p value = 0.02949 The p value 0.02949 is lesser than 0.05 we reject null hypothesis and therefore there is significant difference between the age titanic survivors and the passengers who died.The Titanic survivors were younger than the passengers who died