Thursday, September 25, 2014

Bayes Rule

What other equation than Bayes rule to begin with. The equation itself is simple, but bears tremendous consequences within its simple form.

The standard text book version of Bayes rule,

p(A|B)  = p(B|A)*p(B)/p(A),

while this equation yields not much insight into what is happening except the obvious fact that the conditioning is being reversed. By assigning context to the random variables A and B, and the probabilities themselves, the equation becomes a lot more attractive and more importantly - intuitive.

Instead of calling the events A and B, let us denote them as E and H. H for a particular Hypothesis we are interested in, and E for Evidence, or basically some observations which we would like to believe is about the Hypothesis.


Then,

p(H|E) = p(E|H)*p(H)/p(E);


One can read p(H|E), as the probability  of the hypothesis H, after observing the evidence E, usually called the posterior (probability) density (because we have already observed the evidence).
p(H), as the probability of the hypothesis H, before seeing the evidence, and as a result usually called the prior (probability) density.
p(E|H), is the likelihood of the evidence, given we are interested in the particular Hypothesis.
p(E), is the normalisation factor, which is basically the probability of the evidence, summed for all possible hypothesis.

Human brain is a natural Bayesian engine.