Source: http://www.hec.unil.ch/gcampono/Teaching/BDA/Exercices/Exe04_Normalisation_Solution.pdf