SlideShare uma empresa Scribd logo
1 de 11
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

Mais conteúdo relacionado

Mais procurados

Asymptotic notations
Asymptotic notationsAsymptotic notations
Asymptotic notations
Ehtisham Ali
 
Multi-agent systems
Multi-agent systemsMulti-agent systems
Multi-agent systems
R A Akerkar
 

Mais procurados (20)

Prolog
PrologProlog
Prolog
 
LDA Beginner's Tutorial
LDA Beginner's TutorialLDA Beginner's Tutorial
LDA Beginner's Tutorial
 
Design and Analysis of Algorithms.pptx
Design and Analysis of Algorithms.pptxDesign and Analysis of Algorithms.pptx
Design and Analysis of Algorithms.pptx
 
Vertex cover Problem
Vertex cover ProblemVertex cover Problem
Vertex cover Problem
 
CS571: Language Models
CS571: Language ModelsCS571: Language Models
CS571: Language Models
 
Np cooks theorem
Np cooks theoremNp cooks theorem
Np cooks theorem
 
Graph coloring problem
Graph coloring problemGraph coloring problem
Graph coloring problem
 
Asymptotic notations
Asymptotic notationsAsymptotic notations
Asymptotic notations
 
AI_Session 10 Local search in continious space.pptx
AI_Session 10 Local search in continious space.pptxAI_Session 10 Local search in continious space.pptx
AI_Session 10 Local search in continious space.pptx
 
03 Machine Learning Linear Algebra
03 Machine Learning Linear Algebra03 Machine Learning Linear Algebra
03 Machine Learning Linear Algebra
 
Loss Functions for Deep Learning - Javier Ruiz Hidalgo - UPC Barcelona 2018
Loss Functions for Deep Learning - Javier Ruiz Hidalgo - UPC Barcelona 2018Loss Functions for Deep Learning - Javier Ruiz Hidalgo - UPC Barcelona 2018
Loss Functions for Deep Learning - Javier Ruiz Hidalgo - UPC Barcelona 2018
 
And then there were ... Large Language Models
And then there were ... Large Language ModelsAnd then there were ... Large Language Models
And then there were ... Large Language Models
 
Optics ordering points to identify the clustering structure
Optics ordering points to identify the clustering structureOptics ordering points to identify the clustering structure
Optics ordering points to identify the clustering structure
 
Artificial Intelligence
Artificial IntelligenceArtificial Intelligence
Artificial Intelligence
 
Artificial Intelligence - Reasoning in Uncertain Situations
Artificial Intelligence - Reasoning in Uncertain SituationsArtificial Intelligence - Reasoning in Uncertain Situations
Artificial Intelligence - Reasoning in Uncertain Situations
 
L03 ai - knowledge representation using logic
L03 ai - knowledge representation using logicL03 ai - knowledge representation using logic
L03 ai - knowledge representation using logic
 
First order logic
First order logicFirst order logic
First order logic
 
ProLog (Artificial Intelligence) Introduction
ProLog (Artificial Intelligence) IntroductionProLog (Artificial Intelligence) Introduction
ProLog (Artificial Intelligence) Introduction
 
4. Linear Algebra for Machine Learning: Eigenvalues, Eigenvectors and Diagona...
4. Linear Algebra for Machine Learning: Eigenvalues, Eigenvectors and Diagona...4. Linear Algebra for Machine Learning: Eigenvalues, Eigenvectors and Diagona...
4. Linear Algebra for Machine Learning: Eigenvalues, Eigenvectors and Diagona...
 
Multi-agent systems
Multi-agent systemsMulti-agent systems
Multi-agent systems
 

Destaque (13)

L1 l2 l3 introduction to machine translation
L1 l2 l3  introduction to machine translationL1 l2 l3  introduction to machine translation
L1 l2 l3 introduction to machine translation
 
L13 why software fails
L13  why software failsL13  why software fails
L13 why software fails
 
L15 fuzzy logic
L15  fuzzy logicL15  fuzzy logic
L15 fuzzy logic
 
Knowledge representation
Knowledge representationKnowledge representation
Knowledge representation
 
Lecture 5, 6 and 7 cpu scheduling
Lecture 5, 6 and 7  cpu schedulingLecture 5, 6 and 7  cpu scheduling
Lecture 5, 6 and 7 cpu scheduling
 
Semi-supervised classification for natural language processing
Semi-supervised classification for natural language processingSemi-supervised classification for natural language processing
Semi-supervised classification for natural language processing
 
Weka
WekaWeka
Weka
 
Lecture 7, 8, 9 and 10 Inter Process Communication (IPC) in Operating Systems
Lecture 7, 8, 9 and 10  Inter Process Communication (IPC) in Operating SystemsLecture 7, 8, 9 and 10  Inter Process Communication (IPC) in Operating Systems
Lecture 7, 8, 9 and 10 Inter Process Communication (IPC) in Operating Systems
 
