Skip to content

1. Summary for basics of probability theory-Prior and Posterior Probability

Prior, likelihood and posterior describe how a belief about a hidden parameter is updated by observed data. Use this summary as the reference for Bayes rule before moving on to sampling, Markov chains and variational inference.

Reading time
2 min
Length
382 words
Updated
Sep 15, 2026
Total views
--

(1) Basic Concepts โ€‹

Gaussian Distribution function :

(1.1)f(x)=1ฯƒ2ฯ€expโก(โˆ’(xโˆ’ฮผ)22ฯƒ2)

Take we generate a random number x from parameter ฮธ as an example :

Posterior probability: If we know the result x at first to guess the reason ฮธ to generate x, we call this as the Posterior probability

(1.2)P(ฮธ|x)posterior

Prior probability : the probability to reach a result x if we use parameter ฮธ.

(1.3)P(x|ฮธ)prior

Integration computation of the mean and variance :

(1.4)ฮผ=โˆซโˆ’โˆžโˆžxf(x)dxฯƒ2=Var(x)=โˆซโˆ’โˆž+โˆž(xโˆ’ฮผ)2f(x)dx

We also have following preferred computational formula :

(1.5)ฯƒ2=E[X2]โˆ’(E[X])2=โˆซโˆ’โˆž+โˆžx2f(x)dxโˆ’ฮผ2

(2) Bayes Formula โ€‹

From [1], we know the basic form of bayes formula is :

(2.1)P(A|B)=P(B|A)P(A)P(B)

Then we got the relation between Prior and Posterior Probability :

(2.2)P(ฮธ|x)=P(x|ฮธ)P(ฮธ)P(x)=P(x|ฮธ)P(ฮธ)โˆ‘i(x|ฮธi)P(ฮธi)

This is the formula for the calculation of posterior probability, Where P(x|ฮธ) is get from the Similarity estimation, which is often referred as Similarity Function.

(3) Similarity Estimation for Parameters โ€‹

1. ML (maximum likelihood/maximum prior) โ€‹

Maximum likelihood estimation is to maximize โˆi=1np(xi,ฮธ) or following : (see [2])

(3.1.1)ฮธ^MLE=argmaxฮธโˆˆฮ˜P(x|ฮธ)

This is also maximum prior estimation.

2. MAP (maximum posterior) โ€‹

If the prior probability is given, we can use

(3.2.1)argmaxฮธP(ฮธ|x)=argmaxฮธP(x|ฮธ)P(ฮธ)P(x)

In that case, since the x is given, we simplify it to :

(3.2.2)argmaxฮธP(x|ฮธ)P(x)

from this comes often-used formula :

(3.2.3)posteriorโˆ(likelihoodร—Prior)

(4) Bayes Inference โ€‹

refer to [3], Bayes estimation is for estimating the probability that new data appears.

Assume that we have the observed data X, and need to predict the appea probability of new data point x~, then we have :

(4.1)P(x~|X)=โˆซhโˆผP(h)p(x~|ฮธ)p(ฮธ|X)dh

(5) Normalizing Constant โ€‹

For example, we have :

(5.1)p(x)=eโˆ’x22xโˆˆ(โˆ’โˆž,โˆž)

then we have

(5.2)โˆซโˆ’โˆžโˆžp(x)dx=2ฯ€

so the Normalizing Constant (or Normalizing factor) for function (5.1) is 2ฯ€ so that we can reach :

(5.3)ฯ†(x)=12ฯ€p(x)=12ฯ€eโˆ’x22

  1. Probability Theory, Chapter1, Section 6, Law of Total probability and Bayes Formula โ†ฉ๏ธŽ

  2. Probability Theory, Chapter7, Section 1, Maximum Similarly Estimation โ†ฉ๏ธŽ

  3. Bayes Estimation โ†ฉ๏ธŽ