Bayes Theorem (Class Notes)

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 11

Bayes Theorem BDS

2024
(Class Notes)
Bayesian Probability

“Probability”: often used to refer to frequency


… but
Bayesian Probability: a measure of a state of
knowledge.

It quantifies uncertainty. Allows us to reason using


uncertain statements.

A Bayesian model is continually updated as more data is


acquired.
How did this come about?

Billiard Table:

A white billiard ball is rolled along a line and we look at where it


stops.
We suppose that it has a uniform probability of falling anywhere
on the line. It stops at a point p.

A red billiard ball is then rolled n times under the same uniform
assumption.

How many times does the red ball roll further than the white ball?
Bayes' Theorem

Bayes' Theorem shows the relationship between a


conditional probability and its inverse.

i.e. it allows us to make an inference from


the probability of a hypothesis given the evidence to
the probability of that evidence given the hypothesis
and vice versa
Bayes' Theorem

P(A|B) = P(B|A) P(A)


P(B)

P(A) – the PRIOR PROBABILITY – represents


your knowledge about A before you have
gathered data.
e.g. if 0.01 of a population has schizophrenia then
the probability that a person drawn at random
would have schizophrenia is 0.01
Bayes' Theorem

P(A|B) = P(B|A) P(A)


P(B)

P(B|A) – the CONDITIONAL PROBABILITY – the


probability of B, given A.
e.g. you are trying to roll a total of 8 on two dice.
What is the probability that you achieve this, given
that the first die rolled a 6?
Bayes' Theorem

P(A|B) = P(B|A) P(A)


P(B)

So the theorem says:


The probability of A given B is equal to the
probability of B given A, times the prior probability
of A, divided by the prior probability of B.
A Simple Example

Mode of transport: Probability he is late:


Car 50%
Bus 20%
Train 1%

Suppose that Aaryaveer is late one day.


Jamina mam wishes to estimate the probability that he
traveled to work that day by car.

He does not know which mode of transportation Bob usually


uses, so he gives a prior probability of 1 in 3 to each of the
three possibilities.
A Simple Example

P(A|B) = P(B|A) P(A) / P(B)


P(car|late) = P(late|car) x P(car) / P(late)

P(late|car) = 0.5 (he will be late half the time he drives)


P(car) = 0.33 (this is the boss' assumption)
P(late) = 0.5 x 0.33 + 0.2 x 0.33 + 0.01 x 0.33
(all the probabilities that he will be late added together)

P(car|late) = 0.5 x 0.33 / 0.5 x 0.33 + 0.2 x 0.33 + 0.01 x 0.33


= 0.165 / 0.71 x 0.33
= 0.7042
More complex example
Disease present in 0.5% population (i.e. 0.005)
Blood test is 99% accurate (i.e. 0.99)
False positive 5% (i.e. 0.05)
- If someone tests positive, what is the probability that they
have the disease?

P(A|B) = P(B|A) P(A) / P(B)


P(disease|pos) = P(pos|disease) x P(disease) / P(pos)
= 0.99 x 0.005 / (0.99x0.005)+(0.05x0.995)
= 0.00495 / 0.00495 + 0.04975
= 0.00495 / 0.0547
= 0.0905
What does this mean?

If someone tests positive for the disease, they


have a 0.0905 chance of having the disease.

i.e. there is just a 9% chance that they have it.

Even though the test is very accurate, because


the condition is so rare the test may not be useful.

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