HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
Bayes (1).pptx
1. (Fergusson College, Pune)
Bayes' Theorem to Investigate
Food Allergies
Presented by
Anjor Patil Roll no. 226532
Harshit Singh Roll no. 226511
2. Introduction to Bayes Theorem and its
Applications in History
Bayes theorem is a theorem in probability and statistics, named after the
Reverend Thomas Bayes, that helps in determining the probability of an event
that is based on some event that has already occurred. Bayes theorem has
many applications such as Bayesian inference, in the healthcare sector - to
determine the chances of developing health problems with an increase in age
and many others.
Insurance actuaries used it to set rates; Alan Turing used it to decode the
German Enigma cipher and arguably save the Allies from losing the Second
World War; the U.S. Navy used it to search for a missing H-bomb and to locate
Soviet subs; RAND Corporation used it to assess the likelihood of a nuclear
accident
3. Conditional Probability
Conditional probability is known as the possibility of an event or outcome happening,
based on the existence of a previous event or outcome. It is calculated by multiplying the
probability of the preceding event by the renewed probability of the succeeding, or
conditional, event.
The probability of occurrence of any event A when
another event B in relation to A has already occurred
is known as conditional probability. It is depicted by
P(A|B).
4. Bayes Theorem or Rule
Bayes theorem, in simple words, determines the conditional probability of an event A
given that event B has already occurred. Bayes theorem is also known as the Bayes Rule
or Bayes Law. It is a method to determine the probability of an event based on the
occurrences of prior events. It is used to calculate conditional probability. Bayes theorem
calculates the probability based on the hypothesis.
When to use bayes theorem:
Within the sample space, there exists an event B, for which P(B) > 0.
The analytical goal is to compute a conditional probability of the form: P( Ai | B ).
You know at least one of the two sets of probabilities described below:
P( Ai ∩ B ) for each Ai
P( Ai ) and P( B | Ai ) for each Ai
5.
6. An Example Of Bayes Theorem
What is the probability that it will rain on the day of Marie's wedding?
Event A1. It rains on Marie's wedding.
Event A2. It does not rain on Marie's wedding.
Event B. The weatherman predicts rain.
P( A1 ) = 5/365 =0.0136985 ,P( A2 ) = 360/365 = 0.9863014
P( B | A1 ) = 0.9 , P( B | A2 ) = 0.1
7. Abstract
Food allergies are a big deal. Nearly everyone has had to accommodate
someone with a food allergy.
I think everyone without a food allergy, myself included, has wondered “but
do they really have a food allergy?”.
The value of probability theory is that we can quantify our Scepticism and
make rational choices from this analysis.
The Boston Globe article points to a paper from 2003 that gives us some
data to work with. The essential things we'd like to know for our analysis are:
how many people truly have a food allergy and how many people claim to
have a food allergy (independent of whether or not they have one).
8. Analysis
We'll denote "has an allergy" with a variable A. The article gives the probability of a food allergy in children
as being between 4%-8% and for adults 1%-2%.
Now we can write these down as two probabilities:
P(Achild)=0.06, P(Aadult)=0.015, P(Claim)=0.3
The question we want to answer is: Given someone claims a food allergy, what is the
probability that they truly do have an allergy?
In math we would express this as "What is the probability of A given C" and in a formula:
P(A|C)
Given that we know both P(A)P(A) and P(C)P(C) we can use Bayes' Theorem!
P(A∣C)=P(C∣A)⋅P(A)/P(C)
9. .
We know both P(A) for both adults and children and P(C). The only thing we don't know
explicitly is P(C|A), but I'm going to assume that if you do have a food allergy, then there is a
100% chance you will claim to have one.
P(C∣A)=1
All we have to do is plug in our values and see what our results are:
Conclusion:
Given the data we have, if a parent claims their child has a food allergy there’s a 20% chance
that child truly does and if your friend claims they have a food allergy there’s only a 5% chance.
10. Bayes Theorem Application
Predicting Water Quality Conditions using Bayes’ Theorem
In finance, Bayes' Theorem can be used to rate the risk of lending money to
potential borrowers.
Machine Learning is one of the technologies that help make the right decision
at such times, and the Bayes Theorem helps make those conditional
probability decisions better.
If cancer corresponds to one's age then by using Bayes' theorem, we can
determine the probability of cancer more accurately with the help of age.