Bayes
Bayes
Bayes
Bayes’ theorem is a fundamental concept in probability and statistics that provides a way to update the
probability of a hypothesis as more evidence or information becomes available. Its formula is expressed
as:
P (B ∣ A) × P( A )
P(A∣B) =
P( B)
Where:
P(A|B) : Posterior probability- the revised probability of event A occurring after observing
event B.
P(A) : Prior Probability- our initial belief in A, prior to the new evidence B.
P(B|A) : Likelihood- the odds of witnessing the evidence B, assuming A is valid.
(P(B) : Marginal likelihood or evidence: the overall probability of seeing evidence B.
Bayes’ theorem has a wide range of applications across various fields. For instance, it’s used in
Bayesian inference to update the probability estimate for a hypothesis as additional evidence is learned. In
healthcare, it can help in calculating the likelihood of a patient having a certain disease based on their
symptoms and known data about the disease’s prevalence.
Bayesian Inference is about harnessing the prior and likelihood to discern the posterior. It’s essentially
about refreshing our beliefs (priors) with new data (likelihood).
1. Prior P(A): represents our pre-existing knowledge or belief about an event before new data.
2. Likelihood P(B|A): Depicts how well our data matches our predictions.
3. Posterior P(A|B): Our updated belief after integrating the new evidence. It evolves from the prior
and the likelihood.
Imagine a rare disease affecting 2% of a population and a test that’s 98% accurate. If you test
positive, what’s the likelihood you truly have the disease?
Given:
Prior P(Disease) = 0.02 (initial belief about the prevalence of the disease).
Likelihood P(Positive|Disease) = 0.98 (chances of testing positive if you indeed have the disease).
0.98 ×0.02
P(Disease|Positive) = 0.0392 = 0.5
Even with a positive result from a 99% accurate test, there’s only a 50% chance of genuinely having the
disease.
Example 2. You draw a card from a deck and are told it’s red. What’s the likelihood it’s a diamond?
Given:
1× 1/4 1
From Bayes’ theorem, the posterior: P(Diamond|Red) =
1/2
= 2
Example 3.
We will use Rain to mean rain during the day, and Cloud to mean cloudy morning.
Bayes’ theorem offers a systematic approach to updating our beliefs based on new information.
The fundamental concepts of prior probability, likelihood, and posterior probability play a crucial role
in Bayesian reasoning, impacting decision-making across fields such as finance, machine learning, and
scientific investigations.