Source: http://math.univ-lyon1.fr/~gannaz/Cours/DS_stat_2015_corrige.pdf