Lab Work 10: Bayes' Theory For Medical Decision-Making: Prepared By: Toma Z Vrtovec
Lab Work 10: Bayes' Theory For Medical Decision-Making: Prepared By: Toma Z Vrtovec
Instructions
In probability theory and statistics, Bayes’ theorem describes the probability of an event based
on prior knowledge of conditions that might be related to the event:
P (B|A) P (A) P (B | A) P (A)
P (A|B) = = ,
P (B) P (B | A) P (A) + P (B | ¬A) P (¬A)
where:
• A and B are random events or variables (¬A denotes the negation of event A),
• P (A) in P (B) are probabilities that events A and B occur independently of each other,
• P (A|B) is the probability of event A occurring given that event B has occurred,
• P (B|A) is the probability of event B occurring given that event A has occurred.
Bayes’ theorem has an important role in decision-making for medical diagnosis, as it formally
provides a probability of correct diagnosis given prior or conditional probabilities. It is
especially useful for decision-making in the presence of the observed event (e.g. disease) in the
population and the results of the corresponding diagnostic test. Let us therefore suppose that
we are observing a disease that is present for a certain ratio of the population, and that exists
a diagnostic test for this disease with known classification sensitivity and specificity.
where the input argument iPopRatio represents the ratio of the diseased population (in
percents), while iTestSens and iTestSpec are respectively the sensitivity and specificity
of the diagnostic test (in percents). The output argument oProb represents the Bayes’
conditional probability (in percents) or the probability that a randomly chosen person
from the population that tested positive actually has the disease.
Apply the function to the population ratio of 0.5%, and the sensitivity and specificity of
the diagnostic test equal to 99%.
2. Compute and display the course of the Bayes’ conditional probability for a varying
sensitivity of the diagnostic test in the range between 0 and 100% by considering that the
test specificity is always equal to sensitivity.
3. Compute and display the courses of the Bayes’ conditional probability for different ratios
of the diseased population in the range between 0 and 100%, and for a varying sensitivity of
the diagnostic test in the range between 0 and 100% by considering that the test specificity
is always equal to sensitivity.