SlideShare a Scribd company logo
1 of 14
Dr. C.V. Suresh Babu
(CentreforKnowledgeTransfer)
institute
Introduction
• Bayes' theorem is also known as Bayes' rule, Bayes' law, or Bayesian
reasoning, which determines the probability of an event with
uncertain knowledge.
• In probability theory, it relates the conditional probability and
marginal probabilities of two random events.
• Bayes' theorem was named after the British mathematician Thomas
Bayes. The Bayesian inference is an application of Bayes' theorem,
which is fundamental to Bayesian statistics.
(CentreforKnowledgeTransfer)
institute
What is Bayes Theorem?
• Bayes Theorem is a method of calculating conditional probability.
• The traditional method of calculating conditional probability (the
probability that one event occurs given the occurrence of a different
event) is to use the conditional probability formula, calculating the
joint probability of event one and event two occurring at the same
time, and then dividing it by the probability of event two occurring.
• However, conditional probability can also be calculated in a slightly
different fashion by using Bayes Theorem.
(CentreforKnowledgeTransfer)
institute
• When calculating conditional probability with Bayes theorem, you use the
following steps:
• Determine the probability of condition B being true, assuming that condition
A is true.
• Determine the probability of event A being true.
• Multiply the two probabilities together.
• Divide by the probability of event B occurring.
• This means that the formula for Bayes Theorem could be expressed like this:
P(A|B) = P(B|A)*P(A) / P(B)
• Calculating the conditional probability like this is especially useful when the
reverse conditional probability can be easily calculated, or when calculating
the joint probability would be too challenging.
(CentreforKnowledgeTransfer)
institute
How?
• It is a way to calculate the value of P(B|A) with the knowledge of
P(A|B)
• Bayes' theorem allows updating the probability prediction of an event
by observing new information of the real world.
• Example: 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.
(CentreforKnowledgeTransfer)
institute
Bayes' theorem
• Bayes' theorem can be derived using product rule and conditional probability of
event A with known event B:
• As from product rule we can write:
• P(A ⋀ B)= P(A|B) P(B) or
• imilarly, the probability of event B with known event A:
• P(A ⋀ B)= P(B|A) P(A)
• Equating right hand side of both the equations, we will get:
• The above equation (a) is called as Bayes' rule or Bayes' theorem. This equation
is basic of most modern AI systems for probabilistic inference.
(CentreforKnowledgeTransfer)
institute
Bayes' rule
or
Bayes' theorem
(CentreforKnowledgeTransfer)
institute
• It shows the simple relationship between joint and conditional
probabilities. Here,
• P(A|B) is known as posterior, which we need to calculate, and it will be
read as Probability of hypothesis A when we have occurred an evidence B.
• P(B|A) is called the likelihood, in which we consider that hypothesis is true,
then we calculate the probability of evidence.
• P(A) is called the prior probability, probability of hypothesis before
considering the evidence
• P(B) is called marginal probability, pure probability of an evidence.
• In the equation (a), in general, we can write P (B) = P(A)*P(B|Ai), hence the
Bayes' rule can be written as:
• Where A1, A2, A3,........, An is a set of mutually exclusive and exhaustive
events.
(CentreforKnowledgeTransfer)
institute
Applying Bayes' rule:
• Bayes' rule allows us to compute the single term P(B|A) in terms of
P(A|B), P(B), and P(A).
• This is very useful in cases where we have a good probability of these
three terms and want to determine the fourth one.
• Suppose we want to perceive the effect of some unknown cause, and
want to compute that cause, then the Bayes' rule becomes:
(CentreforKnowledgeTransfer)
institute
Example #1
Question: what is the probability that a patient has diseases meningitis with a
stiff neck?
Given Data:
• A doctor is aware that disease meningitis causes a patient to have a stiff neck,
and it occurs 80% of the time.
• He is also aware of some more facts, which are given as follows:
• The Known probability that a patient has meningitis disease is 1/30,000.
• The Known probability that a patient has a stiff neck is 2%.
Let a be the proposition that patient has stiff neck and b be the proposition that
patient has meningitis. , so we can calculate the following as:
 P(a|b) = 0.8
 P(b) = 1/30000
 P(a)= .02
