<?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()
}

var ph,pdh,pdnh,sf,r1,r2,r3,r4,Tph,Xcenter=1053.66,Ycenter=573.99,Rwidth=258.10,Rheight=199.94

function Compute() {
Tph = document.getElementById("ph").firstChild
Tpnh = document.getElementById("pnh").firstChild
Tpdh = document.getElementById("pdh").firstChild
Tpndh = document.getElementById("pndh").firstChild
Tpdnh = document.getElementById("pdnh").firstChild
Tpndnh = document.getElementById("pndnh").firstChild
Rpdh = document.getElementById("jdh").firstChild
Rpndh = document.getElementById("jndh").firstChild
Rpdnh = document.getElementById("jdnh").firstChild
Rpndnh = document.getElementById("jndnh").firstChild
r1 = document.getElementById("r1")
r2 = document.getElementById("r2")
r3 = document.getElementById("r3")
r4 = document.getElementById("r4")
sf=document.getElementsByTagName("input");
ph=sf[0].value;
pdh=sf[1].value;
pdnh=sf[2].value;
Tph.nodeValue = Math.round(100*ph)/100
Tpnh.nodeValue = Math.round(100*(1-ph))/100
Tpdh.nodeValue = Math.round(100*pdh)/100
Tpndh.nodeValue = Math.round(100*(1-pdh))/100
Tpdnh.nodeValue = Math.round(100*pdnh)/100
Tpndnh.nodeValue = Math.round(100*(1-pdnh))/100
Rpdh.nodeValue = Math.round(100*ph*pdh)/100
Rpndh.nodeValue = Math.round(100*ph*(1-pdh))/100
Rpdnh.nodeValue = Math.round(100*(1-ph)*pdnh)/100
Rpndnh.nodeValue = Math.round(100*(1-ph)*(1-pdnh))/100
r1.setAttributeNS(null, "width", pdh*Rwidth )
r1.setAttributeNS(null, "height", ph*Rheight )
r1.setAttributeNS(null, "x", Xcenter-pdh*Rwidth )
r1.setAttributeNS(null, "y", Ycenter-ph*Rheight )
r2.setAttributeNS(null, "width", (1-pdh)*Rwidth )
r2.setAttributeNS(null, "height", ph*Rheight )
r2.setAttributeNS(null, "x", Xcenter )
r2.setAttributeNS(null, "y", Ycenter-ph*Rheight )
r3.setAttributeNS(null, "width", pdnh*Rwidth )
r3.setAttributeNS(null, "height", (1-ph)*Rheight )
r3.setAttributeNS(null, "x", Xcenter-pdnh*Rwidth )
r3.setAttributeNS(null, "y", Ycenter )
r4.setAttributeNS(null, "width", (1-pdnh)*Rwidth )
r4.setAttributeNS(null, "height", (1-ph)*Rheight )
r4.setAttributeNS(null, "x", Xcenter )
r4.setAttributeNS(null, "y", Ycenter )
}
]]>
</script>
</head>

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

<div class="slide">
<h1>Examples of Probability: What do these mean?</h1>

<p>What is the probability that Penn will abolish football (as it has
boxing) within 5 years?</p>

<p>What was the probability of a health-reform bill in spring 2009?</p>

<p>What is the probability that the Republicans will have a majority
in the House after the 2012 election?  the Senate?</p>

<p>Other examples:<br />
<a href="http://www.intrade.com/">Intrade</a><br />
<a href="http://www.biz.uiowa.edu/iem/">Iowa Electronic Markets</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>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>

<a href="http://bookofodds.com/">Book of odds</a>

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

But why this denominator?  why the numerator?

</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.

</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>rain</td><td>not rain</td></tr>
</table></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(yes) =  p(female-yes or male-yes) = p(male-yes) + p(female-yes)</p>

<p><table border="1" width="80%">
<tr><td>
<table cellpadding="20" cellspacing="20">
<tr><td bgcolor="red" width="70%">male-yes</td><td bgcolor="cyan">female-yes</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 "Red card"</b></p>
<p>should be the same as:</p>
<p><b>$10 if "Heart"<br />and<br /> $10 if "Diamond"</b></p>

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

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

