This presentation will briefly discuss the topic of Hypothesis Testing within Statistics. We will be using the “Seatbelts” dataset provided in R Studio, which includes data concerning road casualties in Great Britain between the years 1969 and 1984.
To better work with data, we first transform it from a Time-Series to a dataframe, adding the month and year data as a single column.
data("Seatbelts")
df <- as.data.frame(Seatbelts)
time_index <- time(Seatbelts)
df$time <- as.Date(paste
(floor(time_index),
round((time_index - floor(time_index)) * 12)
+ 1, 1, sep = "-"))