Titanic Ad For Journey From New York To Europe
John Jacob Astor in 1909. Richest man to die aboard the Titanic
## Helpful variables
mean_win <- mean(take_five$winning_numbers)
median_win <- median(take_five$winning_numbers)
sd_win <- sd(take_five$winning_numbers)
## Is it skewed?
3*(mean_win - median_win) / sd(take_five$winning_numbers)
[1] -0.01921861
#' skew
#'
#' Pearson's second skew coefficient
#' https://en.wikipedia.org/wiki/Skewness
#'
#' @param x A vector of numbers we can
#' @return Pearson's second skewness coefficient of the numbers in x.
#'
skew <- function(x) {
## In-scope Variables.
x_median <- median(x, na.rm=TRUE)
x_mean <- mean(x, na.rm=TRUE)
x_sd <- sd(x, na.rm=TRUE)
x_skew <- 3*(x_mean - x_median) / x_sd
return(x_skew)
}
John Jacob Astor in 1919