<p>$2.50 for <b>$10 if "Heart"</b></p>

<p>$2.50 for <b>$10 if "Diamond"</b></p>

<p>You have a ticket for the first bet.  I buy it from you for $4.
  You are now ahead by $4.</p>

</div>

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

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

<p>$2.50 for <b>$10 if "Heart"</b></p>

<p>$2.50 for <b>$10 if "Diamond"</b></p>

<p>You have a ticket for the first bet.  I buy it from you for $4.
  You are now ahead by $4.</p>

<p>Then I sell you tickets for the second and third bets for $2.50
  each.  You are now behind by $1.</p>

</div>

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

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

<p>$2.50 for <b>$10 if "Heart"</b></p>

<p>$2.50 for <b>$10 if "Diamond"</b></p>

<p>You have a ticket for the first bet.  I buy it from you for $4.
  You are now ahead by $4.</p>

<p>Then I sell you tickets for the second and third bets for $2.50
  each.  You are now behind by $1.</p>

<p>Then I point out that the second and third bets together are the same as the
  first bet, so you are willing to trade those two tickets for a
  ticket for the first bet.  You are still behind by $1, and we start
  over....</p>

</div>

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

<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>

<p>For example, what is the probability that Obama wins if Perry is the
nominee?</p>

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

<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>or:<br />
p (A and B) = p(A | B) &times; p(B), the multiplication rule.</p>

<p>p (Obama-win and Perry-nom) = p(Obama-win | Perry-nom) &times; p(Perry-nom)</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>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>Bayes's theorem</h1>

<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>

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

