Source: https://www.normalesup.org/~sleurent/stats_ps1/2019-2020/Exercices_corriges.pdf