Bayes

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

BAYES’ THEOREM SERIES

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) is the probability of event A occurring given that B is true.


 P(B|A) is the probability of event B occurring given that A is true.
 P(A) is the probability of event A occurring on its own.
 P(B) is the probability of event B occurring on its own.

 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).

Three Pillars of Bayesian Inference:

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.

Example 1. Medical Testing.

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).

Marginal Likelihood P(Positive) = [P(Disease)×P(Positive|Disease)]+[P(No Disease)×P(Positive|No


Disease)]

Then, marginal likelihood is [(0.02×0.98)]+[0.98×0.02] = 0.0392

Using Bayes’ Theorem, the posterior:

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:

– Prior P(Diamond) = 1/4 (Chance of drawing a diamond).


– Likelihood 0(Red|Diamond) = 1 (All diamonds are red).
– Marginal likelihood P(Red) = 1/2 (Half the cards are red).

1× 1/4 1
From Bayes’ theorem, the posterior: P(Diamond|Red) =
1/2
= 2

If the card is red, there’s a 50% probability it’s a diamond.

Example 3.

You are planning a picnic today, but the morning is cloudy.

 50% of all rainy days start off cloudy!


 But cloudy mornings are common (about 40% of days start cloudy)
 And this is usually a dry month (only 3 of 30 days tend to be rainy, or 10%)

What is the chance of rain during the day?

We will use Rain to mean rain during the day, and Cloud to mean cloudy morning.

The chance of Rain given Cloud is written P(Rain|Cloud)

So let's put that in the formula:

P(Rain|Cloud) = P(Rain) P(Cloud|Rain)


P(Cloud)
 P(Rain) is Probability of Rain = 10%
 P(Cloud|Rain) is Probability of Cloud, given that Rain happens = 50%
 P(Cloud) is Probability of Cloud = 40%

P(Rain|Cloud) = 0.1 x 0.5 = .125


0.4
Or can be expressed as 12.5% chance of rain. Not too bad, you can now enjoy your picnic!

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.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy