SlideShare a Scribd company logo
Rushdi Shams, Dept of CSE, KUET, Bangladesh 1
Knowledge Representation
Probabilistic Logic
Artificial Intelligence
Version 2.0
Rushdi Shams, Dept of CSE, KUET, Bangladesh 2
Conditional Probability
 Definition of conditional probability:
P(a | b) = P(a b) / P(b) if P(b) > 0
 Product rule gives an alternative formulation:

P(a b) = P(a | b) P(b) = P(b | a) P(a)
Rushdi Shams, Dept of CSE, KUET, Bangladesh 3
Inference with Probability
Rushdi Shams, Dept of CSE, KUET, Bangladesh 4
Inference in Probability
 P(toothache) =
0.108 + 0.012 + 0.016 + 0.064
= 0.2
Rushdi Shams, Dept of CSE, KUET, Bangladesh 5
Inference in Probability
 P(cavity V toothache) =
0.108 + 0.012 + 0.072 + .008 +
0.016 + 0.064 = 0.28
Rushdi Shams, Dept of CSE, KUET, Bangladesh 6
Inference in Probability
 Can also compute conditional probabilities:
Rushdi Shams, Dept of CSE, KUET, Bangladesh 7
Inference in Probability
 Can also compute conditional probabilities:
Rushdi Shams, Dept of CSE, KUET, Bangladesh 8
Baye’s Rule
 Product rule gives an alternative formulation:
P(a b) = P(a | b) P(b)
= P(b | a) P(a)
Joining them together, we can find-
P(a | b) = P(b | a) P(a)
P(b)
Rushdi Shams, Dept of CSE, KUET, Bangladesh 9
Application of Bayes’ Rule
A doctor knows that the disease meningitis causes the patient to
have a stiff neck is 50%
Means probability of stiff neck given the probability of having
meningitis
P(s | m) = 0.5
He also knows that in every 50000 patients, 1 may have meningitis
Means probability that a patient has meningitis
P (m) = 1/50000
He also knows that in every 20 patients, 1 may have stiff neck
Means probability that a patient has meningitis
P (m) = 1/20
Then, from Bayes’ rule
P(m | s) = P(s | m) P(m)
P(s)
Rushdi Shams, Dept of CSE, KUET, Bangladesh 10
Application of Bayes’ Rule
P(m | s) = P(s | m) P(m)
P(s)
= 0.5 X (1/50000)
1/20
= 0.0002
Means he can expect only 1 in 5000 patients with a stiff neck
to have meningitis
Rushdi Shams, Dept of CSE, KUET, Bangladesh 11
References
 Artificial Intelligence: A Modern Approach (2nd
Edition)
by Russell and Norvig
Chapter 13

More Related Content

What's hot (20)

PPTX
Natural language processing
Yogendra Tamang
 
PDF
And then there were ... Large Language Models
Leon Dohmen
 
PPTX
Knowledge representation In Artificial Intelligence
Ramla Sheikh
 
PPTX
Artificial Intelligence: Natural Language Processing
Frank Cunha
 
PPTX
Language models
Maryam Khordad
 
PDF
AI_ 3 & 4 Knowledge Representation issues
Khushali Kathiriya
 
PDF
“Probabilistic Logic Programs and Their Applications”
diannepatricia
 
PPT
First order logic
Rushdi Shams
 
PPTX
Artificial intelligence- Logic Agents
Nuruzzaman Milon
 
PDF
Ai lecture 09(unit03)
vikas dhakane
 
PDF
oracle-rest-data-service-instal-config
hunghtc83
 
PDF
Natural Language Processing (NLP)
Yuriy Guts
 
PDF
Logic programming (1)
Nitesh Singh
 
PDF
Large Language Models Bootcamp
Data Science Dojo
 
PPTX
AI: Logic in AI
DataminingTools Inc
 
PPTX
AI: Planning and AI
DataminingTools Inc
 
