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(X∣Y)
vertical bar is meant like the word "given", in other words, the event
X
is distinct from the event
(X∣Y), i.e.
X given Y.
Bayes' law, states that
Pr(X∣Y)=Pr(Y)Pr(X and Y both occur).
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)=21
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 if the roll is already odd. Thus
Pr(X and Y both occur)=61
and we can compute the conditional probability
Pr(X∣Y)=1/21/6=31.
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
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 and
Y3 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(X∣Yj)⋅Pr(Yj)
and the above becomes
Pr(X)=Pr(X∣Y1)⋅Pr(Y1)+Pr(X∣Y2)⋅Pr(Y2)+Pr(X∣Y3)⋅Pr(Y3).
The same is true if we replace 3 with an arbitrary number of
events n.