</div>
<div class="slide">
<h1>A diagram of Bayes's theorem</h1>

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="50%" viewBox="0 0 504 454" version="1.1">
<defs>
<g>
<symbol overflow="visible" id="glyph0-0">
<path style="stroke:none;" d=""/>
</symbol>
<symbol overflow="visible" id="glyph0-1">
<path style="stroke:none;" d="M 11.015625 -6.640625 L 11.015625 0 L 12.875 0 L 12.875 -14.578125 L 11.015625 -14.578125 L 11.015625 -8.28125 L 3.515625 -8.28125 L 3.515625 -14.578125 L 1.65625 -14.578125 L 1.65625 0 L 3.546875 0 L 3.546875 -6.640625 L 11.015625 -6.640625 Z M 11.015625 -6.640625 "/>
</symbol>
<symbol overflow="visible" id="glyph0-2">
<path style="stroke:none;" d="M 9.09375 -8.21875 C 9.125 -7.15625 8.8125 -6.71875 8.078125 -6.71875 C 7.796875 -6.71875 7.484375 -6.8125 7.078125 -7.0625 L 4.734375 -8.4375 C 4.40625 -8.640625 4.015625 -8.765625 3.65625 -8.765625 C 2.359375 -8.765625 1.59375 -7.734375 1.5 -5.859375 L 2.5625 -5.859375 C 2.59375 -6.3125 2.640625 -6.515625 2.71875 -6.71875 C 2.921875 -7.15625 3.265625 -7.421875 3.625 -7.421875 C 3.8125 -7.421875 4.28125 -7.265625 4.484375 -7.140625 L 6.4375 -5.875 C 6.953125 -5.5625 7.5625 -5.359375 8.0625 -5.359375 C 9.34375 -5.359375 10.15625 -6.359375 10.15625 -7.90625 L 10.15625 -8.21875 L 9.09375 -8.21875 Z M 9.09375 -8.21875 "/>
</symbol>
<symbol overflow="visible" id="glyph0-3">
<path style="stroke:none;" d="M 3.8125 -2.078125 L 1.734375 -2.078125 L 1.734375 0 L 3.8125 0 L 3.8125 -2.078125 Z M 3.8125 -2.078125 "/>
</symbol>
<symbol overflow="visible" id="glyph0-4">
<path style="stroke:none;" d="M 5.1875 -10.09375 L 5.1875 0 L 6.9375 0 L 6.9375 -14.1875 L 5.78125 -14.1875 C 5.15625 -12 4.765625 -11.703125 2.046875 -11.359375 L 2.046875 -10.09375 L 5.1875 -10.09375 Z M 5.1875 -10.09375 "/>
</symbol>
<symbol overflow="visible" id="glyph0-5">
<path style="stroke:none;" d="M 5.5 -14.1875 C 4.1875 -14.1875 2.984375 -13.59375 2.234375 -12.625 C 1.3125 -11.375 0.859375 -9.484375 0.859375 -6.859375 C 0.859375 -2.078125 2.453125 0.453125 5.5 0.453125 C 8.5 0.453125 10.140625 -2.078125 10.140625 -6.734375 C 10.140625 -9.5 9.703125 -11.34375 8.765625 -12.625 C 8.015625 -13.625 6.84375 -14.1875 5.5 -14.1875 Z M 5.5 -12.625 C 7.40625 -12.625 8.34375 -10.703125 8.34375 -6.90625 C 8.34375 -2.875 7.421875 -1 5.453125 -1 C 3.59375 -1 2.65625 -2.953125 2.65625 -6.84375 C 2.65625 -10.71875 3.59375 -12.625 5.5 -12.625 Z M 5.5 -12.625 "/>
</symbol>
<symbol overflow="visible" id="glyph0-6">
<path style="stroke:none;" d="M 1.0625 -3.234375 C 1.40625 -0.921875 2.921875 0.453125 5.078125 0.453125 C 6.640625 0.453125 8.0625 -0.296875 8.875 -1.5625 C 9.78125 -2.9375 10.1875 -4.6875 10.1875 -7.265625 C 10.1875 -9.640625 9.8125 -11.15625 8.984375 -12.421875 C 8.203125 -13.5625 6.953125 -14.1875 5.40625 -14.1875 C 2.703125 -14.1875 0.765625 -12.1875 0.765625 -9.40625 C 0.765625 -6.765625 2.5625 -4.90625 5.125 -4.90625 C 6.453125 -4.90625 7.4375 -5.375 8.359375 -6.484375 C 8.34375 -3.015625 7.21875 -1.09375 5.203125 -1.09375 C 3.953125 -1.09375 3.09375 -1.875 2.8125 -3.234375 L 1.0625 -3.234375 Z M 5.375 -12.640625 C 7.015625 -12.640625 8.265625 -11.28125 8.265625 -9.4375 C 8.265625 -7.703125 7.046875 -6.453125 5.3125 -6.453125 C 3.625 -6.453125 2.5625 -7.640625 2.5625 -9.546875 C 2.5625 -11.34375 3.765625 -12.640625 5.375 -12.640625 Z M 5.375 -12.640625 "/>
</symbol>
<symbol overflow="visible" id="glyph0-7">
<path style="stroke:none;" d="M 1.78125 0 L 7.40625 0 C 11.078125 0 13.34375 -2.765625 13.34375 -7.296875 C 13.34375 -11.8125 11.09375 -14.578125 7.40625 -14.578125 L 1.78125 -14.578125 L 1.78125 0 Z M 3.640625 -1.640625 L 3.640625 -12.9375 L 7.078125 -12.9375 C 9.953125 -12.9375 11.484375 -11 11.484375 -7.28125 C 11.484375 -3.59375 9.953125 -1.640625 7.078125 -1.640625 L 3.640625 -1.640625 Z M 3.640625 -1.640625 "/>
</symbol>
<symbol overflow="visible" id="glyph0-8">
<path style="stroke:none;" d=""/>
</symbol>
<symbol overflow="visible" id="glyph0-9">
<path style="stroke:none;" d="M 4.71875 -14.578125 C 2.71875 -11.953125 1.453125 -8.3125 1.453125 -5.1875 C 1.453125 -2.015625 2.71875 1.625 4.71875 4.234375 L 5.8125 4.234375 C 4.0625 1.375 3.078125 -1.984375 3.078125 -5.1875 C 3.078125 -8.359375 4.0625 -11.734375 5.8125 -14.578125 L 4.71875 -14.578125 Z M 4.71875 -14.578125 "/>
</symbol>
<symbol overflow="visible" id="glyph0-10">
<path style="stroke:none;" d="M 1.859375 4.234375 C 3.859375 1.625 5.125 -2.015625 5.125 -5.15625 C 5.125 -8.3125 3.859375 -11.953125 1.859375 -14.578125 L 0.765625 -14.578125 C 2.515625 -11.71875 3.5 -8.359375 3.5 -5.15625 C 3.5 -1.984375 2.515625 1.40625 0.765625 4.234375 L 1.859375 4.234375 Z M 1.859375 4.234375 "/>
</symbol>
<symbol overflow="visible" id="glyph0-11">
<path style="stroke:none;" d="M 10.6875 -7.0625 L 1 -7.0625 L 1 -5.65625 L 10.6875 -5.65625 L 10.6875 -7.0625 Z M 10.6875 -3.625 L 1 -3.625 L 1 -2.21875 L 10.6875 -2.21875 L 10.6875 -3.625 Z M 10.6875 -3.625 "/>
</symbol>
<symbol overflow="visible" id="glyph0-12">
<path style="stroke:none;" d="M 10.125 -1.734375 L 2.65625 -1.734375 C 2.84375 -2.90625 3.484375 -3.640625 5.21875 -4.65625 L 7.21875 -5.734375 C 9.203125 -6.8125 10.21875 -8.28125 10.21875 -10.015625 C 10.21875 -11.203125 9.734375 -12.296875 8.90625 -13.0625 C 8.0625 -13.8125 7.015625 -14.1875 5.6875 -14.1875 C 3.875 -14.1875 2.546875 -13.546875 1.765625 -12.34375 C 1.265625 -11.578125 1.046875 -10.703125 1 -9.265625 L 2.765625 -9.265625 C 2.8125 -10.21875 2.9375 -10.796875 3.1875 -11.265625 C 3.640625 -12.125 4.5625 -12.640625 5.625 -12.640625 C 7.21875 -12.640625 8.421875 -11.5 8.421875 -9.984375 C 8.421875 -8.859375 7.765625 -7.90625 6.5 -7.1875 L 4.65625 -6.140625 C 1.703125 -4.453125 0.84375 -3.125 0.6875 0 L 10.125 0 L 10.125 -1.734375 Z M 10.125 -1.734375 "/>
</symbol>
<symbol overflow="visible" id="glyph0-13">
<path style="stroke:none;" d="M 7.8125 -7.453125 C 9.28125 -8.34375 9.765625 -9.0625 9.765625 -10.40625 C 9.765625 -12.625 8.015625 -14.1875 5.5 -14.1875 C 3 -14.1875 1.234375 -12.625 1.234375 -10.40625 C 1.234375 -9.078125 1.71875 -8.359375 3.15625 -7.453125 C 1.546875 -6.6875 0.734375 -5.5 0.734375 -3.9375 C 0.734375 -1.34375 2.703125 0.453125 5.5 0.453125 C 8.296875 0.453125 10.265625 -1.34375 10.265625 -3.921875 C 10.265625 -5.5 9.453125 -6.6875 7.8125 -7.453125 Z M 5.5 -12.625 C 7 -12.625 7.953125 -11.734375 7.953125 -10.359375 C 7.953125 -9.046875 6.984375 -8.15625 5.5 -8.15625 C 4.015625 -8.15625 3.046875 -9.046875 3.046875 -10.375 C 3.046875 -11.734375 4.015625 -12.625 5.5 -12.625 Z M 5.5 -6.6875 C 7.265625 -6.6875 8.453125 -5.5625 8.453125 -3.90625 C 8.453125 -2.21875 7.265625 -1.09375 5.453125 -1.09375 C 3.734375 -1.09375 2.546875 -2.234375 2.546875 -3.90625 C 2.546875 -5.5625 3.734375 -6.6875 5.5 -6.6875 Z M 5.5 -6.6875 "/>
</symbol>
</g>
<clipPath id="clip1">
  <path d="M 0 0 L 505 0 L 505 505 L 0 505 Z M 0 0 "/>
