Bayes' Theorem, also known as Bayes' Rule, is used in statistics and probability theory to relate marginal probabilities and conditional probabilities. In the context of Bayesian probability theory, it is used to update degrees of belief (probabilities) given new information.
Bayes' theorem is stated mathematically as
where X and Y are independent statements, I is available background information, and
is the posterior probability for X given Y and I,
is the likelihood for Y given X and I,
is the prior probability for X given only I, and
is sometimes called the evidence or probability for Y given only I.