In Bayesian statistics, relative entropy can be used as a measure of the information gain in moving from a prior distribution to a posterior distribution : p ( x ) → → p ( x ∣ ∣ I ) . If some new fact Y = y is discovered, it can be used to update the posterior distribution for X from p ( x ∣ ∣ I ) to a new posterior distribution p ( x ∣ ∣ y , I ) using Bayes' theorem :