Hence, we can assume that 1 patient out of 750 patients has meningitis
disease with a stiff neck.
(CentreforKnowledgeTransfer)
institute
Example #2:
• Question: From a standard deck of playing cards, a single card is drawn. The probability
that the card is king is 4/52, then calculate posterior probability P(King|Face), which
means the drawn face card is a king card.
• Solution:
• P(king): probability that the card is King= 4/52= 1/13
• P(face): probability that a card is a face card= 3/13
• P(Face|King): probability of face card when we assume it is a king = 1
• Putting all values in equation (i) we will get:
(CentreforKnowledgeTransfer)
institute
• Imagine you are a financial analyst at an investment bank. According to your research of publicly-
traded companies, 60% of the companies that increased their share price by more than 5% in the
last three years replaced their CEOs during the period.
• At the same time, only 35% of the companies that did not increase their share price by more
than 5% in the same period replaced their CEOs. Knowing that the probability that the stock
prices grow by more than 5% is 4%, find the probability that the shares of a company that fires
its CEO will increase by more than 5%.
• Before finding the probabilities, you must first define the notation of the probabilities.
• P(A) – the probability that the stock price increases by 5%
• P(B) – the probability that the CEO is replaced
• P(A|B) – the probability of the stock price increases by 5% given that the CEO has been replaced
• P(B|A) – the probability of the CEO replacement given the stock price has increased by 5%.
• Using the Bayes’ theorem, we can find the required probability:
Example #3:
Thus, the probability that the shares of a company that replaces its CEO will grow by more
than 5% is 6.67%.
(CentreforKnowledgeTransfer)
institute
• Using the cancer diagnosis example, we can show that Bayes rule allows us to obtain a much
better estimate.
• Now, we will put some made-up numbers into the example so we can assess the difference that
Bayes rule made.
• Assume that the probability of having cancer is 0.05 — meaning that 5% of people have cancer.
• Now, assume that the probability of being a smoker is 0.10 — meaning that 10% of people are
smokers, and that 20% of people with cancer are smokers, so P(smoker|cancer) = 0.20.
• Initially, our probability for cancer is simply our prior, so 0.05.
• However, using new evidence, we can instead calculate P(cancer|smoke), which is equal to
(P(smoker|cancer) * P(cancer)) / P(smoker) = (0.20 * 0.05) / (0.10) = 0.10.
• By introducing new evidence, we therefore obtained a better probability estimation.
• Initially we had a probability of 0.05, but using the smoker evidence, we were able to get to a
more accurate probability that was double our prior.
• In the given example (even with our made-up numbers), this effect should be quite logical, since
we know that smoking causes cancer.
This therefore demonstrates how Bayes rule allows us to update our beliefs using relevant
information.
Example #4:
(CentreforKnowledgeTransfer)
institute
Applications of Bayes' theorem
• It is used to calculate the next step of the robot when the already
executed step is given.
• Bayes' theorem is helpful in weather forecasting.
• It can solve the Monty Hall problem.
(CentreforKnowledgeTransfer)
institute

More Related Content

What's hot

Probability Theory
Probability TheoryProbability Theory
Probability TheoryParul Singh
 
Poisson distribution
Poisson distributionPoisson distribution
Poisson distributionAnindya Jana
 
Probability&Bayes theorem
Probability&Bayes theoremProbability&Bayes theorem
Probability&Bayes theoremimran iqbal
 
The Binomial, Poisson, and Normal Distributions
The Binomial, Poisson, and Normal DistributionsThe Binomial, Poisson, and Normal Distributions
The Binomial, Poisson, and Normal DistributionsSCE.Surat
 
The Method Of Maximum Likelihood
The Method Of Maximum LikelihoodThe Method Of Maximum Likelihood
The Method Of Maximum LikelihoodMax Chipulu
 
Belief Networks & Bayesian Classification
Belief Networks & Bayesian ClassificationBelief Networks & Bayesian Classification
Belief Networks & Bayesian ClassificationAdnan Masood
 
Lasso and ridge regression
Lasso and ridge regressionLasso and ridge regression
Lasso and ridge regressionSreerajVA
 
Basic probability concept
Basic probability conceptBasic probability concept
Basic probability conceptMmedsc Hahm
 
Binomial probability distributions ppt
Binomial probability distributions pptBinomial probability distributions ppt
Binomial probability distributions pptTayab Ali
 
Probability distribution
Probability distributionProbability distribution
Probability distributionRanjan Kumar
 
