Source: https://www.hec.unil.ch/rbichsel/Correction2.pdf