PPT
MachineLearning.ppt
butest
 
PDF
Ai lecture 01(unit03)
vikas dhakane
 
PPT
Artificial Intelligence -- Search Algorithms
Syed Ahmed
 
Natural language processing
Yogendra Tamang
 
And then there were ... Large Language Models
Leon Dohmen
 
Knowledge representation In Artificial Intelligence
Ramla Sheikh
 
Artificial Intelligence: Natural Language Processing
Frank Cunha
 
Language models
Maryam Khordad
 
AI_ 3 & 4 Knowledge Representation issues
Khushali Kathiriya
 
“Probabilistic Logic Programs and Their Applications”
diannepatricia
 
First order logic
Rushdi Shams
 
Artificial intelligence- Logic Agents
Nuruzzaman Milon
 
Ai lecture 09(unit03)
vikas dhakane
 
oracle-rest-data-service-instal-config
hunghtc83
 
Natural Language Processing (NLP)
Yuriy Guts
 
Logic programming (1)
Nitesh Singh
 
Large Language Models Bootcamp
Data Science Dojo
 
AI: Logic in AI
DataminingTools Inc
 
AI: Planning and AI
DataminingTools Inc
 
MachineLearning.ppt
butest
 
Ai lecture 01(unit03)
vikas dhakane
 
Artificial Intelligence -- Search Algorithms
Syed Ahmed
 

Viewers also liked (13)

PDF
L1 l2 l3 introduction to machine translation
Rushdi Shams
 
PPT
L13 why software fails
Rushdi Shams
 
PPT
L15 fuzzy logic
Rushdi Shams
 
PPT
Knowledge representation
Rushdi Shams
 
PPT
Lecture 5, 6 and 7 cpu scheduling
Rushdi Shams
 
PPTX
Semi-supervised classification for natural language processing
Rushdi Shams
 
PDF
Weka
Shuang Wu
 
PPT
Lecture 7, 8, 9 and 10 Inter Process Communication (IPC) in Operating Systems
Rushdi Shams
 
PPT
Knowledge structure
Rushdi Shams
 
PPTX
Propositional logic
Rushdi Shams
 
PPTX
Natural Language Processing: Parsing
Rushdi Shams
 
PPT
Syntax and semantics
Rushdi Shams
 
PPT
Types of machine translation
Rushdi Shams
 
L1 l2 l3 introduction to machine translation
Rushdi Shams
 
L13 why software fails
Rushdi Shams
 
L15 fuzzy logic
Rushdi Shams
 
Knowledge representation
Rushdi Shams
 
Lecture 5, 6 and 7 cpu scheduling
Rushdi Shams
 
Semi-supervised classification for natural language processing
Rushdi Shams
 
Weka
Shuang Wu
 
Lecture 7, 8, 9 and 10 Inter Process Communication (IPC) in Operating Systems
Rushdi Shams
 
Knowledge structure
Rushdi Shams
 
Propositional logic
Rushdi Shams
 
Natural Language Processing: Parsing
Rushdi Shams
 
Syntax and semantics
Rushdi Shams
 
Types of machine translation
Rushdi Shams
 
Ad

Similar to Probabilistic logic (20)

PPTX
22PCOAM11_IAI_Session 23 Bayes theorem.pptx
Guru Nanak Technical Institutions
 
PPTX
Bayes' theorem in Artificial intelligence.pptx
arockiaruby13s
 
PPTX
Bayes' theorem
Dr. C.V. Suresh Babu
 
PPT
Uncertainty
Digvijay Singh
 
PPT
AI Lecture 7 (uncertainty)
Tajim Md. Niamat Ullah Akhund
 
PDF
Probabilistic Reasoning bayes rule conditional .pdf
SupreethGowda24
 
PPTX
Module5_chapter1PPT (1).pptxhdhrjgrrjjrjrdbjejej
gnanasagarreddykuppa
 
PPTX
2.Probabilistic reasoning.pptx...........
arunanirmal2004
 