Knowledge structure
Knowledge structureKnowledge structure
Knowledge structure
 
Propositional logic
Propositional logicPropositional logic
Propositional logic
 
Natural Language Processing: Parsing
Natural Language Processing: ParsingNatural Language Processing: Parsing
Natural Language Processing: Parsing
 
Syntax and semantics
Syntax and semanticsSyntax and semantics
Syntax and semantics
 
Types of machine translation
Types of machine translationTypes of machine translation
Types of machine translation
 

Mais de Rushdi Shams

L5 understanding hacking
L5  understanding hackingL5  understanding hacking
L5 understanding hacking
Rushdi Shams
 
L2 Intrusion Detection System (IDS)
L2  Intrusion Detection System (IDS)L2  Intrusion Detection System (IDS)
L2 Intrusion Detection System (IDS)
Rushdi Shams
 
L2 l3 l4 software process models
L2 l3 l4  software process modelsL2 l3 l4  software process models
L2 l3 l4 software process models
Rushdi Shams
 
L1 overview of software engineering
L1  overview of software engineeringL1  overview of software engineering
L1 overview of software engineering
Rushdi Shams
 
Lecture 14,15 and 16 file systems
Lecture 14,15 and 16  file systemsLecture 14,15 and 16  file systems
Lecture 14,15 and 16 file systems
Rushdi Shams
 
Lecture 11,12 and 13 deadlocks
Lecture 11,12 and 13  deadlocksLecture 11,12 and 13  deadlocks
Lecture 11,12 and 13 deadlocks
Rushdi Shams
 
Lecture 1 and 2 processes
Lecture 1 and 2  processesLecture 1 and 2  processes
Lecture 1 and 2 processes
Rushdi Shams
 
Lecture 3 and 4 threads
Lecture 3 and 4  threadsLecture 3 and 4  threads
Lecture 3 and 4 threads
Rushdi Shams
 
Distributed Database Management Systems (Distributed DBMS)
Distributed Database Management Systems (Distributed DBMS)Distributed Database Management Systems (Distributed DBMS)
Distributed Database Management Systems (Distributed DBMS)
Rushdi Shams
 
My slide relational algebra
My slide  relational algebraMy slide  relational algebra
My slide relational algebra
Rushdi Shams
 

Mais de Rushdi Shams (18)

Research Methodology and Tips on Better Research
Research Methodology and Tips on Better ResearchResearch Methodology and Tips on Better Research
Research Methodology and Tips on Better Research
 
Common evaluation measures in NLP and IR
Common evaluation measures in NLP and IRCommon evaluation measures in NLP and IR
Common evaluation measures in NLP and IR
 
Machine learning with nlp 101
Machine learning with nlp 101Machine learning with nlp 101
Machine learning with nlp 101
 
First order logic
First order logicFirst order logic
First order logic
 
Belief function
Belief functionBelief function
Belief function
 
L5 understanding hacking
L5  understanding hackingL5  understanding hacking
L5 understanding hacking
 
L4 vpn
L4  vpnL4  vpn
L4 vpn
 
L3 defense
L3  defenseL3  defense
L3 defense
 
L2 Intrusion Detection System (IDS)
L2  Intrusion Detection System (IDS)L2  Intrusion Detection System (IDS)
L2 Intrusion Detection System (IDS)
 
L1 phishing
L1  phishingL1  phishing
L1 phishing
 
L2 l3 l4 software process models
L2 l3 l4  software process modelsL2 l3 l4  software process models
L2 l3 l4 software process models
 
L1 overview of software engineering
L1  overview of software engineeringL1  overview of software engineering
L1 overview of software engineering
 
Lecture 14,15 and 16 file systems
Lecture 14,15 and 16  file systemsLecture 14,15 and 16  file systems
Lecture 14,15 and 16 file systems
 
Lecture 11,12 and 13 deadlocks
Lecture 11,12 and 13  deadlocksLecture 11,12 and 13  deadlocks
Lecture 11,12 and 13 deadlocks
 
Lecture 1 and 2 processes
Lecture 1 and 2  processesLecture 1 and 2  processes
Lecture 1 and 2 processes
 
Lecture 3 and 4 threads
Lecture 3 and 4  threadsLecture 3 and 4  threads
Lecture 3 and 4 threads
 
Distributed Database Management Systems (Distributed DBMS)
Distributed Database Management Systems (Distributed DBMS)Distributed Database Management Systems (Distributed DBMS)
Distributed Database Management Systems (Distributed DBMS)
 
My slide relational algebra
My slide  relational algebraMy slide  relational algebra
My slide relational algebra
 

Último

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Último (20)

How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 

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