Source: https://www.math.u-bordeaux.fr/~mibonnef/cpp-stat/stat-feuille3.pdf