Probability Concepts Applications
Probability Concepts  ApplicationsProbability Concepts  Applications
Probability Concepts Applicationsguest44b78
 
Mathematical Expectation And Variance
Mathematical Expectation And VarianceMathematical Expectation And Variance
Mathematical Expectation And VarianceDataminingTools Inc
 

What's hot (20)

Probability Theory
Probability TheoryProbability Theory
Probability Theory
 
Poisson distribution
Poisson distributionPoisson distribution
Poisson distribution
 
Bays theorem of probability
Bays theorem of probabilityBays theorem of probability
Bays theorem of probability
 
Probability&Bayes theorem
Probability&Bayes theoremProbability&Bayes theorem
Probability&Bayes theorem
 
The Binomial, Poisson, and Normal Distributions
The Binomial, Poisson, and Normal DistributionsThe Binomial, Poisson, and Normal Distributions
The Binomial, Poisson, and Normal Distributions
 
The Method Of Maximum Likelihood
The Method Of Maximum LikelihoodThe Method Of Maximum Likelihood
The Method Of Maximum Likelihood
 
poisson distribution
poisson distributionpoisson distribution
poisson distribution
 
Belief Networks & Bayesian Classification
Belief Networks & Bayesian ClassificationBelief Networks & Bayesian Classification
Belief Networks & Bayesian Classification
 
Lasso and ridge regression
Lasso and ridge regressionLasso and ridge regression
Lasso and ridge regression
 
Basic probability concept
Basic probability conceptBasic probability concept
Basic probability concept
 
Decision Tree Learning
Decision Tree LearningDecision Tree Learning
Decision Tree Learning
 
Binomial probability distributions ppt
Binomial probability distributions pptBinomial probability distributions ppt
Binomial probability distributions ppt
 
Simple linear regression
Simple linear regressionSimple linear regression
Simple linear regression
 
Skewness
SkewnessSkewness
Skewness
 
Regression Analysis
Regression AnalysisRegression Analysis
Regression Analysis
 
Probability distribution
Probability distributionProbability distribution
Probability distribution
 
Probability Concepts Applications
Probability Concepts  ApplicationsProbability Concepts  Applications
Probability Concepts Applications
 
Linear regression
Linear regressionLinear regression
Linear regression
 
Poission distribution
Poission distributionPoission distribution
Poission distribution
 
Mathematical Expectation And Variance
Mathematical Expectation And VarianceMathematical Expectation And Variance
Mathematical Expectation And Variance
 

Similar to Bayes' theorem

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
 
2.statistical DEcision makig.pptx
2.statistical DEcision makig.pptx2.statistical DEcision makig.pptx
2.statistical DEcision makig.pptxImpanaR2
 
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
 
Artificial Intelligence Notes Unit 3
Artificial Intelligence Notes Unit 3Artificial Intelligence Notes Unit 3
Artificial Intelligence Notes Unit 3DigiGurukul
 
Bayesian decision making in clinical research
Bayesian decision making in clinical researchBayesian decision making in clinical research
Bayesian decision making in clinical researchBhaswat Chakraborty
 
Bayesian statistics for biologists and ecologists
Bayesian statistics for biologists and ecologistsBayesian statistics for biologists and ecologists
Bayesian statistics for biologists and ecologistsMasahiro Ryo. Ph.D.
 
Chris Stuccio - Data science - Conversion Hotel 2015
Chris Stuccio - Data science - Conversion Hotel 2015Chris Stuccio - Data science - Conversion Hotel 2015
Chris Stuccio - Data science - Conversion Hotel 2015Webanalisten .nl
 
presentation2-151215164213.pptx
presentation2-151215164213.pptxpresentation2-151215164213.pptx
presentation2-151215164213.pptxRACHANAB18
 
BayesTheorem.pdf
BayesTheorem.pdfBayesTheorem.pdf
BayesTheorem.pdfZiaulKRIM
 
HEART DISEASE PREDICTION USING NAIVE BAYES ALGORITHM
HEART DISEASE PREDICTION USING NAIVE BAYES ALGORITHMHEART DISEASE PREDICTION USING NAIVE BAYES ALGORITHM
HEART DISEASE PREDICTION USING NAIVE BAYES ALGORITHMamiteshg
 
What should we expect from reproducibiliry
What should we expect from reproducibiliryWhat should we expect from reproducibiliry
What should we expect from reproducibiliryStephen Senn
 
