SlideShare a Scribd company logo
(Fergusson College, Pune)
Bayes' Theorem to Investigate
Food Allergies
Presented by
Anjor Patil Roll no. 226532
Harshit Singh Roll no. 226511
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
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).
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
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
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).
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(A​child​​)=0.06, P(A​adult​​)=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)
.
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.
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.
References
 https://www.countbayesie.com/blog/2016/1/22/why-you-should-believe-your-
friends-claims-about-food-allergies
 https://youtu.be/BcvLAw-JRss
 https://journals.le.ac.uk › lumj › article › download
 https://youtu.be/ADaxql883-M
 https://youtu.be/Fv_LGQKgWi0
 https://www.slideshare.net/anniyappa/bayes-theorem-250281464
 Thank You !

More Related Content

Similar to Bayes (1).pptx

Acem bayes classifier
Acem bayes classifierAcem bayes classifier
Acem bayes classifierAastha Kohli
 
Applied bayesian statistics
Applied bayesian statisticsApplied bayesian statistics
Applied bayesian statisticsSpringer
 
Probability decision making
Probability decision makingProbability decision making
Probability decision makingChristian Tobing
 
Quantitative Methods for Lawyers - Class #9 - Bayes Theorem (Part 2), Skewnes...
Quantitative Methods for Lawyers - Class #9 - Bayes Theorem (Part 2), Skewnes...Quantitative Methods for Lawyers - Class #9 - Bayes Theorem (Part 2), Skewnes...
Quantitative Methods for Lawyers - Class #9 - Bayes Theorem (Part 2), Skewnes...Daniel Katz
 
Statistics in clinical and translational research common pitfalls
Statistics in clinical and translational research  common pitfallsStatistics in clinical and translational research  common pitfalls
Statistics in clinical and translational research common pitfallsPavlos Msaouel, MD, PhD
 
Complements conditional probability bayes theorem
Complements  conditional probability bayes theorem  Complements  conditional probability bayes theorem
Complements conditional probability bayes theorem Long Beach City College
 
