Artificial intelligence • Original RRTutors lesson
Reasoning Under Uncertainty and Bayesian Inference
Use probabilities to update beliefs when evidence is incomplete or noisy.
Concept and explanation
Bayesian reasoning combines prior beliefs with the likelihood of observed evidence to calculate a posterior. A probability is conditional on a model and data assumptions; it is not certainty. Decision-making also depends on the costs of false positives and false negatives, not only on the most likely class.
How to apply it
Write the hypotheses, evidence, prior, likelihood, and decision costs explicitly; check calibration on held-out data.
Worked example
A medical screening score may trigger a follow-up test rather than diagnose a condition, because the threshold depends on prevalence and consequences.
Illustrative Python example
prior = 0.01
sensitivity = 0.95
false_positive_rate = 0.05
positive_rate = sensitivity * prior + false_positive_rate * (1 - prior)
posterior = sensitivity * prior / positive_rate
print(round(posterior, 3))
Expected result
The posterior probability after a positive result is about 0.161 under these illustrative assumptions.
Limitations and cautions
Ignoring base rates can make a highly sensitive test appear more conclusive than it is.
Practice exercise
Change prevalence and calculate how the posterior after a positive test changes.
Key takeaway: Interpret probabilities with their assumptions, base rates, calibration, and decision context.