SlideShare a Scribd company logo
1 of 12
(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
 
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
 
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
 
Chap005Lind.ppt
Chap005Lind.pptChap005Lind.ppt
Chap005Lind.ppt
 

Recently uploaded

Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapRishantSharmaFr
 
Introduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdfIntroduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdfsumitt6_25730773
 
457503602-5-Gas-Well-Testing-and-Analysis-pptx.pptx
457503602-5-Gas-Well-Testing-and-Analysis-pptx.pptx457503602-5-Gas-Well-Testing-and-Analysis-pptx.pptx
457503602-5-Gas-Well-Testing-and-Analysis-pptx.pptxrouholahahmadi9876
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"mphochane1998
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdfKamal Acharya
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxJuliansyahHarahap1
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdfKamal Acharya
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdfKamal Acharya
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayEpec Engineered Technologies
 
Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Ramkumar k
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startQuintin Balsdon
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiessarkmank1
 
Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...
Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...
Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...jabtakhaidam7
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxSCMS School of Architecture
 

Recently uploaded (20)

Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Introduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdfIntroduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdf
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
457503602-5-Gas-Well-Testing-and-Analysis-pptx.pptx
457503602-5-Gas-Well-Testing-and-Analysis-pptx.pptx457503602-5-Gas-Well-Testing-and-Analysis-pptx.pptx
457503602-5-Gas-Well-Testing-and-Analysis-pptx.pptx
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and properties
 
Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...
Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...
Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
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(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