4.3 Home advantage

Let’s see if we can detect any sort of home advantage. It will be more appropriate to do this in the context of regression later but for now the easiest way to do this is to find the average margin of victory by the home team.

Code
d %>% 
  mutate(diff = hscore - ascore) %>%
  summarise(avg.diff = mean(diff))
  avg.diff
1 1.358442