FALLSEM2023-24_MSM5001_ETH_VL2023240106334_2023-09-19_Reference-Material-I (3...
FALLSEM2023-24_MSM5001_ETH_VL2023240106334_2023-09-19_Reference-Material-I (3...FALLSEM2023-24_MSM5001_ETH_VL2023240106334_2023-09-19_Reference-Material-I (3...
FALLSEM2023-24_MSM5001_ETH_VL2023240106334_2023-09-19_Reference-Material-I (3...swethaagri
 
Health probabilities & estimation of parameters
Health probabilities & estimation of parameters Health probabilities & estimation of parameters
Health probabilities & estimation of parameters KwambokaLeonidah
 
1a_Bayes_rule.pdf
1a_Bayes_rule.pdf1a_Bayes_rule.pdf
1a_Bayes_rule.pdfDracMihawk
 
Machine Learning - Naive bayes
Machine Learning - Naive bayesMachine Learning - Naive bayes
Machine Learning - Naive bayeskishanthkumaar
 
probability_statistics_presentation.pptx
probability_statistics_presentation.pptxprobability_statistics_presentation.pptx
probability_statistics_presentation.pptxvietnam5hayday
 
Lecture3 Applied Econometrics and Economic Modeling
Lecture3 Applied Econometrics and Economic ModelingLecture3 Applied Econometrics and Economic Modeling
Lecture3 Applied Econometrics and Economic Modelingstone55
 
1615 probability-notation for joint probabilities
1615 probability-notation for joint probabilities1615 probability-notation for joint probabilities
1615 probability-notation for joint probabilitiesDr Fereidoun Dejahang
 
Statistics tests and Probablity
Statistics tests and ProbablityStatistics tests and Probablity
Statistics tests and ProbablityAbdul Wasay Baloch
 
introduction to biostatistics in clinical trials
introduction to biostatistics in clinical trialsintroduction to biostatistics in clinical trials
introduction to biostatistics in clinical trialsstopit2404
 
introduction to biostatistics in clinical trials
introduction to biostatistics in clinical trialsintroduction to biostatistics in clinical trials
introduction to biostatistics in clinical trialsstopit2404
 

Similar to Bayes (1).pptx (20)

Acem bayes classifier
Acem bayes classifierAcem bayes classifier
Acem bayes classifier
 
Applied bayesian statistics
Applied bayesian statisticsApplied bayesian statistics
Applied bayesian statistics
 
Probability decision making
Probability decision makingProbability decision making
Probability decision making
 
Probability.pptx
Probability.pptxProbability.pptx
Probability.pptx
 
Naieve_Bayee.pptx
Naieve_Bayee.pptxNaieve_Bayee.pptx
Naieve_Bayee.pptx
 
Quantitative Methods for Lawyers - Class #9 - Bayes Theorem (Part 2), Skewnes...
Quantitative Methods for Lawyers - Class #9 - Bayes Theorem (Part 2), Skewnes...Quantitative Methods for Lawyers - Class #9 - Bayes Theorem (Part 2), Skewnes...
Quantitative Methods for Lawyers - Class #9 - Bayes Theorem (Part 2), Skewnes...
 
Capits Presentation
Capits PresentationCapits Presentation
Capits Presentation
 
Statistics in clinical and translational research common pitfalls
Statistics in clinical and translational research  common pitfallsStatistics in clinical and translational research  common pitfalls
Statistics in clinical and translational research common pitfalls
 
Complements conditional probability bayes theorem
Complements  conditional probability bayes theorem  Complements  conditional probability bayes theorem
Complements conditional probability bayes theorem
 
FALLSEM2023-24_MSM5001_ETH_VL2023240106334_2023-09-19_Reference-Material-I (3...
FALLSEM2023-24_MSM5001_ETH_VL2023240106334_2023-09-19_Reference-Material-I (3...FALLSEM2023-24_MSM5001_ETH_VL2023240106334_2023-09-19_Reference-Material-I (3...
FALLSEM2023-24_MSM5001_ETH_VL2023240106334_2023-09-19_Reference-Material-I (3...
 
Health probabilities & estimation of parameters
Health probabilities & estimation of parameters Health probabilities & estimation of parameters
Health probabilities & estimation of parameters
 
1a_Bayes_rule.pdf
1a_Bayes_rule.pdf1a_Bayes_rule.pdf
1a_Bayes_rule.pdf
 
Machine Learning - Naive bayes
Machine Learning - Naive bayesMachine Learning - Naive bayes
Machine Learning - Naive bayes
 
probability_statistics_presentation.pptx
probability_statistics_presentation.pptxprobability_statistics_presentation.pptx
probability_statistics_presentation.pptx
 
Lecture3 Applied Econometrics and Economic Modeling
Lecture3 Applied Econometrics and Economic ModelingLecture3 Applied Econometrics and Economic Modeling
Lecture3 Applied Econometrics and Economic Modeling
 
1615 probability-notation for joint probabilities
1615 probability-notation for joint probabilities1615 probability-notation for joint probabilities
1615 probability-notation for joint probabilities
 
Statistics tests and Probablity
Statistics tests and ProbablityStatistics tests and Probablity
Statistics tests and Probablity
 
34301
3430134301
34301
 
introduction to biostatistics in clinical trials
introduction to biostatistics in clinical trialsintroduction to biostatistics in clinical trials
introduction to biostatistics in clinical trials
 
introduction to biostatistics in clinical trials
introduction to biostatistics in clinical trialsintroduction to biostatistics in clinical trials
introduction to biostatistics in clinical trials
 

Recently uploaded

Event Management System Vb Net Project Report.pdf
Event Management System Vb Net  Project Report.pdfEvent Management System Vb Net  Project Report.pdf
Event Management System Vb Net Project Report.pdfKamal Acharya
 
Cloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptx
Cloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptxCloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptx
Cloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptxMd. Shahidul Islam Prodhan
 
Online resume builder management system project report.pdf
Online resume builder management system project report.pdfOnline resume builder management system project report.pdf
Online resume builder management system project report.pdfKamal Acharya
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxViniHema
 
A case study of cinema management system project report..pdf
A case study of cinema management system project report..pdfA case study of cinema management system project report..pdf
A case study of cinema management system project report..pdfKamal Acharya
 
fluid mechanics gate notes . gate all pyqs answer
fluid mechanics gate notes . gate all pyqs answerfluid mechanics gate notes . gate all pyqs answer
fluid mechanics gate notes . gate all pyqs answerapareshmondalnita
 
shape functions of 1D and 2 D rectangular elements.pptx
shape functions of 1D and 2 D rectangular elements.pptxshape functions of 1D and 2 D rectangular elements.pptx
shape functions of 1D and 2 D rectangular elements.pptxVishalDeshpande27
 
Democratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek AryaDemocratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek Aryaabh.arya
 
Fruit shop management system project report.pdf
Fruit shop management system project report.pdfFruit shop management system project report.pdf
Fruit shop management system project report.pdfKamal Acharya
 
Arduino based vehicle speed tracker project
Arduino based vehicle speed tracker projectArduino based vehicle speed tracker project
Arduino based vehicle speed tracker projectRased Khan
 
NO1 Pandit Amil Baba In Bahawalpur, Sargodha, Sialkot, Sheikhupura, Rahim Yar...
NO1 Pandit Amil Baba In Bahawalpur, Sargodha, Sialkot, Sheikhupura, Rahim Yar...NO1 Pandit Amil Baba In Bahawalpur, Sargodha, Sialkot, Sheikhupura, Rahim Yar...
NO1 Pandit Amil Baba In Bahawalpur, Sargodha, Sialkot, Sheikhupura, Rahim Yar...Amil baba
 
Danfoss NeoCharge Technology -A Revolution in 2024.pdf
Danfoss NeoCharge Technology -A Revolution in 2024.pdfDanfoss NeoCharge Technology -A Revolution in 2024.pdf
Danfoss NeoCharge Technology -A Revolution in 2024.pdfNurvisNavarroSanchez
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdfPratik Pawar
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwoodseandesed
 
Introduction to Casting Processes in Manufacturing
Introduction to Casting Processes in ManufacturingIntroduction to Casting Processes in Manufacturing
Introduction to Casting Processes in Manufacturingssuser0811ec
 
Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdfKamal Acharya
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdfKamal Acharya
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationRobbie Edward Sayers
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxR&R Consult
 

Recently uploaded (20)

Event Management System Vb Net Project Report.pdf
Event Management System Vb Net  Project Report.pdfEvent Management System Vb Net  Project Report.pdf
Event Management System Vb Net Project Report.pdf
 
Cloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptx
Cloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptxCloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptx
Cloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptx
 
Online resume builder management system project report.pdf
Online resume builder management system project report.pdfOnline resume builder management system project report.pdf
Online resume builder management system project report.pdf
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
 
A case study of cinema management system project report..pdf
A case study of cinema management system project report..pdfA case study of cinema management system project report..pdf
A case study of cinema management system project report..pdf
 
fluid mechanics gate notes . gate all pyqs answer
fluid mechanics gate notes . gate all pyqs answerfluid mechanics gate notes . gate all pyqs answer
fluid mechanics gate notes . gate all pyqs answer
 
shape functions of 1D and 2 D rectangular elements.pptx
shape functions of 1D and 2 D rectangular elements.pptxshape functions of 1D and 2 D rectangular elements.pptx
shape functions of 1D and 2 D rectangular elements.pptx
 
Democratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek AryaDemocratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek Arya
 
Fruit shop management system project report.pdf
Fruit shop management system project report.pdfFruit shop management system project report.pdf
Fruit shop management system project report.pdf
 
Arduino based vehicle speed tracker project
Arduino based vehicle speed tracker projectArduino based vehicle speed tracker project
Arduino based vehicle speed tracker project
 
NO1 Pandit Amil Baba In Bahawalpur, Sargodha, Sialkot, Sheikhupura, Rahim Yar...
NO1 Pandit Amil Baba In Bahawalpur, Sargodha, Sialkot, Sheikhupura, Rahim Yar...NO1 Pandit Amil Baba In Bahawalpur, Sargodha, Sialkot, Sheikhupura, Rahim Yar...
NO1 Pandit Amil Baba In Bahawalpur, Sargodha, Sialkot, Sheikhupura, Rahim Yar...
 
Danfoss NeoCharge Technology -A Revolution in 2024.pdf
Danfoss NeoCharge Technology -A Revolution in 2024.pdfDanfoss NeoCharge Technology -A Revolution in 2024.pdf
Danfoss NeoCharge Technology -A Revolution in 2024.pdf
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
Introduction to Casting Processes in Manufacturing
Introduction to Casting Processes in ManufacturingIntroduction to Casting Processes in Manufacturing
Introduction to Casting Processes in Manufacturing
 
Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 

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(A​child​​)=0.06, P(A​adult​​)=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.
  • 11. References  https://www.countbayesie.com/blog/2016/1/22/why-you-should-believe-your- friends-claims-about-food-allergies  https://youtu.be/BcvLAw-JRss  https://journals.le.ac.uk › lumj › article › download  https://youtu.be/ADaxql883-M  https://youtu.be/Fv_LGQKgWi0  https://www.slideshare.net/anniyappa/bayes-theorem-250281464