</clipPath>
</defs>
<g id="surface0">
<rect x="0" y="0" width="504" height="504" style="fill:rgb(100%,100%,100%);fill-opacity:1;stroke:none;"/>
<g clip-path="url(#clip1)" clip-rule="nonzero">
<path style="fill:none;stroke-width:0.75;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 50.398438 252 L 176.398438 151.199219 "/>
<path style="fill:none;stroke-width:0.75;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 50.398438 252 L 176.398438 352.800781 "/>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
  <use xlink:href="#glyph0-1" x="194.101562" y="157.758789"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
  <use xlink:href="#glyph0-2" x="188.101562" y="359.360352"/>
  <use xlink:href="#glyph0-1" x="199.78125" y="359.360352"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
  <use xlink:href="#glyph0-3" x="86.800781" y="193.040039"/>
  <use xlink:href="#glyph0-4" x="92.360352" y="193.040039"/>
  <use xlink:href="#glyph0-5" x="103.480469" y="193.040039"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
  <use xlink:href="#glyph0-3" x="86.800781" y="324.079102"/>
  <use xlink:href="#glyph0-6" x="92.360352" y="324.079102"/>
  <use xlink:href="#glyph0-5" x="103.480469" y="324.079102"/>
</g>
<path style="fill:none;stroke-width:0.75;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 221.761719 151.199219 L 347.761719 100.800781 "/>
<path style="fill:none;stroke-width:0.75;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 221.761719 151.199219 L 347.761719 201.601562 "/>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
  <use xlink:href="#glyph0-7" x="357.398438" y="107.360352"/>
  <use xlink:href="#glyph0-8" x="371.838867" y="107.360352"/>
  <use xlink:href="#glyph0-9" x="377.398438" y="107.360352"/>
  <use xlink:href="#glyph0-3" x="384.058594" y="107.360352"/>
  <use xlink:href="#glyph0-4" x="389.618164" y="107.360352"/>
  <use xlink:href="#glyph0-5" x="400.738281" y="107.360352"/>
  <use xlink:href="#glyph0-10" x="411.858398" y="107.360352"/>
  <use xlink:href="#glyph0-9" x="418.518555" y="107.360352"/>
  <use xlink:href="#glyph0-3" x="425.178711" y="107.360352"/>
  <use xlink:href="#glyph0-6" x="430.738281" y="107.360352"/>
  <use xlink:href="#glyph0-5" x="441.858398" y="107.360352"/>
  <use xlink:href="#glyph0-10" x="452.978516" y="107.360352"/>
  <use xlink:href="#glyph0-11" x="459.638672" y="107.360352"/>
  <use xlink:href="#glyph0-3" x="471.318359" y="107.360352"/>
  <use xlink:href="#glyph0-5" x="476.87793" y="107.360352"/>
  <use xlink:href="#glyph0-6" x="487.998047" y="107.360352"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
  <use xlink:href="#glyph0-3" x="263.199219" y="117.438477"/>
  <use xlink:href="#glyph0-6" x="268.758789" y="117.438477"/>
  <use xlink:href="#glyph0-5" x="279.878906" y="117.438477"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
  <use xlink:href="#glyph0-3" x="263.199219" y="198.079102"/>
  <use xlink:href="#glyph0-4" x="268.758789" y="198.079102"/>
  <use xlink:href="#glyph0-5" x="279.878906" y="198.079102"/>
