20.03.2013 Views

From Algorithms to Z-Scores - matloff - University of California, Davis

From Algorithms to Z-Scores - matloff - University of California, Davis

From Algorithms to Z-Scores - matloff - University of California, Davis

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

2.6. BAYES’ RULE 13<br />

Note by the way that events involving X2 are NOT independent <strong>of</strong> those involving X1. For instance,<br />

we found in (2.16) that<br />

yet from (2.14) we have<br />

2.6 Bayes’ Rule<br />

P (X1 = 1|X2 = 2) = 0.43 (2.17)<br />

P (X1 = 1) = 0.48. (2.18)<br />

(This section should not be confused with Section 12.5. The latter is highly controversial, while<br />

the material in this section is not controversial at all.)<br />

Following (2.16) above, we noted that the ingredients had already been computed, in (2.13) and<br />

(2.12). If we go back <strong>to</strong> the derivations in those two equations and substitute in (2.16), we have<br />

P (X1 = 1|X2 = 2) = P (X1 = 1 and X2 = 2)<br />

P (X2 = 2<br />

(2.19)<br />

=<br />

P (X1 = 1 and X2 = 2)<br />

P (X1 = 1 and X2 = 2) + P (X1 = 2 and X2 = 2)<br />

(2.20)<br />

=<br />

P (X1 = 1)P (X2 = 2|X1 = 1)<br />

P (X1 = 1)P (X2 = 2|X1 = 1) + P (X1 = 2)P (X2 = 2|X1 = 2) (2.21)<br />

Looking at this in more generality, for events A and B we would find that<br />

P (A|B) =<br />

P (A)P (B|A)<br />

P (A)P (B|A) + P (not A)P (B|not A)<br />

(2.22)<br />

This is known as Bayes’ Theorem or Bayes’ Rule. It can be extended easily <strong>to</strong> cases with<br />

several terms in the denomina<strong>to</strong>r, arising from situations that need <strong>to</strong> be broken down in<strong>to</strong> several<br />

subevents rather than just A and not-A.<br />

2.7 ALOHA in the Notebook Context<br />

Think <strong>of</strong> doing the ALOHA “experiment” many, many times.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!