Source: http://irma.math.unistra.fr/~ricka/stat/TD5_L3.pdf