Statistical tests
Statistical testsStatistical tests
Statistical testsmartyynyyte
 

Similar to Bayes' theorem (20)

unit 3 -ML.pptx
unit 3 -ML.pptxunit 3 -ML.pptx
unit 3 -ML.pptx
 
Bayesian Statistics.pdf
Bayesian Statistics.pdfBayesian Statistics.pdf
Bayesian Statistics.pdf
 
Bayesian learning
Bayesian learningBayesian learning
Bayesian learning
 
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...
 
2.statistical DEcision makig.pptx
2.statistical DEcision makig.pptx2.statistical DEcision makig.pptx
2.statistical DEcision makig.pptx
 
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
 
Artificial Intelligence Notes Unit 3
Artificial Intelligence Notes Unit 3Artificial Intelligence Notes Unit 3
Artificial Intelligence Notes Unit 3
 
Bayesian decision making in clinical research
Bayesian decision making in clinical researchBayesian decision making in clinical research
Bayesian decision making in clinical research
 
Bayes (1).pptx
Bayes (1).pptxBayes (1).pptx
Bayes (1).pptx
 
Burns And Bush Chapter 16
Burns And Bush Chapter 16Burns And Bush Chapter 16
Burns And Bush Chapter 16
 
Bayesian statistics for biologists and ecologists
Bayesian statistics for biologists and ecologistsBayesian statistics for biologists and ecologists
Bayesian statistics for biologists and ecologists
 
Lec13_Bayes.pptx
Lec13_Bayes.pptxLec13_Bayes.pptx
Lec13_Bayes.pptx
 
Chris Stuccio - Data science - Conversion Hotel 2015
Chris Stuccio - Data science - Conversion Hotel 2015Chris Stuccio - Data science - Conversion Hotel 2015
Chris Stuccio - Data science - Conversion Hotel 2015
 
presentation2-151215164213.pptx
presentation2-151215164213.pptxpresentation2-151215164213.pptx
presentation2-151215164213.pptx
 
Bayes theorem
Bayes theoremBayes theorem
Bayes theorem
 
BayesTheorem.pdf
BayesTheorem.pdfBayesTheorem.pdf
BayesTheorem.pdf
 
Bayes
BayesBayes
Bayes
 
HEART DISEASE PREDICTION USING NAIVE BAYES ALGORITHM
HEART DISEASE PREDICTION USING NAIVE BAYES ALGORITHMHEART DISEASE PREDICTION USING NAIVE BAYES ALGORITHM
HEART DISEASE PREDICTION USING NAIVE BAYES ALGORITHM
 
What should we expect from reproducibiliry
What should we expect from reproducibiliryWhat should we expect from reproducibiliry
What should we expect from reproducibiliry
 
Statistical tests
Statistical testsStatistical tests
Statistical tests
 

More from Dr. C.V. Suresh Babu

Diagnosis test of diabetics and hypertension by AI
Diagnosis test of diabetics and hypertension by AIDiagnosis test of diabetics and hypertension by AI
Diagnosis test of diabetics and hypertension by AIDr. C.V. Suresh Babu
 
A study on “impact of artificial intelligence in covid19 diagnosis”
A study on “impact of artificial intelligence in covid19 diagnosis”A study on “impact of artificial intelligence in covid19 diagnosis”
A study on “impact of artificial intelligence in covid19 diagnosis”Dr. C.V. Suresh Babu
 
A study on “impact of artificial intelligence in covid19 diagnosis”
A study on “impact of artificial intelligence in covid19 diagnosis”A study on “impact of artificial intelligence in covid19 diagnosis”
A study on “impact of artificial intelligence in covid19 diagnosis”Dr. C.V. Suresh Babu
 
A study on “the impact of data analytics in covid 19 health care system”
A study on “the impact of data analytics in covid 19 health care system”A study on “the impact of data analytics in covid 19 health care system”
A study on “the impact of data analytics in covid 19 health care system”Dr. C.V. Suresh Babu
 

More from Dr. C.V. Suresh Babu (20)

Data analytics with R
Data analytics with RData analytics with R
Data analytics with R
 
Association rules
Association rulesAssociation rules
Association rules
 
Clustering
ClusteringClustering
Clustering
 
Classification
ClassificationClassification
Classification
 
Blue property assumptions.
Blue property assumptions.Blue property assumptions.
Blue property assumptions.
 
