Processing math: 100%

Tuesday, July 29, 2014

Bayes' Law Primer

I'm currently writing a blog post that uses Bayes' Law but don't want to muddy the post with a review in layman's terms. So I have something to link, here is a short description and a chance to flex my teaching muscles before the school year starts.

Bayes' Law

For those who aren't sure, Bayes' Law tells us that the probability event X occurs given we know that event Y has occurred can easily be computed. It is written as Pr(XY) and the vertical bar is meant like the word "given", in other words, the event X is distinct from the event XY (X given Y). Bayes' law, states that
Pr(XY)=Pr(X and Y both occur)Pr(Y).
This effectively is a re-scaling of the events by the total probability of the given event: Pr(Y).

For example, if X is the event that a 3 is rolled on a fair die and Y is the event that the roll is odd. We know of course that Pr(Y)=12 since half of the rolls are odd. The event X and Y both occur in this case is the same as X since the roll can only be 3 is the roll is odd. Thus
Pr(X and Y both occur)=16
and we can compute the conditional probability
Pr(XY)=1612=13.
As we expect, one out of every three odd rolls is a 3.

Bayes' Law Extended Form

Instead of considering a single event Y, we can consider a range of n possible events Y1,Y2,,Yn that may occur. We require that one of these Y-events must occur and that they cover all possible events that could occur. For example Y1 is the event that H2O is vapor, Y2 is the event that H2O is water andY3 is the event that H2O is ice.

In such a case we know that since the Y-events are distinct
Pr(X)=Pr(X and Y1 both occur)+Pr(X and Y2 both occur)+Pr(X and Y3 both occur).
Using Bayes' law, we can reinterpret as
Pr(X and Yj both occur)=Pr(XYj)Pr(Yj)
and the above becomes
Pr(X)=Pr(XY1)Pr(Y1)+Pr(XY2)Pr(Y2)+Pr(XY3)Pr(Y3).
The same is true if we replace 3 with an arbitrary number of events n.

No comments: