<?xml version="1.0"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><link rel="stylesheet" title="slides" type="text/css" href="slides.css"></link>
<link rel="alternative stylesheet" title="print" type="text/css"
  href="print.css">
</link>
<script language="javascript">
<![CDATA[
var Slide=1, i, LastSlide
function NumberSlides()
{
var Divs=document.getElementsByTagName("div")
for (i=0;i<Divs.length;i++)
 {if (Divs[i].getAttribute("class")=="slide")
  {Divs[i].setAttribute("id",Slide); Slide++}}
LastSlide=Slide-1
Slide=1
return
}
function Fwd() {Slide=Math.min(Slide+1,LastSlide); location.hash=Slide; return}
function Back() {Slide=Math.max(Slide-1,1); history.back(); return}
function First() {Slide=1; location.hash=Slide; return}
function Last() {Slide=LastSlide; location.hash=Slide; return}
function KeyMove(event) {
     if (event.charCode == 0x20 || event.keyCode == 0x22 || event.keyCode == 0x27)
        {Fwd()} // space, pgdn, r
     else if (event.keyCode == 0x21 || event.keyCode == 0x25) {Back()} // pgup,l
     else if (event.keyCode == 0x24) {First()} // home
     else if (event.keyCode == 0x23) {Last()} // end
     else {return}
 event.preventDefault()
}
]]>
</script>
</head>


<body onload="NumberSlides()" onkeypress="KeyMove(event)">

<div class="slide">
<h1>Examples of Probability</h1>

<p>What is the probability of a health-reform bill this year?</p>

<p>What is the probability of a health-reform bill with a public option this year?</p>

<p>What is the probability of a health-reform bill without a public option this year?</p>

<p>What is the probability of the senate finance committee approving a
  bill by then end of next week?</p>

<p>What is the probability of a health-reform bill this year if the
  senate finance committee approves a bill by next week?</p>

<p>What is the probability of a health-reform bill this year if the
  senate finance committee does not approve a bill by next week?</p>

<p>What is the probability of the finance committee having approved a
  bill by the end of next week if there is a health-reform bill this year?</p>

</div>

<div class="slide">
<h1>Normative Theory of Probability</h1>

<p>What is probability?<br />
A numerical measure of the strength of a
belief in a certain proposition: p(proposition).</p>

<p>Theories: frequency, logical, personal.</p>

<p>Rules of coherence: addition, multiplication, conditional
probability, independence.</p>

</div><div class="slide">
<h1>Theories</h1>

<h3>The Frequency Theory</h3>

The proportion of times it might have
happened in the past that it actually did, e.g.,
p("Get run over crossing 38th street") =
<pre>   (Number of times people got run over crossing 38th st.)
   -------------------------------------------------------
         (Number of times people crossed 38th st.)
</pre>

But why this denominator?

</div>
<div class="slide">
<h1>Other theories</h1>

<h3>The Logical Theory</h3>

The proportion of all possible exchangeable (i.e., equally
likely) worlds which entail our proposition of interest being
true.  E.g. Playing cards.

<p>But how often can we apply this in the real world?</p>

<h3>The Personal Theory</h3>