Introduction to regression
Introduction to regressionIntroduction to regression
Introduction to regression
 
DART
DARTDART
DART
 
Mycin
MycinMycin
Mycin
 
Expert systems
Expert systemsExpert systems
Expert systems
 
Dempster shafer theory
Dempster shafer theoryDempster shafer theory
Dempster shafer theory
 
Bayes network
Bayes networkBayes network
Bayes network
 
Knowledge based agents
Knowledge based agentsKnowledge based agents
Knowledge based agents
 
Rule based system
Rule based systemRule based system
Rule based system
 
Formal Logic in AI
Formal Logic in AIFormal Logic in AI
Formal Logic in AI
 
Production based system
Production based systemProduction based system
Production based system
 
Game playing in AI
Game playing in AIGame playing in AI
Game playing in AI
 
Diagnosis test of diabetics and hypertension by AI
Diagnosis test of diabetics and hypertension by AIDiagnosis test of diabetics and hypertension by AI
Diagnosis test of diabetics and hypertension by AI
 
A study on “impact of artificial intelligence in covid19 diagnosis”
A study on “impact of artificial intelligence in covid19 diagnosis”A study on “impact of artificial intelligence in covid19 diagnosis”
A study on “impact of artificial intelligence in covid19 diagnosis”
 
A study on “impact of artificial intelligence in covid19 diagnosis”
A study on “impact of artificial intelligence in covid19 diagnosis”A study on “impact of artificial intelligence in covid19 diagnosis”
A study on “impact of artificial intelligence in covid19 diagnosis”
 
A study on “the impact of data analytics in covid 19 health care system”
A study on “the impact of data analytics in covid 19 health care system”A study on “the impact of data analytics in covid 19 health care system”
A study on “the impact of data analytics in covid 19 health care system”
 

Recently uploaded

Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 

