Source: https://www.mio.osupytheas.fr/~nerini/cours/statM1/TD4-StatM1-tests.pdf