Source: https://www.irit.fr/~Mohand.Boughanem/slides/RI/chap6_modeles_probabilistes.pdf