</g>
<path style="fill:none;stroke-width:0.75;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 221.761719 352.800781 L 347.761719 302.398438 "/>
<path style="fill:none;stroke-width:0.75;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 221.761719 352.800781 L 347.761719 403.199219 "/>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
  <use xlink:href="#glyph0-7" x="357.398438" y="308.958008"/>
  <use xlink:href="#glyph0-8" x="371.838867" y="308.958008"/>
  <use xlink:href="#glyph0-9" x="377.398438" y="308.958008"/>
  <use xlink:href="#glyph0-3" x="384.058594" y="308.958008"/>
  <use xlink:href="#glyph0-6" x="389.618164" y="308.958008"/>
  <use xlink:href="#glyph0-5" x="400.738281" y="308.958008"/>
  <use xlink:href="#glyph0-10" x="411.858398" y="308.958008"/>
  <use xlink:href="#glyph0-9" x="418.518555" y="308.958008"/>
  <use xlink:href="#glyph0-3" x="425.178711" y="308.958008"/>
  <use xlink:href="#glyph0-12" x="430.738281" y="308.958008"/>
  <use xlink:href="#glyph0-5" x="441.858398" y="308.958008"/>
  <use xlink:href="#glyph0-10" x="452.978516" y="308.958008"/>
  <use xlink:href="#glyph0-11" x="459.638672" y="308.958008"/>
  <use xlink:href="#glyph0-3" x="471.318359" y="308.958008"/>
  <use xlink:href="#glyph0-4" x="476.87793" y="308.958008"/>
  <use xlink:href="#glyph0-13" x="487.998047" y="308.958008"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
  <use xlink:href="#glyph0-3" x="263.199219" y="319.040039"/>
  <use xlink:href="#glyph0-12" x="268.758789" y="319.040039"/>
  <use xlink:href="#glyph0-5" x="279.878906" y="319.040039"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
  <use xlink:href="#glyph0-3" x="263.199219" y="399.680664"/>
  <use xlink:href="#glyph0-13" x="268.758789" y="399.680664"/>
  <use xlink:href="#glyph0-5" x="279.878906" y="399.680664"/>