PDF
AI 10 | Naive Bayes Classifier
Mohammad Imam Hossain
 
PDF
Module - 4 Machine Learning -22ISE62.pdf
Dr. Shivashankar
 
PDF
Warmup_New.pdf
HongAnhNguyn285885
 
PPTX
UNIT-II-Probability-ConditionalProbability-BayesTherom.pptx
ChagantiSahith
 
PPT
Bayes Classification
sathish sak
 
PDF
problem Formulation in artificial Intelligence
shanthinkrcs
 
PDF
Artificial Intelligence Chap.5 : Uncertainty
Khushali Kathiriya
 
PDF
AI_7 Statistical Reasoning
Khushali Kathiriya
 
PDF
13-uncertainty.pdf
ZainabMirza20
 
PDF
Bayesian Learning - Naive Bayes Algorithm
Sharmila Chidaravalli
 
PPTX
AI_Probability.pptx
ssuserc8e745
 
PPTX
unit 3 -ML.pptx
Chitrachitrap
 
22PCOAM11_IAI_Session 23 Bayes theorem.pptx
Guru Nanak Technical Institutions
 
Bayes' theorem in Artificial intelligence.pptx
arockiaruby13s
 
Bayes' theorem
Dr. C.V. Suresh Babu
 
Uncertainty
Digvijay Singh
 
AI Lecture 7 (uncertainty)
Tajim Md. Niamat Ullah Akhund
 
Probabilistic Reasoning bayes rule conditional .pdf
SupreethGowda24
 
Module5_chapter1PPT (1).pptxhdhrjgrrjjrjrdbjejej
gnanasagarreddykuppa
 
2.Probabilistic reasoning.pptx...........
arunanirmal2004
 
AI 10 | Naive Bayes Classifier
Mohammad Imam Hossain
 
Module - 4 Machine Learning -22ISE62.pdf
Dr. Shivashankar
 
Warmup_New.pdf
HongAnhNguyn285885
 
UNIT-II-Probability-ConditionalProbability-BayesTherom.pptx
ChagantiSahith
 
Bayes Classification
sathish sak
 
problem Formulation in artificial Intelligence
shanthinkrcs
 
Artificial Intelligence Chap.5 : Uncertainty
Khushali Kathiriya
 
AI_7 Statistical Reasoning
Khushali Kathiriya
 
13-uncertainty.pdf
ZainabMirza20
 
Bayesian Learning - Naive Bayes Algorithm
Sharmila Chidaravalli
 
AI_Probability.pptx
ssuserc8e745
 
unit 3 -ML.pptx
Chitrachitrap
 
Ad

More from Rushdi Shams (17)

PDF
Research Methodology and Tips on Better Research
Rushdi Shams
 
PPTX
Common evaluation measures in NLP and IR
Rushdi Shams
 
PPTX
Machine learning with nlp 101
Rushdi Shams
 
PPTX
Belief function
Rushdi Shams
 
PPT
L5 understanding hacking
Rushdi Shams
 
PPT
L4 vpn
Rushdi Shams
 
PPT
L3 defense
Rushdi Shams
 
PPT
L2 Intrusion Detection System (IDS)
Rushdi Shams
 
PPT
L1 phishing
Rushdi Shams
 
PPT
L2 l3 l4 software process models
Rushdi Shams
 
PPT
L1 overview of software engineering
Rushdi Shams
 
PPT
Lecture 14,15 and 16 file systems
Rushdi Shams
 
PPT
Lecture 11,12 and 13 deadlocks
Rushdi Shams
 
PPT
Lecture 1 and 2 processes
Rushdi Shams
 
PPT
Lecture 3 and 4 threads
Rushdi Shams
 
PPT
Distributed Database Management Systems (Distributed DBMS)
Rushdi Shams
 
PPT
My slide relational algebra
Rushdi Shams
 
Research Methodology and Tips on Better Research
Rushdi Shams
 
