Solution: Setting the CPD Values of a Bayesian Network
Explore updating conditional probability distributions (CPDs) in Bayesian networks by modifying test result probabilities based on known accuracy rates. Understand how adjusting CPDs manually affects inference in a Bayesian model, enhancing your ability to interpret medical test outcomes or similar scenarios using Python frameworks.
We'll cover the following...
Problem statement
Pieter felt unwell but didn't know why. He saw a doctor who ran tests. A week later, the tests showed Pieter might have a rare disease affecting 0.1% of people. Worried, Pieter asked how accurate the test was. The doctor said it's 99% accurate for those with the disease and 1% inaccurate for those without it.
Pieter wants to take another test to be sure of the result. Based on the definition of the problem, the CPD for the test #2 node has the following values:
CPD for the Test#2
States Test Result node | P(Disease) = Infected | P(Disease) = Non-infected |
P(Test Result) = True | 0.99 | 0.01 |
P(Test Result) = False | 0.01 | 0.99 |