Tuesday, February 5, 2013

Baye's formula

If you are in Hong Kong and you need help for university mathematics courses, please visit www.all-r-math.com.

[Quite lazy recently, so write harder..... :( ]

A friend just asks me what is Baye's formula.

The simplest form is


where P(A|B) means the conditional probability of A given that B happens.

Lets we take a frequentist approach. Suppose out of N trials, A appears a times, B appears b times, and in c trials, both A and B occur. Then

P(A|B)=c/b=(c/N)/(b/N)=P(A and B)/P(B)

and therefore

P(A|B)P(B)=P(A and B).

Likewise P(B|A)P(A)=P(A and B). Hence we deduce the Baye's formula.

Example: We throw a dice. Let A={1,2}, B={1,3,5}, C={2,3,5}.

P(A)=1/3, P(B)=P(C)=1/2, P(A and B)=P({1})=1/6, P(A and C)=1/6, P(B and C)=1/3.

P(A|B)=1/3, P(A|C)=1/3.

P(B|A)=1/2, P(B|C)=2/3.

P(C|A)=1/2, P(C|B)=2/3.

We say that two events X and Y are independent if P(X and Y)=P(X)P(Y). If P(Y)≠0 it is the same as saying that P(X|Y)=P(X).

Now we see that B and C are not independent.  However we have A and B are independent, and that A and C are also independent.  Not the same kind of independence in our usual sense, right?