xbeta
Bayes' theorem

Bayes’ theorem relates the conditional and marginal probabilities of two events A and B, where B has nonzero probability:

Pr(AB)=Pr(BA)Pr(A)Pr(B).\Pr(A | B) = \frac{\Pr(B | A) \Pr(A)}{\Pr(B)}.

Here, Pr(A) is the prior probability of A (in that it doesn’t take into account any information about B), Pr(AB) is the posterior probability of A given B, Pr(BA) is the conditional probability of B given A, and Pr(B) is the marginal probability of B which acts here as a normalizing constant.

In the context of Bayesian inference about a parameter θ given X, this relationship can be written

p(θX)p(Xθ)p(θ)p(\theta | X) \propto p(X | \theta) p(\theta)

which states that the posterior density of θ is proportional to the likelihood? of X given θ times the prior density of θ.