Source: https://dept-info.labri.fr/~beurton/Enseignement/SrcStat/TD3.pdf