Variable Notes

pclass: A proxy for socio-economic status (SES) 1st = Upper 2nd = Middle 3rd = Lower

age: Age is fractional if less than 1. If the age is estimated, is it in the form of xx.5

sibsp: The dataset defines family relations in this way… Sibling = brother, sister, stepbrother, stepsister Spouse = husband, wife (mistresses and fiancés were ignored)

parch: The dataset defines family relations in this way… Parent = mother, father Child = daughter, son, stepdaughter, stepson Some children travelled only with a nanny, therefore parch=0 for them. Variable Definition Key survival Survival 0 = No, 1 = Yes pclass Ticket class 1 = 1st, 2 = 2nd, 3 = 3rd embarked Port of Embarkation C = Cherbourg, Q = Queenstown, S = Southampton

## [1] 891   9
## 'data.frame':    891 obs. of  9 variables:
##  $ survived: int  0 1 1 1 0 0 0 0 1 1 ...
##  $ pclass  : int  3 1 3 1 3 3 1 3 3 2 ...
##  $ sex     : Factor w/ 2 levels "female","male": 2 1 1 1 2 2 2 2 1 1 ...
##  $ age     : num  22 38 26 35 35 NA 54 2 27 14 ...
##  $ sibsp   : int  1 1 0 1 0 0 0 3 0 1 ...
##  $ parch   : int  0 0 0 0 0 0 0 1 2 0 ...
##  $ fare    : num  7.25 71.28 7.92 53.1 8.05 ...
##  $ embarked: Factor w/ 4 levels "","C","Q","S": 4 2 4 4 4 3 4 4 4 2 ...
##  $ deck    : Factor w/ 8 levels "","A","B","C",..: 1 4 1 4 1 1 6 1 1 1 ...
## survived   pclass      sex      age    sibsp    parch     fare embarked 
##        0        0        0      177        0        0        0        0 
##     deck 
##        0

Karna yang memiliki nilai NA adalah baris pada kolom age maka tidak dilakukan Drop missing value dikarnakan dapat menghilangkan informasi yang lain

Exploratory Data Analysis

Terlihat pada plot diatas bahwa penumpang kapal yang berhasil selamat sebanyak 342 orang dan yang tidak selamat 549

Total Survived Based On pclass

## Warning: `group_by_()` is deprecated as of dplyr 0.7.0.
## Please use `group_by()` instead.
## See vignette('programming') for more help
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_warnings()` to see where this warning was generated.

Terlihat bahwa penumpang yang memesan tiket di kelas 1 lebih banyak yag selamat dan sedikit yang tidak selamat dibanding 2 kelas yang lain,