Common evaluation measures in NLP and IR
Rushdi Shams
 
Machine learning with nlp 101
Rushdi Shams
 
Belief function
Rushdi Shams
 
L5 understanding hacking
Rushdi Shams
 
L4 vpn
Rushdi Shams
 
L3 defense
Rushdi Shams
 
L2 Intrusion Detection System (IDS)
Rushdi Shams
 
L1 phishing
Rushdi Shams
 
L2 l3 l4 software process models
Rushdi Shams
 
L1 overview of software engineering
Rushdi Shams
 
Lecture 14,15 and 16 file systems
Rushdi Shams
 
Lecture 11,12 and 13 deadlocks
Rushdi Shams
 
Lecture 1 and 2 processes
Rushdi Shams
 
Lecture 3 and 4 threads
Rushdi Shams
 
Distributed Database Management Systems (Distributed DBMS)
Rushdi Shams
 
My slide relational algebra
Rushdi Shams
 

Recently uploaded (20)

PPTX
2025 Winter SWAYAM NPTEL & A Student.pptx
Utsav Yagnik
 
PPTX
ASRB NET 2023 PREVIOUS YEAR QUESTION PAPER GENETICS AND PLANT BREEDING BY SAT...
Krashi Coaching
 
PDF
Zoology (Animal Physiology) practical Manual
raviralanaresh2
 
PPTX
HYDROCEPHALUS: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
PDF
People & Earth's Ecosystem -Lesson 2: People & Population
marvinnbustamante1
 
PPTX
How to Set Maximum Difference Odoo 18 POS
Celine George
 
PDF
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
DOCX
A summary of SPRING SILKWORMS by Mao Dun.docx
maryjosie1
 
PDF
IMP NAAC-Reforms-Stakeholder-Consultation-Presentation-on-Draft-Metrics-Unive...
BHARTIWADEKAR
 
PPTX
Gall bladder, Small intestine and Large intestine.pptx
rekhapositivity
 
PDF
Dimensions of Societal Planning in Commonism
StefanMz
 
PPTX
How to Configure Access Rights of Manufacturing Orders in Odoo 18 Manufacturing
Celine George
 
PDF
LAW OF CONTRACT ( 5 YEAR LLB & UNITARY LLB)- MODULE-3 - LEARN THROUGH PICTURE
APARNA T SHAIL KUMAR
 
PDF
CHILD RIGHTS AND PROTECTION QUESTION BANK
Dr Raja Mohammed T
 
PPSX
HEALTH ASSESSMENT (Community Health Nursing) - GNM 1st Year
Priyanshu Anand
 
PPTX
Pyhton with Mysql to perform CRUD operations.pptx
Ramakrishna Reddy Bijjam
 
PPTX
Capitol Doctoral Presentation -July 2025.pptx
CapitolTechU
 
PPT
Talk on Critical Theory, Part One, Philosophy of Social Sciences
Soraj Hongladarom
 
PPTX
How to Configure Prepayments in Odoo 18 Sales
Celine George
 
PPSX
Health Planning in india - Unit 03 - CHN 2 - GNM 3RD YEAR.ppsx
Priyanshu Anand
 
2025 Winter SWAYAM NPTEL & A Student.pptx
Utsav Yagnik
 
ASRB NET 2023 PREVIOUS YEAR QUESTION PAPER GENETICS AND PLANT BREEDING BY SAT...
Krashi Coaching
 
Zoology (Animal Physiology) practical Manual
raviralanaresh2
 
HYDROCEPHALUS: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
People & Earth's Ecosystem -Lesson 2: People & Population
marvinnbustamante1
 
How to Set Maximum Difference Odoo 18 POS
Celine George
 
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
A summary of SPRING SILKWORMS by Mao Dun.docx
maryjosie1
 
IMP NAAC-Reforms-Stakeholder-Consultation-Presentation-on-Draft-Metrics-Unive...
BHARTIWADEKAR
 