Bayes' theorem

  • 1. Dr. C.V. Suresh Babu (CentreforKnowledgeTransfer) institute
  • 2. Introduction • Bayes' theorem is also known as Bayes' rule, Bayes' law, or Bayesian reasoning, which determines the probability of an event with uncertain knowledge. • In probability theory, it relates the conditional probability and marginal probabilities of two random events. • Bayes' theorem was named after the British mathematician Thomas Bayes. The Bayesian inference is an application of Bayes' theorem, which is fundamental to Bayesian statistics. (CentreforKnowledgeTransfer) institute
  • 3. What is Bayes Theorem? • Bayes Theorem is a method of calculating conditional probability. • The traditional method of calculating conditional probability (the probability that one event occurs given the occurrence of a different event) is to use the conditional probability formula, calculating the joint probability of event one and event two occurring at the same time, and then dividing it by the probability of event two occurring. • However, conditional probability can also be calculated in a slightly different fashion by using Bayes Theorem. (CentreforKnowledgeTransfer) institute
  • 4. • When calculating conditional probability with Bayes theorem, you use the following steps: • Determine the probability of condition B being true, assuming that condition A is true. • Determine the probability of event A being true. • Multiply the two probabilities together. • Divide by the probability of event B occurring. • This means that the formula for Bayes Theorem could be expressed like this: P(A|B) = P(B|A)*P(A) / P(B) • Calculating the conditional probability like this is especially useful when the reverse conditional probability can be easily calculated, or when calculating the joint probability would be too challenging. (CentreforKnowledgeTransfer) institute
  • 5. How? • It is a way to calculate the value of P(B|A) with the knowledge of P(A|B) • Bayes' theorem allows updating the probability prediction of an event by observing new information of the real world. • Example: 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. (CentreforKnowledgeTransfer) institute
  • 6. Bayes' theorem • Bayes' theorem can be derived using product rule and conditional probability of event A with known event B: • As from product rule we can write: • P(A ⋀ B)= P(A|B) P(B) or • imilarly, the probability of event B with known event A: • P(A ⋀ B)= P(B|A) P(A) • Equating right hand side of both the equations, we will get: • The above equation (a) is called as Bayes' rule or Bayes' theorem. This equation is basic of most modern AI systems for probabilistic inference. (CentreforKnowledgeTransfer) institute
  • 8. • It shows the simple relationship between joint and conditional probabilities. Here, • P(A|B) is known as posterior, which we need to calculate, and it will be read as Probability of hypothesis A when we have occurred an evidence B. • P(B|A) is called the likelihood, in which we consider that hypothesis is true, then we calculate the probability of evidence. • P(A) is called the prior probability, probability of hypothesis before considering the evidence • P(B) is called marginal probability, pure probability of an evidence. • In the equation (a), in general, we can write P (B) = P(A)*P(B|Ai), hence the Bayes' rule can be written as: • Where A1, A2, A3,........, An is a set of mutually exclusive and exhaustive events. (CentreforKnowledgeTransfer) institute
  • 9. Applying Bayes' rule: • Bayes' rule allows us to compute the single term P(B|A) in terms of P(A|B), P(B), and P(A). • This is very useful in cases where we have a good probability of these three terms and want to determine the fourth one. • Suppose we want to perceive the effect of some unknown cause, and want to compute that cause, then the Bayes' rule becomes: (CentreforKnowledgeTransfer) institute
  • 10. Example #1 Question: what is the probability that a patient has diseases meningitis with a stiff neck? Given Data: • A doctor is aware that disease meningitis causes a patient to have a stiff neck, and it occurs 80% of the time. • He is also aware of some more facts, which are given as follows: • The Known probability that a patient has meningitis disease is 1/30,000. • The Known probability that a patient has a stiff neck is 2%. Let a be the proposition that patient has stiff neck and b be the proposition that patient has meningitis. , so we can calculate the following as:  P(a|b) = 0.8  P(b) = 1/30000  P(a)= .02 Hence, we can assume that 1 patient out of 750 patients has meningitis disease with a stiff neck. (CentreforKnowledgeTransfer) institute
  • 11. Example #2: • Question: From a standard deck of playing cards, a single card is drawn. The probability that the card is king is 4/52, then calculate posterior probability P(King|Face), which means the drawn face card is a king card. • Solution: • P(king): probability that the card is King= 4/52= 1/13 • P(face): probability that a card is a face card= 3/13 • P(Face|King): probability of face card when we assume it is a king = 1 • Putting all values in equation (i) we will get: (CentreforKnowledgeTransfer) institute
  • 12. • Imagine you are a financial analyst at an investment bank. According to your research of publicly- traded companies, 60% of the companies that increased their share price by more than 5% in the last three years replaced their CEOs during the period. • At the same time, only 35% of the companies that did not increase their share price by more than 5% in the same period replaced their CEOs. Knowing that the probability that the stock prices grow by more than 5% is 4%, find the probability that the shares of a company that fires its CEO will increase by more than 5%. • Before finding the probabilities, you must first define the notation of the probabilities. • P(A) – the probability that the stock price increases by 5% • P(B) – the probability that the CEO is replaced • P(A|B) – the probability of the stock price increases by 5% given that the CEO has been replaced • P(B|A) – the probability of the CEO replacement given the stock price has increased by 5%. • Using the Bayes’ theorem, we can find the required probability: Example #3: Thus, the probability that the shares of a company that replaces its CEO will grow by more than 5% is 6.67%. (CentreforKnowledgeTransfer) institute
  • 13. • Using the cancer diagnosis example, we can show that Bayes rule allows us to obtain a much better estimate. • Now, we will put some made-up numbers into the example so we can assess the difference that Bayes rule made. • Assume that the probability of having cancer is 0.05 — meaning that 5% of people have cancer. • Now, assume that the probability of being a smoker is 0.10 — meaning that 10% of people are smokers, and that 20% of people with cancer are smokers, so P(smoker|cancer) = 0.20. • Initially, our probability for cancer is simply our prior, so 0.05. • However, using new evidence, we can instead calculate P(cancer|smoke), which is equal to (P(smoker|cancer) * P(cancer)) / P(smoker) = (0.20 * 0.05) / (0.10) = 0.10. • By introducing new evidence, we therefore obtained a better probability estimation. • Initially we had a probability of 0.05, but using the smoker evidence, we were able to get to a more accurate probability that was double our prior. • In the given example (even with our made-up numbers), this effect should be quite logical, since we know that smoking causes cancer. This therefore demonstrates how Bayes rule allows us to update our beliefs using relevant information. Example #4: (CentreforKnowledgeTransfer) institute
  • 14. Applications of Bayes' theorem • It is used to calculate the next step of the robot when the already executed step is given. • Bayes' theorem is helpful in weather forecasting. • It can solve the Monty Hall problem. (CentreforKnowledgeTransfer) institute