Source: https://pareto.uab.cat/jllull/Statistics/Slides_Stats_QEM_2016.pdf