Gall bladder, Small intestine and Large intestine.pptx
rekhapositivity
 
Dimensions of Societal Planning in Commonism
StefanMz
 
How to Configure Access Rights of Manufacturing Orders in Odoo 18 Manufacturing
Celine George
 
LAW OF CONTRACT ( 5 YEAR LLB & UNITARY LLB)- MODULE-3 - LEARN THROUGH PICTURE
APARNA T SHAIL KUMAR
 
CHILD RIGHTS AND PROTECTION QUESTION BANK
Dr Raja Mohammed T
 
HEALTH ASSESSMENT (Community Health Nursing) - GNM 1st Year
Priyanshu Anand
 
Pyhton with Mysql to perform CRUD operations.pptx
Ramakrishna Reddy Bijjam
 
Capitol Doctoral Presentation -July 2025.pptx
CapitolTechU
 
Talk on Critical Theory, Part One, Philosophy of Social Sciences
Soraj Hongladarom
 
How to Configure Prepayments in Odoo 18 Sales
Celine George
 
Health Planning in india - Unit 03 - CHN 2 - GNM 3RD YEAR.ppsx
Priyanshu Anand
 

Probabilistic logic

  • 1. Rushdi Shams, Dept of CSE, KUET, Bangladesh 1 Knowledge Representation Probabilistic Logic Artificial Intelligence Version 2.0
  • 2. Rushdi Shams, Dept of CSE, KUET, Bangladesh 2 Conditional Probability  Definition of conditional probability: P(a | b) = P(a b) / P(b) if P(b) > 0  Product rule gives an alternative formulation:  P(a b) = P(a | b) P(b) = P(b | a) P(a)
  • 3. Rushdi Shams, Dept of CSE, KUET, Bangladesh 3 Inference with Probability
  • 4. Rushdi Shams, Dept of CSE, KUET, Bangladesh 4 Inference in Probability  P(toothache) = 0.108 + 0.012 + 0.016 + 0.064 = 0.2
  • 5. Rushdi Shams, Dept of CSE, KUET, Bangladesh 5 Inference in Probability  P(cavity V toothache) = 0.108 + 0.012 + 0.072 + .008 + 0.016 + 0.064 = 0.28
  • 6. Rushdi Shams, Dept of CSE, KUET, Bangladesh 6 Inference in Probability  Can also compute conditional probabilities:
  • 7. Rushdi Shams, Dept of CSE, KUET, Bangladesh 7 Inference in Probability  Can also compute conditional probabilities:
  • 8. Rushdi Shams, Dept of CSE, KUET, Bangladesh 8 Baye’s Rule  Product rule gives an alternative formulation: P(a b) = P(a | b) P(b) = P(b | a) P(a) Joining them together, we can find- P(a | b) = P(b | a) P(a) P(b)
  • 9. Rushdi Shams, Dept of CSE, KUET, Bangladesh 9 Application of Bayes’ Rule A doctor knows that the disease meningitis causes the patient to have a stiff neck is 50% Means probability of stiff neck given the probability of having meningitis P(s | m) = 0.5 He also knows that in every 50000 patients, 1 may have meningitis Means probability that a patient has meningitis P (m) = 1/50000 He also knows that in every 20 patients, 1 may have stiff neck Means probability that a patient has meningitis P (m) = 1/20 Then, from Bayes’ rule P(m | s) = P(s | m) P(m) P(s)
  • 10. Rushdi Shams, Dept of CSE, KUET, Bangladesh 10 Application of Bayes’ Rule P(m | s) = P(s | m) P(m) P(s) = 0.5 X (1/50000) 1/20 = 0.0002 Means he can expect only 1 in 5000 patients with a stiff neck to have meningitis
  • 11. Rushdi Shams, Dept of CSE, KUET, Bangladesh 11 References  Artificial Intelligence: A Modern Approach (2nd Edition) by Russell and Norvig Chapter 13