</g>
</g>
</g>
</svg>
</div>

<div class="slide">
<form name="xform" onsubmit="Compute()">
Enter new values:
p(Hypothesis) <input type="text" name="ph" size="4" value=".1" />
p(Data|Hypothesis) <input type="text" name="pdh" size="4" value=".9" />
p(Data|~Hypothesis) <input type="text" name="pdnh" size="4" value=".2" />
<input type="submit" onSubmit="Compute()" value="Submit"/>
</form>
<svg xmlns="http://www.w3.org/2000/svg" width="80%" height="64%" viewBox="0,0,1445.40,1156.32">
<desc>R SVG Plot!</desc>
<rect width="100%" height="100%" style="fill: rgb(255, 255, 255);"/>
<line x1="85.79" y1="573.99" x2="318.08" y2="324.07" style="stroke-width: 1; stroke: rgb(0, 0, 0); fill: rgb(0, 0, 0); stroke-opacity: 1; fill-opacity: 0;"/>
<line x1="85.79" y1="573.99" x2="318.08" y2="823.91" style="stroke-width: 1; stroke: rgb(0, 0, 0); fill: rgb(0, 0, 0); stroke-opacity: 1; fill-opacity: 0;"/>
<line x1="408.41" y1="324.07" x2="601.98" y2="124.14" style="stroke-width: 1; stroke: rgb(0, 0, 0); fill: rgb(0, 0, 0); stroke-opacity: 1; fill-opacity: 0;"/>
<line x1="408.41" y1="324.07" x2="601.98" y2="524.01" style="stroke-width: 1; stroke: rgb(0, 0, 0); fill: rgb(0, 0, 0); stroke-opacity: 1; fill-opacity: 0;"/>
<line x1="408.41" y1="823.91" x2="601.98" y2="623.98" style="stroke-width: 1; stroke: rgb(0, 0, 0); fill: rgb(0, 0, 0); stroke-opacity: 1; fill-opacity: 0;"/>
<line x1="408.41" y1="823.91" x2="601.98" y2="1023.85" style="stroke-width: 1; stroke: rgb(0, 0, 0); fill: rgb(0, 0, 0); stroke-opacity: 1; fill-opacity: 0;"/>
<rect x="795.56" y="374.06" width="258.10" height="199.94" style="stroke-width: 1; stroke: rgb(0, 0, 0); fill: rgb(255, 255, 255); stroke-opacity: 1; fill-opacity: 0;"/>
<rect x="1053.66" y="374.06" width="258.10" height="199.94" style="stroke-width: 1; stroke: rgb(0, 0, 0); fill: rgb(255, 255, 255); stroke-opacity: 1; fill-opacity: 0;"/>
<rect x="795.56" y="573.99" width="258.10" height="199.94" style="stroke-width: 1; stroke: rgb(0, 0, 0); fill: rgb(255, 255, 255); stroke-opacity: 1; fill-opacity: 0;"/>
<rect x="1053.66" y="573.99" width="258.10" height="199.94" style="stroke-width: 1; stroke: rgb(0, 0, 0); fill: rgb(255, 255, 255); stroke-opacity: 1; fill-opacity: 0;"/>
<text transform="translate(359.7, 324.07)" font-family="Verdana" font-size="30" fill="blue">H</text>
<text transform="translate(350.07, 823.91)" font-family="Verdana" font-size="30" fill="blue">~H</text>
<text transform="translate(643.18, 124.14)" font-family="Verdana" font-size="30" fill="blue" >D</text>
<text transform="translate(633.98, 524.01)" font-family="Verdana" font-size="30" fill="blue" >~D</text>
<text transform="translate(643.18, 623.98)" font-family="Verdana" font-size="30" fill="blue" >D</text>
<text transform="translate(633.98, 1023.85)" font-family="Verdana" font-size="30" fill="blue" >~D</text>
<text transform="translate(765.78, 474.03)" font-family="Verdana" font-size="30" fill="blue" >H</text>
<text transform="translate(743.67, 673.96)" font-family="Verdana" font-size="30" fill="blue" >~H</text>
<text transform="translate(920.64, 349.07)" font-family="Verdana" font-size="30" fill="blue" >D</text>
<text transform="translate(1175.98, 349.07)" font-family="Verdana" font-size="30" fill="blue" >~D</text>
<rect id="r1" x="821.37" y="554.00" width="232.29" height="19.99" style="stroke-width: 1; stroke: rgb(0, 0, 0); fill: rgb(0, 255, 0); stroke-opacity: 1; fill-opacity: 1;"/>
<rect id="r2" x="1053.66" y="554.00" width="25.81" height="19.99" style="stroke-width: 1; stroke: rgb(0, 0, 0); fill: rgb(0, 255, 255); stroke-opacity: 1; fill-opacity: 1;"/>
<rect id="r3" x="1002.04" y="573.99" width="51.62" height="179.94" style="stroke-width: 1; stroke: rgb(0, 0, 0); fill: rgb(0, 255, 0); stroke-opacity: 1; fill-opacity: 1;"/>
<rect id="r4" x="1053.66" y="573.99" width="206.48" height="179.94" style="stroke-width: 1; stroke: rgb(0, 0, 0); fill: rgb(0, 255, 255); stroke-opacity: 1; fill-opacity: 1;"/>
<text id="ph" transform="translate(143.28, 424.04)" font-family="Verdana" font-size="30" >0.1</text>
<text id="pnh" transform="translate(143.28, 723.95)" font-family="Verdana" font-size="30" >0.9</text>
<text id="pdh" transform="translate(465.91, 174.12)" font-family="Verdana" font-size="30" >0.9</text>
<text id="pndh" transform="translate(465.91, 474.03)"  font-family="Verdana" font-size="30" >0.1</text>
<text id="pdnh" transform="translate(465.91, 673.96)"  font-family="Verdana" font-size="30" >0.2</text>
<text id="pndnh" transform="translate(465.91, 973.86)"  font-family="Verdana" font-size="30" >0.8</text>
<text id="jdh" transform="translate(914.83, 474.03)"  font-family="Verdana" font-size="30" >0.09</text>
<text id="jndh" transform="translate(1172.93, 474.03)"  font-family="Verdana" font-size="30" >0.01</text>
<text id="jdnh" transform="translate(914.83, 673.96)"  font-family="Verdana" font-size="30" >0.18</text>
<text id="jndnh" transform="translate(1172.93, 673.96)"  font-family="Verdana" font-size="30" >0.72</text>
<line x1="692.32" y1="124.14" x2="911.70" y2="454.03" style="stroke-width: 1; stroke: rgb(255, 85, 0); fill: rgb(0, 0, 0); stroke-opacity: 1; fill-opacity: 0;"/>
<polyline points="895.52,446.01 911.7,454.03 910.56,436" style="stroke-width: 1; stroke: rgb(255, 85, 0); fill: rgb(0, 0, 0); stroke-opacity: 1; fill-opacity: 0;"/>
<line x1="692.32" y1="524.01" x2="1156.90" y2="474.03" style="stroke-width: 1; stroke: rgb(255, 85, 0); fill: rgb(0, 0, 0); stroke-opacity: 1; fill-opacity: 0;"/>
<polyline points="1142.31,484.68 1156.9,474.03 1140.37,466.72" style="stroke-width: 1; stroke: rgb(255, 85, 0); fill: rgb(0, 0, 0); stroke-opacity: 1; fill-opacity: 0;"/>
<line x1="692.32" y1="623.98" x2="898.80" y2="663.96" style="stroke-width: 1; stroke: rgb(255, 85, 0); fill: rgb(0, 0, 0); stroke-opacity: 1; fill-opacity: 0;"/>
<polyline points="881.72,669.86 898.8,663.96 885.15,652.12" style="stroke-width: 1; stroke: rgb(255, 85, 0); fill: rgb(0, 0, 0); stroke-opacity: 1; fill-opacity: 0;"/>
<line x1="692.32" y1="1023.85" x2="1156.90" y2="693.95" style="stroke-width: 1; stroke: rgb(255, 85, 0); fill: rgb(0, 0, 0); stroke-opacity: 1; fill-opacity: 0;"/>
<polyline points="1149.37,710.38 1156.9,693.95 1138.91,695.65" style="stroke-width: 1; stroke: rgb(255, 85, 0); fill: rgb(0, 0, 0); stroke-opacity: 1; fill-opacity: 0;"/>
</svg>
</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 the doctor 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>Relation between Bayes's theorem and conditional assessment</h1>

