new file: Files/flashplayer_32_sa.exe new file: favicon.ico new file: globe.gif new file: imgs/download.png new file: imgs/zuck.jpg new file: index.html new file: other.ico new file: script.js new file: site.webmanifest new file: sitemap.html new file: styles/backround.css new file: styles/border.css new file: styles/fonts/Titillium_Web/OFL.txt new file: styles/fonts/Titillium_Web/TitilliumWeb-Black.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-Bold.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-BoldItalic.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-ExtraLight.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-ExtraLightItalic.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-Italic.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-Light.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-LightItalic.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-Regular.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-SemiBold.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-SemiBoldItalic.ttf new file: styles/fonts/webfontkit-20221027-163353/generator_config.txt new file: styles/fonts/webfontkit-20221027-163353/specimen_files/grid_12-825-55-15.css new file: styles/fonts/webfontkit-20221027-163353/specimen_files/specimen_stylesheet.css new file: styles/fonts/webfontkit-20221027-163353/stylesheet.css new file: styles/fonts/webfontkit-20221027-163353/titilliumweb-extralight-demo.html new file: styles/fonts/webfontkit-20221027-163353/titilliumweb-extralight-webfont.woff new file: styles/fonts/webfontkit-20221027-163353/titilliumweb-extralight-webfont.woff2 new file: styles/fonts/webfontkit-20221027-165950/generator_config.txt new file: styles/fonts/webfontkit-20221027-165950/specimen_files/grid_12-825-55-15.css new file: styles/fonts/webfontkit-20221027-165950/specimen_files/specimen_stylesheet.css new file: styles/fonts/webfontkit-20221027-165950/stylesheet.css new file: styles/fonts/webfontkit-20221027-165950/titilliumweb-bold-demo.html new file: styles/fonts/webfontkit-20221027-165950/titilliumweb-bold-webfont.woff new file: styles/fonts/webfontkit-20221027-165950/titilliumweb-bold-webfont.woff2 new file: styles/style.css new file: tools/2048/.gitignore new file: tools/2048/.jshintrc new file: tools/2048/CONTRIBUTING.md new file: tools/2048/LICENSE.txt new file: tools/2048/README.md new file: tools/2048/Rakefile new file: tools/2048/favicon.ico new file: tools/2048/index.html new file: tools/2048/js/animframe_polyfill.js new file: tools/2048/js/application.js new file: tools/2048/js/bind_polyfill.js new file: tools/2048/js/classlist_polyfill.js new file: tools/2048/js/game_manager.js new file: tools/2048/js/grid.js new file: tools/2048/js/html_actuator.js new file: tools/2048/js/keyboard_input_manager.js new file: tools/2048/js/local_storage_manager.js new file: tools/2048/js/tile.js new file: tools/2048/meta/apple-touch-icon.png new file: tools/webretro/cores/neocd_libretro.js new file: tools/webretro/cores/neocd_libretro.wasm new file: tools/webretro/cores/nestopia_libretro.js new file: tools/webretro/cores/nestopia_libretro.wasm new file: tools/webretro/cores/o2em_libretro.js new file: tools/webretro/cores/o2em_libretro.wasm new file: tools/webretro/cores/opera_libretro.js new file: tools/webretro/cores/opera_libretro.wasm
257 lines
13 KiB
HTML
257 lines
13 KiB
HTML
<!doctype html>
|
|
<html lang="en"><!-- #BeginTemplate "/Templates/Advanced.dwt" --><!-- DW6 -->
|
|
|
|
<!-- Mirrored from www.mathsisfun.com/data/probability-false-negatives-positives.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 29 Oct 2022 00:42:17 GMT -->
|
|
<head>
|
|
<!-- #BeginEditable "doctitle" -->
|
|
<title>False Positives and False Negatives</title>
|
|
<meta name="description" content="Math explained in easy language, plus puzzles, games, quizzes, worksheets and a forum. For K-12 kids, teachers and parents." />
|
|
<!-- #EndEditable -->
|
|
<meta name="keywords" content="math, maths, mathematics, school, homework, education" />
|
|
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
|
<meta name="viewport" content="width=device-width; initial-scale=1.0; user-scalable=true;" />
|
|
<meta name="HandheldFriendly" content="true"/>
|
|
<meta http-equiv="pics-label" content='(PICS-1.1 "http://www.classify.org/safesurf/" L gen true for "http://www.mathsisfun.com" r (SS~~000 1))' />
|
|
<link rel="stylesheet" type="text/css" href="../style3.css" />
|
|
<script src="../main3.js" type="text/javascript"></script>
|
|
</head>
|
|
|
|
<body id="bodybg" class="adv">
|
|
<div class="bg">
|
|
<div id="stt"></div>
|
|
<div id="hdr"></div>
|
|
<div id="logo"><a href="../index.html"><img src="../images/style/logo.svg" alt="Math is Fun" /></a></div>
|
|
<div id="advText">Advanced</div>
|
|
<div id="gtran"><script type="text/javascript">document.write(getTrans());</script></div>
|
|
<div id="gplus"><script type="text/javascript">document.write(getGPlus());</script></div>
|
|
<div id="adTopOuter" class="centerfull noprint">
|
|
<div id="adTop">
|
|
<script type="text/javascript">document.write(getAdTop());</script>
|
|
</div>
|
|
</div>
|
|
<div id="adHide">
|
|
<div id="showAds1"><a href="javascript:showAds()">Show Ads</a></div>
|
|
<div id="hideAds1"><a href="javascript:hideAds()">Hide Ads</a><br>
|
|
<a href="../about-ads.html">About Ads</a></div>
|
|
</div>
|
|
<div id="menuWide" class="menu">
|
|
<script type="text/javascript">document.write(getMenu(0));</script>
|
|
</div>
|
|
<div id="linkto">
|
|
<div id="linktort"><script type="text/javascript">document.write(getLinks());</script></div>
|
|
</div>
|
|
<div id="search" role="search"><script type="text/javascript">document.write(getSearch());</script></div>
|
|
<div id="menuSlim" class="menu">
|
|
<script type="text/javascript">document.write(getMenu(1));</script>
|
|
</div>
|
|
<div id="menuTiny" class="menu">
|
|
<script type="text/javascript">document.write(getMenu(2));</script>
|
|
</div>
|
|
<div id="extra"></div>
|
|
</div>
|
|
<div id="content" role="main"><!-- #BeginEditable "Body" -->
|
|
<h1 class="center">False Positives and False Negatives</h1>
|
|
<h2>Test Says "Yes" ... or does it?</h2>
|
|
<p>When you have a test that can say "Yes" or "No" (such as a medical test), you have to think:</p>
|
|
<ul>
|
|
<li>It could be <b>wrong</b> when it says "Yes". </li>
|
|
<li>It could be <b>wrong</b> when it says "No". </li>
|
|
</ul>
|
|
<h3>Wrong?</h3>
|
|
<p style="float:left; margin: 0 10px 5px 0;"><img src="images/false-positive.gif" width="231" height="176" alt="mother dog thinks wrong pup stole the bone" /></p>
|
|
<p>It is like being told you <b>did</b> something when you <b>didn't</b>! </p>
|
|
<p>Or you didn't do it when you really did.</p>
|
|
<div style="clear:both"></div><p>They each have a special name: <b>"False Positive"</b> and <b>"False Negative"</b>:</p>
|
|
<table border="0" align="center" cellpadding="5">
|
|
<tr>
|
|
<td width="120"> </td>
|
|
<td width="180" align="center">They say you <b>did</b></td>
|
|
<td width="180" align="center">They say you <b>didn't</b></td>
|
|
</tr>
|
|
<tr>
|
|
<td>You really did </td>
|
|
<td align="center" bgcolor="#FFCCFF"><i>They are right!</i></td>
|
|
<td align="center" bgcolor="#FFCCFF"><b>"False Negative"</b></td>
|
|
</tr>
|
|
<tr>
|
|
<td>You really didn't</td>
|
|
<td align="center" bgcolor="#FFCCFF"><b>"False Positive"</b></td>
|
|
<td align="center" bgcolor="#FFCCFF"><i>They are right!</i></td>
|
|
</tr>
|
|
</table>
|
|
<p>Here are some examples of "false positives" and "false negatives":</p>
|
|
<ul>
|
|
<div class="bigul">
|
|
<li><b>Airport Security</b>: a "false positive" is when ordinary items such as keys or coins get mistaken for weapons (machine goes "beep")</li>
|
|
<li><b>Quality Control</b>: a "false positive" is when a good quality item gets rejected, and a "false negative" is when a poor quality item gets accepted. (A "positive" result means there IS a defect.)</li>
|
|
<li><b>Antivirus software</b>: a "false positive" is when a normal file is thought to be a virus</li>
|
|
<li><b>Medical screening</b>: low-cost tests given to a large group can give many false positives (saying you have a disease when you don't), and then ask you to get more accurate tests.</li>
|
|
</div>
|
|
</ul>
|
|
<p>But many people don't understand the true numbers behind "Yes" or "No", like in this example:</p>
|
|
<p style="float:right; margin: 0 0 5px 10px;"><img src="images/cat.jpg" width="100" height="151" alt="cat" /></p>
|
|
<h2>Example: Allergy or Not?</h2>
|
|
<p>Hunter says she is itchy. There is a test for Allergy to Cats, but this test is not always right:</p>
|
|
<ul>
|
|
<li>For people that <b>really do</b> have the allergy, the test says "Yes" <b>80%</b> of the time </li>
|
|
<li>For people that <b>do not</b> have the allergy, the test says "Yes" <b>10%</b> of the time ("false positive")</li>
|
|
</ul>
|
|
|
|
<p>Here it is in a table:</p>
|
|
<table border="0" align="center">
|
|
<tr>
|
|
<td width="120"> </td>
|
|
<td width="180" align="center">Test says "Yes"<b></b></td>
|
|
<td width="180" align="center">Test says "No"<b></b></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Have allergy</td>
|
|
<td align="center" bgcolor="#FFCCFF"><b>80%</b></td>
|
|
<td align="center" bgcolor="#FFCCFF"><b>20% "False Negative"</b></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Don't have it</td>
|
|
<td align="center" bgcolor="#FFCCFF"><b>10% "False Positive"</b></td>
|
|
<td align="center" bgcolor="#FFCCFF"><b>90%</b></td>
|
|
</tr>
|
|
</table>
|
|
<p> </p>
|
|
<p class="larger">Question: If 1% of the population have the allergy, and <b>Hunter's test says "Yes"</b>,
|
|
what are the chances that Hunter really has the allergy?</p>
|
|
<p>Do you think 75%? Or maybe 50%?</p>
|
|
<div class="center80">
|
|
<p class="center larger">A similar test was given to Doctors and most guessed around 75% ...<br />
|
|
...
|
|
but they were very wrong! </p>
|
|
<p>(Source: "Probabilistic reasoning in clinical medicine: Problems and opportunities" by David M. Eddy 1982, which this example is based on)</p>
|
|
</div>
|
|
<p>There are three different ways to solve this: </p>
|
|
<ul>
|
|
<li>"Imagine a 1000", </li>
|
|
<li>"Tree Diagrams" or </li>
|
|
<li>"Bayes' Theorem", </li>
|
|
</ul>
|
|
<p>use any you prefer. Let's look at them now:</p>
|
|
<p> </p>
|
|
<h3>Try Imagining A Thousand People</h3>
|
|
<p>When trying to understand questions like this, just imagine a large group (say 1000) and play with the numbers:</p>
|
|
<ul>
|
|
<div class="bigul">
|
|
<li>Of 1000 people, only <b>10</b> really have the allergy (1% of 1000 is 10)</li>
|
|
<li>The test is 80% right for people who <b>have</b> the allergy, so it will get <b>8 of those 10 right</b>.</li>
|
|
<li>But 990 <b>do not</b> have the allergy, and the test will say "Yes" to 10% of them,<br />
|
|
which is <b>99 people</b> it says "Yes" to <b>wrongly</b> (false positive)</li>
|
|
<li>So out of 1000 people the test says "<b>Yes</b>" to (8+99) = <b>107 people</b></li>
|
|
|
|
</div>
|
|
</ul>
|
|
<p>As a table:</p>
|
|
<table border="0" align="center">
|
|
<tr>
|
|
<td width="120"> </td>
|
|
<td width="100" align="center">1% have it</td>
|
|
<td width="180" align="center">Test says "Yes"<b></b></td>
|
|
<td width="180" align="center">Test says "No"<b></b></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Have allergy</td>
|
|
<td align="center" bgcolor="#FFCCFF">10</td>
|
|
<td align="center" bgcolor="#FFCCFF"><b>8</b></td>
|
|
<td align="center" bgcolor="#FFCCFF"><b>2</b></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Don't have it</td>
|
|
<td align="center" bgcolor="#FFCCFF">990</td>
|
|
<td align="center" bgcolor="#FFCCFF"><b>99</b></td>
|
|
<td align="center" bgcolor="#FFCCFF"><b>891</b></td>
|
|
</tr>
|
|
<tr>
|
|
<td> </td>
|
|
<td align="center" bgcolor="#FFCCFF">1000</td>
|
|
<td align="center" bgcolor="#FFCCFF">107</td>
|
|
<td align="center" bgcolor="#FFCCFF">893</td>
|
|
</tr>
|
|
</table>
|
|
<p>So 107 people get a "Yes" but only 8 of those really have the allergy:</p>
|
|
<p class="center large"> 8 / 107 = about 7%</p>
|
|
<p>So, even though Hunter's test said "Yes", it is still only <b>7% likely</b> that Hunter has a Cat Allergy. </p>
|
|
<p>Why so small? Well, the allergy is so rare that those who actually have it are greatly <b>outnumbered</b> by those with a false positive. </p>
|
|
<p> </p>
|
|
<h3>As A Tree</h3>
|
|
<p>Drawing a <a href="probability-tree-diagrams.html">tree diagram</a> can really help:</p>
|
|
<p class="center"><img src="images/tree-diagram-test-results.svg" alt="tree diagram test results" style="max-width:100%" /></p>
|
|
<p>First of all, let's check that all the percentages add up:</p>
|
|
<p class="center">0.8% + 0.2% + 9.9% + 89.1% = <b>100%</b> (good!)</p>
|
|
<p>And the two "Yes" answers add up to 0.8% + 9.9% = <b>10.7%</b>, but only 0.8% are correct. </p>
|
|
<p class="center">0.8/10.7 = <b>7%</b> (same answer as above)</p>
|
|
<p class="center"> </p>
|
|
<h3>Bayes' Theorem</h3>
|
|
<p><a href="bayes-theorem.html">Bayes' Theorem</a> has a special formula for this kind of thing:</p>
|
|
<p class="center larger">P(A|B) = <span class="intbl"><em>P(A)P(B|A)</em><strong> P(A)P(B|A) + P(not A)P(B|not A)</strong></span></p>
|
|
<p>where:</p>
|
|
<ul>
|
|
<li>P means "Probability of"</li>
|
|
<li>| means "given that"</li>
|
|
<li>A in this case is "actually has the allergy"</li>
|
|
<li>B in this case is "test says Yes"</li>
|
|
</ul>
|
|
<p>So:</p>
|
|
<p> <b>P(A|B)</b> means "The probability that Hunter actually has the allergy given that the test says Yes"</p>
|
|
<p> <b>P(B|A)</b> means "The probability that the test says Yes given that Hunter actually has the allergy"</p>
|
|
<p></p>
|
|
<p>To be clearer, let's change A to <b>has</b> (actually has allergy) and B to <b>Yes</b> (test says yes):</p>
|
|
<p class="center larger">P(has|Yes) = <span class="intbl"><em>P(has)P(Yes|has)</em><strong> P(has)P(Yes|has) + P(not has)P(Yes|not has)</strong></span></p>
|
|
<p>And put in the numbers:</p>
|
|
<p class="center larger">P(has|yes) = <span class="intbl"><em>0.01×0.8</em><strong> 0.01×0.8 + 0.99×0.1</strong></span><br>
|
|
= 0.0748...</p>
|
|
<p></p>
|
|
<p>Which is about <b>7%</b></p>
|
|
<p>Learn more about this at <a href="bayes-theorem.html">Bayes' Theorem</a>.</p>
|
|
<h2>One Last Example</h2>
|
|
|
|
<div class="example">
|
|
<h3>Extreme Example: Computer Virus</h3>
|
|
<p style="float:left; margin: 0 10px 5px 0;"><img src="images/net-world.jpg" width="300" height="144" alt="internet world" /></p>
|
|
<p>A computer virus spreads around the world, all reporting to a master computer. </p>
|
|
<p>The good guys capture the master computer and find that a million computers have been infected (but don't know which ones).</p>
|
|
<p>Governments decide to take action! </p>
|
|
<p>No one can use the internet until their computer passes the "virus-free" test. The test is 99% accurate (pretty good, right?) But 1% of the time it says you have the virus when you don't (a "false positive").</p>
|
|
<p>Now let's say there are <b>1000 million</b> internet users.</p>
|
|
<ul>
|
|
<li>Of 1 million <b>with</b> the virus 99% of them get correctly banned = about <b>1 million</b></li>
|
|
<li>But false positives are 999 million x 1% = about <b>10 million</b></li>
|
|
</ul>
|
|
<p> So a total of <b>11 million</b> get banned, but only 1 out of those 11 actually have the virus.</p>
|
|
<p><b>So if you get banned there is only a 9% chance you actually have the virus!</b> </p>
|
|
</div>
|
|
<h2>Conclusion</h2>
|
|
<p>When dealing with false positives and false negatives (or other tricky probability questions) we can use these methods:</p>
|
|
<ul>
|
|
<li>Imagine you have 1000 (of whatever),</li>
|
|
<li>Make a tree diagram, or</li>
|
|
<li>Use Bayes' Theorem</li>
|
|
</ul>
|
|
<p> </p>
|
|
<div class="questions">
|
|
<script type="text/javascript">getQ(3109, 3110, 3111, 3112, 3113, 3114, 3837, 3838, 3839, 3840);</script>
|
|
</div>
|
|
|
|
<div class="related"><a href="bayes-theorem.html">Bayes' Theorem</a> <a href="probability-tree-diagrams.html">Tree Diagrams</a> <a href="index.html">Data Index</a>
|
|
</div>
|
|
<!-- #EndEditable --></div>
|
|
<div id="adend" class="centerfull noprint">
|
|
<script type="text/javascript">document.write(getAdEnd());</script>
|
|
</div>
|
|
<div id="footer" class="centerfull noprint">
|
|
<script type="text/javascript">document.write(getFooter());</script>
|
|
</div>
|
|
<div id="copyrt">
|
|
Copyright © 2017 MathsIsFun.com
|
|
</div>
|
|
|
|
<script type="text/javascript">document.write(getBodyEnd());</script>
|
|
</body>
|
|
<!-- #EndTemplate -->
|
|
<!-- Mirrored from www.mathsisfun.com/data/probability-false-negatives-positives.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 29 Oct 2022 00:42:18 GMT -->
|
|
</html>
|