title: Understanding Bayes' Theorem
body: <p>I'm working on an implementation of a Naive Bayes Classifier. <a href="http://oreilly.com/catalog/9780596529321" rel="nofollow noreferrer">Programming Collective Intelligence</a> introduces this subject by describing Bayes Theorem as:</p>
  
  <pre><code>Pr(A | B) = Pr(B | A) x Pr(A)/Pr(B)
  </code></pre>
  
  <p>As well as a specific example relevant to document classification:</p>
  
  <pre><code>Pr(Category | Document) = Pr(Document | Category) x Pr(Category) / Pr(Document)
  </code></pre>
  
  <p>I was hoping someone could explain to me the notation used here, what do <code>Pr(A | B)</code> and <code>Pr(A)</code> mean? It looks like some sort of function but then what does the pipe ("<code>|</code>") mean, etc?</p>