<div style="float: right;">
<svg version="1.1"
     baseProfile="full"
     xmlns="http://www.w3.org/2000/svg"
     xmlns:xlink="http://www.w3.org/1999/xlink"
     xmlns:ev="http://www.w3.org/2001/xml-events"
     width="505.89" height="505.89"
     viewBox="0,0,505.89,505.89"
     font-family="Arial, Helvetica, sans-serif"
>
<desc>R SVG Plot!</desc>
<rect width="100%" height="100%" style="fill:#FFFFFF"/>
<line x1="60.67" y1="247.53" x2="206.91" y2="153.50" stroke-width="1px" stroke="#000000" fill="#000000" stroke-opacity="1.000000" fill-opacity="0.000000"/>
<line x1="60.67" y1="247.53" x2="206.91" y2="341.56" stroke-width="1px" stroke="#000000" fill="#000000" stroke-opacity="1.000000" fill-opacity="0.000000"/>
<line x1="263.78" y1="153.50" x2="385.65" y2="78.27" stroke-width="1px" stroke="#000000" fill="#000000" stroke-opacity="1.000000" fill-opacity="0.000000"/>
<line x1="263.78" y1="153.50" x2="385.65" y2="228.72" stroke-width="1px" stroke="#000000" fill="#000000" stroke-opacity="1.000000" fill-opacity="0.000000"/>
<line x1="263.78" y1="341.56" x2="385.65" y2="266.33" stroke-width="1px" stroke="#000000" fill="#000000" stroke-opacity="1.000000" fill-opacity="0.000000"/>
<line x1="263.78" y1="341.56" x2="385.65" y2="416.79" stroke-width="1px" stroke="#000000" fill="#000000" stroke-opacity="1.000000" fill-opacity="0.000000"/>
<text transform="translate(224.42,164.33) " fill="#000000"  style="font-size:20pt" >m</text>
<text transform="translate(227.08,352.39) " fill="#000000"  style="font-size:20pt" >f</text>
<text transform="translate(407.03,89.10) " fill="#000000"  style="font-size:20pt" >y</text>
<text transform="translate(402.96,239.56) " fill="#000000"  style="font-size:20pt" >n</text>
<text transform="translate(407.03,277.17) " fill="#000000"  style="font-size:20pt" >y</text>
<text transform="translate(402.96,427.62) " fill="#000000"  style="font-size:20pt" >n</text>
</svg>

</div>

<p>compute p(y) from p(y|m), p(y|f), and p(m):</p>

<p>p(y) = p(y|m)&times;p(m) + p(y|f)&times;(1-p(m))</p>

<p>which is the same as p(y&amp;m) + p(y&amp;f).</p>

<p>Now suppose we want to comput p(m|y).  By Bayes,</p>

<p>p(m|y) = p(m&amp;y) / [p(m&amp;y) + p(f&amp;y)]</p>

<p>or p(m|y) = p(m&amp;y) / p(y).</p>

<p>In other words, conditional assessment gives us the denominator of
Bayes's theorem, for this calculation.</p>

</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>

