Bayes Theorem: Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>Robert Badgett
mNo edit summary
 
(12 intermediate revisions by 6 users not shown)
Line 1: Line 1:
'''Bayes Theorem''' is defined as "a theorem in probability theory named for Thomas Bayes (1702-1761). In epidemiology, it is used to obtain the probability of disease in a group of people with some characteristic on the basis of the overall rate of that disease and of the likelihoods of that characteristic in healthy and diseased individuals. The most familiar application is in clinical decision analysis where it is used for estimating the probability of a particular diagnosis given the appearance of some symptoms or test result".<ref name="MeSH">{{cite web |url=http://www.nlm.nih.gov/cgi/mesh/2008/MB_cgi?mode= |title=Bayes Theorem |accessdate=2007-12-09 |author=National Library of Medicine |authorlink= |coauthors= |date= |format= |work= |publisher= |pages= |language= |archiveurl= |archivedate= |quote=}}</ref>
{{subpages}}
'''Bayes' Theorem''' is a theorem in [[probability theory]] named for [[Thomas Bayes]] (1702&ndash;1761).


==Calculations==
It is used for updating probabilities by finding [[conditional probability|conditional probabilities]] given new data.  This simplest case involves a situation in which probabilities have been assigned to each of several mutually exclusive alternatives ''H''<sub>1</sub>,&nbsp;...,&nbsp;''H''<sub>''n''</sub>, at least one of which may be true.  New data ''D'' is observed.  The conditional probability of ''D'' given each of the alternative hypotheses ''H''<sub>1</sub>,&nbsp;...,&nbsp;''H''<sub>''n''</sub> is known.  What is needed is the conditional probability of each hypothesis ''H''<sub>''i''</sub> given ''D''.  Bayes' Theorem says
 
: <math> P(H_i\mid D) = \frac{P(H_i)P(D\mid H_i)}{P(H_1)P(D\mid H_1)+\cdots+P(H_n)P(D\mid H_n)}. </math>
 
The use of Bayes' Theorem is sometimes described as follows.  Start with the vector of "prior probabilities", i.e. the probabilities of the several hypotheses ''before'' the new data is observed:
 
: <math> P(H_1),\dots,P(H_n).\, </math>
 
Multiply these term-by-term by the "likelihood vector":
 
: <math> P(D\mid H_1),\dots,P(D\mid H_n),\, </math>
 
getting
 
: <math> P(H_1)P(D\mid H_1),\dots,P(H_n)P(D\mid H_n).\, </math>
 
The sum of these numbers is not (usually) 1.  Multiply all of them by the "normalizing constant"
 
: <math> c = \frac{1}{P(H_1)P(D\mid H_1)+\cdots+P(H_n)P(D\mid H_n)},\, </math>
 
getting
 
: <math> cP(H_1)P(D\mid H_1),\dots,cP(H_n)P(D\mid H_n).\, </math>
 
The result is the "posterior probabilities", i.e. conditional probabilities given the new data:
 
: <math> P(H_1\mid D),\dots,P(H_n\mid D).\, </math>
 
In [[epidemiology]], Bayes' Theorem is used to obtain the probability of disease in a group of people with some characteristic on the basis of the overall rate of that disease and of the probabilities of that characteristic in healthy and diseased individuals.  In clinical decision analysis it is used for estimating the probability of a particular diagnosis given the base rate, and the appearance of some symptoms or test result.<ref name="MeSH">{{cite web |url=http://www.nlm.nih.gov/cgi/mesh/2008/MB_cgi?mode= |title=Bayes Theorem |accessdate=2007-12-09 |author=National Library of Medicine |authorlink= |coauthors= |date= |format= |work= |publisher= |pages= |language= |archiveurl= |archivedate= |quote=}}</ref>
 
==Bayes' Rule==
 
Bayes theorem can be cast in the following memorable forms:
 
:<i>posterior odds equals prior odds times likelihood ratio</i>, or
 
:<i>posterior odds equals prior odds times Bayes factor</i>.
 
Consider any two hypotheses, not necessarily exhaustive or mutually exclusive, <math>H</math> and <math> K </math>.


{| class="wikitable" align="center"
Suppose that initially we assign these hypotheses probabilities <math>P(H)</math> and <math>P(K)</math> and then observe data <math>D</math>.
|+ Two-by-two table for a diagnostic test
!colspan="2" rowspan="2"| || colspan="2"| Disease||
|-
| Present || Absent||
|-
| rowspan="3"|'''Test result''' || Positive || Cell A|| Cell B||Total with a positive test
|-
| Negative|| Cell C|| Cell D||Total with a negative test
|-
|  || Total with disease|| Total without disease||
|}


===Sensitivity and specificity===
The "prior odds" on the hypotheses <math>H</math> and <math> K </math> is the ratio <math>P(H)/P(K)</math>.  
The sensitivity and specificity of diagnostic tests are defined as "measures for assessing the results of diagnostic and screening tests. Sensitivity represents the proportion of truly diseased persons in a screened population who are identified as being diseased by the test. It is a measure of the probability of correctly diagnosing a condition. Specificity is the proportion of truly nondiseased persons who are so identified by the screening test. It is a measure of the probability of correctly identifying a nondiseased person. (From Last, Dictionary of Epidemiology, 2d ed)."<ref name="MeSH_SnSp">{{cite web |url=http://www.nlm.nih.gov/cgi/mesh/2007/MB_cgi?term=Sensitivity+and+Specificity |title=Sensitivity and specificity |accessdate=2007-12-09 |author=National Library of Mediicne |authorlink= |coauthors= |date= |format= |work= |publisher= |pages= |language= |archiveurl= |archivedate= |quote=}}</ref>
<!-- http://www.memory-alpha.org/en/wiki/Help:Math_markup -->


:<math>\mbox{Sensitivity of a test} =\left (\frac{\mbox{Total with a positive test}}{\mbox{Total }without\mbox{ disease}}\right ) = \left (\frac{\mbox{Cell A}}{\mbox{Cell A} + \mbox{Cell C}}\right )</math>
The "likelihood ratio" or "Bayes factor" for these two hypotheses, given the data <math>D</math>, is the ratio of the probabilities of the data under the two hypotheses, <math>P(D|H)/P(D|K)</math>.


:<math>\mbox{Specificity of a test}=\left (\frac{\mbox{Total with a negative test}}{\mbox{Total }without\mbox{ disease}}\right ) = \left (\frac{\mbox{Cell D}}{\mbox{Cell B} + \mbox{Cell D}}\right )</math>
The "posterior odds" on the two hypotheses is the ratio of their probabilities given the data, <math>P(H|D)/P(K|D)</math>.


===Predictive value of tests===
And indeed, provided no divisions by zero are involved,  
The predictive values of diagnostic tests are defined as "in screening and diagnostic tests, the probability that a person with a positive test is a true positive (i.e., has the disease), is referred to as the predictive value of a positive test; whereas, the predictive value of a negative test is the probability that the person with a negative test does not have the disease. Predictive value is related to the sensitivity and specificity of the test."<ref name="MeSH_PV">{{cite web |url=http://www.nlm.nih.gov/cgi/mesh/2007/MB_cgi?term=Predictive+value+of+tests |title=Predictive value of tests |accessdate=2007-12-09 |author=National Library of Mediicne |authorlink= |coauthors= |date= |format= |work= |publisher= |pages= |language= |archiveurl= |archivedate= |quote=}}</ref>
<!-- http://www.memory-alpha.org/en/wiki/Help:Math_markup -->


:<math>\mbox{Positive predictive value}=\left (\frac{\mbox{Total }with\mbox{ disease and a positive test}}{\mbox{Total with a positive test}}\right ) = \left (\frac{\mbox{Cell A}}{\mbox{Cell A} + \mbox{Cell B}}\right )</math>
<math> \frac{P(H|D)}{P(K|D)} =   \frac{P(H)}{P(K)} \cdot \frac{P(D|H)}{P(D|K)} </math>


:<math>\mbox{Negative predictive value}=\left (\frac{\mbox{Total }without\mbox{ disease and a negative test}}{\mbox{Total with a negative test}}\right ) = \left (\frac{\mbox{Cell D}}{\mbox{Cell C} + \mbox{Cell D}}\right )</math>
 
==Calculations==
{{main|Sensitivity and specificity}}


==References==
==References==
<references/>
<references/>[[Category:Suggestion Bot Tag]]
 
[[Category:CZ Live]] [[Category:Health Sciences Workgroup]]

Latest revision as of 11:00, 17 July 2024

This article is developing and not approved.
Main Article
Discussion
Related Articles  [?]
Bibliography  [?]
External Links  [?]
Citable Version  [?]
 
This editable Main Article is under development and subject to a disclaimer.

Bayes' Theorem is a theorem in probability theory named for Thomas Bayes (1702–1761).

It is used for updating probabilities by finding conditional probabilities given new data. This simplest case involves a situation in which probabilities have been assigned to each of several mutually exclusive alternatives H1, ..., Hn, at least one of which may be true. New data D is observed. The conditional probability of D given each of the alternative hypotheses H1, ..., Hn is known. What is needed is the conditional probability of each hypothesis Hi given D. Bayes' Theorem says

The use of Bayes' Theorem is sometimes described as follows. Start with the vector of "prior probabilities", i.e. the probabilities of the several hypotheses before the new data is observed:

Multiply these term-by-term by the "likelihood vector":

getting

The sum of these numbers is not (usually) 1. Multiply all of them by the "normalizing constant"

getting

The result is the "posterior probabilities", i.e. conditional probabilities given the new data:

In epidemiology, Bayes' Theorem is used to obtain the probability of disease in a group of people with some characteristic on the basis of the overall rate of that disease and of the probabilities of that characteristic in healthy and diseased individuals. In clinical decision analysis it is used for estimating the probability of a particular diagnosis given the base rate, and the appearance of some symptoms or test result.[1]

Bayes' Rule

Bayes theorem can be cast in the following memorable forms:

posterior odds equals prior odds times likelihood ratio, or
posterior odds equals prior odds times Bayes factor.

Consider any two hypotheses, not necessarily exhaustive or mutually exclusive, and .

Suppose that initially we assign these hypotheses probabilities and and then observe data .

The "prior odds" on the hypotheses and is the ratio .

The "likelihood ratio" or "Bayes factor" for these two hypotheses, given the data , is the ratio of the probabilities of the data under the two hypotheses, .

The "posterior odds" on the two hypotheses is the ratio of their probabilities given the data, .

And indeed, provided no divisions by zero are involved,


Calculations

For more information, see: Sensitivity and specificity.


References

  1. National Library of Medicine. Bayes Theorem. Retrieved on 2007-12-09.