Probability is a subjective judgment based
on all of the knowledge and beliefs you have. There is no
objectively perfect way to determine the `correct' probability.
Reasonable people can disagree, because they have different
evidence available to them.

<p>Examples:<br />
<a href="http://www.biz.uiowa.edu/iem/">Iowa Electronic Markets</a><br />
<a href="http://www.intrade.com/">Intrade</a><br />
<a href="http://www.weather.gov/">NWS</a><br />
<a href="http://www.nhc.noaa.gov/">National Hurricane Center</a></p>
</div>
<div class="slide">
<h1>Rules of coherence</h1>

p(A) + p(not A) = 1

<p>(not A is called the "complement" of A)</p>

<p><table border="1" cellpadding="20">
<tr><td>raining</td><td>not raining</td></tr>
</table></p>

<p>e.g. "It is absolutely certain that either "It is raining" is true
or "It is raining" is not true.</p>

</div>
<div class="slide">
<h1>Additivity</h1>

<h2>Mutually Exclusive</h2>

Propositions A and B are "mutually exclusive" if they
cannot both be true at the same time.

<p>I.e., if one of the propositions is true, that "excludes" the
possibility of the other being true: the two propositions "mutually
exclude" each other.</p>

<p>When propositions A and B are mutually exclusive:
p(A or B) = p(A) + p(B)</p>

<p>e.g. p(Bill) = p(BillPub) + p(BillNopub)</p>

<p><table border="1" width="80%">
<tr><td>
<table cellpadding="20" cellspacing="20">
<tr><td bgcolor="red" width="70%">BillPub</td><td bgcolor="cyan">BillNopub</td></tr>
</table>
</td></tr></table></p>

</div>
<div class="slide">
<h1>Where does additivity come from?</h1>

From betting.  The expected value of a bet on an event is its
probability times the amount to win.  (Later we'll see that this works
for "expected utility.")

<p>For example, the expected value of "$10 if a coin comes up heads"
is $5.</p>

<p>What is the EV of "$10 if a coin comes up heads twice (in 2 flips)"?</p>

<p>EV is (roughly) the <i>average</i> value if the bet were repeated.</p>

</div>
<div class="slide">
<h1>EV and additivity</h1>

We can bet on two events at once.

<p>The value of a bet on one event should not change when you
break it into two events.</p>

<p>For example, the expected value of (and willingness to pay for)</p>
<p><b>$10 if "Bill"</b></p>
<p>should be the same as:</p>
<p><b>$10 if "BillPub"<br />and<br />
$10 if "BillNopub"</b></p>

</div>
<div class="slide">
<h1>Example, continued</h1>

<p>Suppose you are willing to pay or accept $4 for <b>$10 if "Bill"</b></p>

<p>$3 for <b>$10 if "BillPub"</b></p>

<p>$2 for <b>$10 if "BillNopub"</b></p>

<p>Someone could buy the first bet for $4, sell you the second
and third, together, for $5, then trade the second and third for
the first, since they are logically equivalent, and so on.</p>

<p>Your values must add up.</p>

</div>
<div class="slide">
<h1>Conditional Probability Defined</h1>

<p>1. Before we know.</p>

<p><table border="1">
<tr><td>
 <table cellpadding="10" cellspacing="0">
 <tr><td bgcolor="red">Bill, Senfin</td><td bgcolor="red">&nbsp;&nbsp;</td>
     <td bgcolor="lightgreen">no Bill, Senfin</td></tr>
 <tr><td bgcolor="yellow">Bill, no Senfin</td><td bgcolor="cyan">&nbsp;&nbsp;</td>
     <td bgcolor="cyan">no Bill, no Senfin</td></tr>
 </table>
</td></tr></table></p>

<p>2. After we know Senfin.</p>

<p><table border="1">
<tr><td>
<table cellpadding="10" cellspacing="0">
<tr>
<td bgcolor="red">Bill, Senfin</td>
<td bgcolor="red">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td bgcolor="lightgreen">no Bill, Senfin &nbsp;&nbsp;</td></tr>
</table>
</td></tr></table></p>

<p>The symbol | means "given" or "given that we know that..."</p>

<p>The <i>conditional probability of proposition A given
proposition B</i> is the probability that we would assign to A
if we knew that B were true, that is, the probability of A
conditional on B being true.  We write p(A|B) or p(A/B).  This does not
mean "divided by".</p>

</div>
<div class="slide">
<h1>Multiplication Rule - p(A and B)</h1>

p(Bill | Senfin) = p(Bill AND Senfin) / p(Senfin)

<p>The Conditional Probability Rule is: p(A | B) = p(A and B) / p(B)</p>

<p>(This time the / does mean "divided by".)</p>

<p>In other words: p(A and B) / p(B) = p(A | B)</p>

<p>Then we multiply both sides by p(B) to get
p (A and B) = p(A | B) &times; p(B), the multiplication rule.</p>

</div>

<div class="slide">
<h1>Conditioned assessment (Kleinmuntz et al., 1996)</h1>

<table><tr><td>
Estimate the probability of some event E.

<p>Estimate the probability of E given some other event F, p(E|F)</p>

<p>Estimate p(E|not-F)</p>

<p>Estimate p(F)</p>

<p>Compute E' as p(F)&times;p(E|F) +   p(not-F)&times;p(E|not-F)</p>
</td><td><img src="condass.png" /></td></tr></table>

</div>

<div class="slide">
<h1>Example of conditional assessment</h1>

<p>p(m)=.5, p(C|m)=.4, p(C|f)=.1</p>

<p>p(C) = p(m)&times;p(C|m) + p(f)&times;p(C|f) = .5&times;.4 + .5&times;.1 = .25</p>

</div>

<div class="slide">
<h1>Independent Propositions</h1>

Two propositions A and B are <i>independent</i> if believing that A is
true does not change your belief about whether B is true.  (The reverse
always holds.)

<p>Are "It is raining" and "Melissa is mowing the lawn" independent?</p>

<p>Are "The first car to pass us will be a Dodge" and "The second car
to pass us will be a BMW" independent?</p>

<p>When A and B are independent, then the multiplication rule can be
simplified, because p(A | B) = p(A).  Hence: p(A and B) = p(A) &times; p(B).</p>

</div>

<div class="slide">
<h1>Why the multiplication rule?</h1>

Your choice should not change if you narrow down the space of
possibilities to what matters.  Or if a choice is conditional on
some event.  Consider the choice of taking Option A or not.

<p>Choice A. ($1 if Rain, p=.75), (-$3 if no rain, p=.25)<br />
vs. nothing.</p>

<p>Choice B. Choice A if heads, nothing if tails.</p>

<p>Choice C. ($1 if Rain, p=.375), (-$3 if no rain, p=.125)<br />
vs. nothing.<br />

<svg xmlns="http://www.w3.org/2000/svg" height="50%" width="50%"
   viewBox="0 45 700 450">
<desc>R SVG Plot!</desc>
<rect width="100%" height="100%" style="fill:#FFFFFF"/>
<line x1="72.27" y1="289.08" x2="252.94" y2="173.45" style="stroke-width:2;stroke:#000000;fill:#000000;stroke-opacity:1.000000;fill-opacity:0.000000"/>
<line x1="72.27" y1="289.08" x2="252.94" y2="404.71" style="stroke-width:2;stroke:#000000;fill:#000000;stroke-opacity:1.000000;fill-opacity:0.000000"/>
<text transform="translate(282.00,183.45) "  style="font-size:20" >H</text>
<text transform="translate(281.75,414.71) "  style="font-size:20" >T</text>
<text transform="translate(135.98,212.36) "  style="font-size:20" >.5</text>
<line x1="325.21" y1="173.45" x2="505.89" y2="57.82" style="stroke-width:2;stroke:#000000;fill:#000000;stroke-opacity:1.000000;fill-opacity:0.000000"/>
<line x1="325.21" y1="173.45" x2="505.89" y2="289.08" style="stroke-width:2;stroke:#000000;fill:#000000;stroke-opacity:1.000000;fill-opacity:0.000000"/>
<text transform="translate(538.01,72.82) "  style="font-size:20" >R   $1</text>
<text transform="translate(535.98,299.08) "  style="font-size:20" >N  -$3</text>
<text transform="translate(383.43,96.72) "  style="font-size:20" >.75</text>
<text transform="translate(383.43,270.17) "  style="font-size:20" >.25</text>
</svg></p>

</div>

<div class="slide">
<h1>Bayes's Theorem as an equation</h1>

H = Hypothesis, "Teri has cancer"
<br />D = Datum, e.g., "Mammogram result is positive"

<p>When Dr. Ayes examines Teri, she assigns a prior probability of 10%
to the hypothesis H: p(H) = 0.1. The prior
probability is the probability that the Hypothesis is true, based on
what we know prior to doing a test such as a mammogram.</p>

<p>In thinking about whether to do the mammogram, Dr. Ayes knows:
<br /><table>
<tr><td>&nbsp;p(H) = 0.1</td><td>&nbsp;The prior probability is 10%</td></tr>
<tr><td>&nbsp;p (not-H) = 0.9</td><td>&nbsp;Because p(H) + p(not-H) = 1</td></tr>
<tr><td>&nbsp;p(D | H) = 0.9</td><td>&nbsp;Test has a "hit rate" of 90%</td></tr>
<tr><td>&nbsp;p(D | not H) = 0.2</td><td>&nbsp;Test has a "false alarm rate" of 20%</td></tr>
</table></p>

<p>Dr. Ayes wants to know what the probability of Teri having cancer will be if the test
is positive. In symbols, she wants to know:
<br />p(H | D) - The posterior (after the test result) probability.</p>
<p>How do we turn the information she has into the information she
wants?</p>

</div>
<div class="slide">
<h1>Bayes's theorem, pictured</h1>

<svg xmlns="http://www.w3.org/2000/svg" height="32%" width="100%"
   viewBox="0 0 1000 300">
  <rect x="0" y="0" width="270" height="300" fill="lightgreen"
   stroke="black" stroke-width="0" />
  <rect x="270" y="0" width="30" height="300" fill="orange"
   stroke="black" stroke-width="0" />
  <text x="30" y="130" fill="black">not-H</text> 
  <text x="275" y="130" fill="black" font-size="75%">H</text> 

  <rect x="350" y="0" width="270" height="240" fill="gray"
   stroke="black" stroke-width="0" />
  <rect x="350" y="240" width="270" height="60" fill="lightgreen"
   stroke="black" stroke-width="0" />
  <rect x="620" y="0" width="30" height="30" fill="lightgray"
   stroke="black" stroke-width="0" />
  <rect x="620" y="30" width="30" height="270" fill="orange"
   stroke="black" stroke-width="0" />
  <text x="410" y="290" fill="black">not-H &amp; D</text> 
  <text x="625" y="170" fill="black" font-size="75%">H</text>
  <text x="625" y="200" fill="black" font-size="75%">&amp;</text>
  <text x="625" y="230" fill="black" font-size="75%">D</text>

  <rect x="700" y="240" width="270" height="60" fill="lightgreen"
   stroke="black" stroke-width="0" />
  <rect x="970" y="30" width="30" height="270" fill="orange"
   stroke="black" stroke-width="0" />
  <text x="740" y="290" fill="black">not-H &amp; D</text> 
  <text x="975" y="170" fill="black" font-size="75%">H</text>
  <text x="975" y="200" fill="black" font-size="75%">&amp;</text>
  <text x="975" y="230" fill="black" font-size="75%">D</text>
</svg>

<p>p(not-H &amp; D) = p(D | not-H) &times; p(not-H)</p>
<p>p(H &amp; D) = p(D | H) &times; p(H)</p>
<p>Thus: p(H | D) = p(H &amp; D) / [ p(not-H &amp; D) + p(H &amp; D)] =</p>
<pre>            p(D|H)&times;p(H)
-----------------------------------------------
[ p(D|H)&times;p(H) + p(D|not-H)&times;p(not-H) ]
</pre>

</div>
<div class="slide">
<h1>Another way to picture this</h1>

<img src="ptree.png" width="534px" alt="probability tree" />

<a href="http://yudkowsky.net/bayes/bayes.html">A long but good tutorial.</a>

</div>
<div class="slide">
<h1>Deriving Bayes's Theorem</h1>

The Conditional Probability Rule tells us a way to calculate p(H | D):

<p>(1) p(H | D) = p(H and D) / p(D)</p>

<p>But we don't know p(H and D) or p(D).
Let's try to use what we do know to find out what they are.
The Multiplication Rule is:</p>
<p>(2) p(D and H) = p(D | H) &times; p(H)</p>

<p>We can change (D and H) to (H and D), since they mean the same thing:</p>

<p>(3) p(H and D) = p(D | H) &times; p(H)</p>

<p>So now we can work out p(H and D) from two things we
know: p(D | H) and p(H). If we use (3) to change (1), we can get a
form of Bayes's theorem:</p>

<p>(4) p(H | D) = p(D | H) &times; p(H) / p(D)</p>

</div><div class="slide">
<h1>Getting p(D)</h1>

(we have 4) p(H | D) = p(D | H) &times; p(H) / p(D)

<p>Now we just need to get p(D). We can use the fact that D must happen
either with H or with not-H:</p>

<p>(5) p(D) = p(D and H) + p(D and not-H)</p>

<p>Then we can use the Multiplication Rule again to replace the "and"
terms:</p>

<p>(6) p(D) = p(D | H) &times; p(H) + p(D | not-H) &times; p(not-H)</p>

<p>By replacing "p(D)" in (4) with our expression from (6) we get:</p>

<p>(7)</p>
<pre>                    p(D|H)&times;p(H)
p(H|D) = ---------------------------------------------
           [ p(D|H)&times;p(H) + p(D|not-H)&times;p(not-H) ]
</pre>

</div>
<div class="slide">
<h1>Finishing the example</h1>

<p>(we have 7)</p>
<pre>                    p(D|H)&times;p(H)
p(H|D) = ---------------------------------------------
           [ p(D|H)&times;p(H) + p(D|not-H)&times;p(not-H) ]
</pre>

<p>So Dr. Ayes could use that formula to figure out whether a mammogram
would be worthwhile. Putting in the numbers</p>

<pre>                .9&times;.1          .09     .09
p(H | D) = --------------- = ------- = --- = .33
           [.9&times;.1 + .2&times;.9]   .09+.18   .27
</pre>

</div>
<div class="slide">
<h1>Ratio form of Bayes's theorem</h1>

<pre>                    p(D | H) &times; p(H)
p(H | D) = ---------------------------------------------
           [ p(D | H) &times; p(H) + p(D | not-H) &times; p(not-H) ]

                         p(D | not-H) &times; p(not-H)
p(not-H | D) = ---------------------------------------------
               [ p(D | H) &times; p(H) + p(D | not-H) &times; p(not-H) ]

  p(H | D)         p(D | H) &times; p(H)          p(D | H)     p(H)
------------ = ----------------------- = ------------ &times; --------
p(not-H | D)   p(D | not-H) &times; p(not-H)   p(D | not-H)   p(not-H)

posterior odds = diagnostic ratio &times; prior odds

log(posterior odds) = log(diagnostic ratio) + log(prior odds)
</pre>

</div>
</body></html>
