Chapter: 5 Probabilistic Reasoning:
Q) What is certainty factor? – S21(3M)
The Certainty Factor (CF) is a numerical value used in Expert Systems to measure the
degree of confidence or belief in a particular conclusion or hypothesis, based on uncertain or
incomplete information.
🔹 Definition:
The Certainty Factor represents the degree of belief (or disbelief) in an inference made by
the expert system.
It was introduced in the MYCIN Expert System to handle uncertainty in reasoning.
🔹 Range:
CF ∈ [−1, +1]
+1 → Complete certainty that the hypothesis is true
0 → No certainty (unknown)
–1 → Complete certainty that the hypothesis is false
🔹 Formula:
CF(H, E) = 𝑀𝐵(𝐻, 𝐸) − 𝑀𝐷(𝐻, 𝐸)
Where,
MB(H, E) = Measure of Belief in hypothesis H given evidence E
MD(H, E) = Measure of Disbelief in hypothesis H given evidence E
🔹 Interpretation Example:
If an expert says:
“I am 80% sure that symptom Fever indicates disease Malaria.”
Then,
𝐶𝐹(𝑀𝑎𝑙𝑎𝑟𝑖𝑎, 𝐹𝑒𝑣𝑒𝑟) = +0.8
If the expert is 60% sure the symptom does not indicate the disease,
𝐶𝐹(𝑀𝑎𝑙𝑎𝑟𝑖𝑎, 𝐹𝑒𝑣𝑒𝑟) = −0.6
Q) Discuss Bayesian network and its application. – S21(4M)
A Bayesian network is a probabilistic graphical model which represents a set of
variables and their conditional dependencies using a directed acyclic graph.
In a directed acyclic graph, each edge corresponds to a conditional dependency, and
each node corresponds to a unique random variable.
It is also called a Bayes network, belief network, decision network, or Bayesian
model.
Bayesian Network represents the dependency among events and assigning
probabilities to them.
Thus ascertaining how probable or what is the change of occurrence of one event
given the other.
It can be used in various tasks including prediction, anomaly detection, diagnostics,
automated insight, reasoning, time series prediction, and decision making under
uncertainty.
P(C,S,R,W) =
P(C)*P(S|C)*P(R|C,S) *
P(W|C,S,R)
P(C,S,R,W) = 0.99 × 0.1 × 0.8 +
0.90 × 0.1 × 0.2
+0.90 × 0.9 × 0.8 + 0.00 × 0.9 ×
0.2
P(C,S,R,W) = 0.7452
Whether the grass is wet, W, depends on whether the sprinkler has been used, S, or
whether it has rained, R.
Whether the sprinkler is used depends on whether it is cloudy, similarly for whether it
has rained.
The probability of the grass being wet is conditionally independent of it being cloudy,
given information about the sprinklers and whether it has rained.
This joint probability may be expressed as
P(C, S, R, W) = P(C)P(S|C)P(R|C,S)P(W|C,S, R)
It is cloudy, what’s the probability that the grass is wet?
So, we want to compute P(W = T|C = T).
By the chain rule of probability, the joint probability of all the nodes in the graph
above is,
Q) Explain Fuzzy Logic. – W24 (3M)
Fuzzy logic is a set of mathematical principles for knowledge representation based on
degrees of membership rather than on crisp membership of classical binary logic.
Fuzzy logic is a form of many-valued logic in which the truth values of variables may
be any real number between 0 and 1.
By contrast, in Boolean logic, the truth values of variables may only be the integer
values 0 or 1.
Fuzzy logic has been employed to handle the concept of partial truth, where the truth
value may range between completely true and completely false.
Furthermore, when linguistic variables are used, these degrees may be managed by
specific membership functions.
Such methods have been used in control systems for devices like trains, AC, and
washing machines.
The concepts of Fuzzy Logic are extensively applied in business, finance, aerospace,
defense, etc.
Q) Write about various defuzzification methods. – S21, W23(7M)
Defuzzification is the process of converting fuzzy values (from fuzzy logic systems) into
crisp, actionable values. Here are some common methods:
1. Centroid Method (Center of Gravity):
Description: Calculates the center of gravity (or centroid) of the fuzzy set.
Process: Integrates the product of the membership function and the variable value,
then divides by the total membership value.
2. Mean of Maximum (MOM):
Description: Uses the average of the maximum membership values.
Process: Finds the value of xxx where the membership function is at its maximum,
then calculates the mean of these values if there are multiple.
3. Maximum Membership Principle:
Description: Selects the value of xxx with the highest membership value.
Process: Identifies the value with the greatest degree of membership in the fuzzy set
4. Weighted Average:
Description: Computes a weighted average of the possible values, weighted by their
membership values.
Process: Multiplies each value by its membership degree and sums these products,
then divides by the sum of the membership values.
5. Largest of Maximum (LOM):
Description: Chooses the largest value among those with the highest membership
values.
Q) Explain Probability and Bay’s Theorem. –W22 (3M)
Probability measures the likelihood of an event occurring, quantified between 0 and 1. It
helps in predicting outcomes based on known information.
1
Example: If you roll a fair six-sided die, the probability of rolling a 3 is .
6
Bayes’ Theorem:
Bayes’ Theorem updates the probability of an event based on new evidence. It combines prior
knowledge with new data to improve predictions.
Formula:
𝑃(𝐵 ∣ 𝐴) ⋅ 𝑃(𝐴)
𝑃(𝐴 ∣ 𝐵) =
𝑃(𝐵)
Where:
𝑃(𝐴 ∣ 𝐵): Probability of A given B (posterior).
𝑃(𝐵 ∣ 𝐴): Probability of B given A (likelihood).
𝑃(𝐴): Initial probability of A (prior).
𝑃(𝐵): Total probability of B (normalizing constant).
Example:
If you know that a patient has a symptom (event B), Bayes’ Theorem helps calculate the
probability of having a disease (event A) based on the symptom’s likelihood and the disease’s
overall prevalence.
Q) State the Bayes theorem. Illustrate how a Bayesian Network can be used to represent
causality relationship among attributes. –S23, S25 (7M)
Bayes Theorem is above and
Bayesian Network
Bayesian Networks are graphical models that represent probabilistic relationships among a
set of variables using a directed acyclic graph (DAG). Each node represents a variable, and
the edges represent conditional dependencies. They are useful for modeling causality and
dependencies among attributes.
Example:
Nodes:
o Disease: DDD (e.g., Flu: Yes or No)
o Symptom: SSS (e.g., Cough: Yes or No)
o Test Result: TTT (e.g., Positive Test: Yes or No)
Edges:
o Disease → Symptom: If you have the disease, you're likely to have the
symptom.
o Disease → Test Result: If you have the disease, the test result is likely to be
positive.
Bayesian Applications:
1. Medical Diagnosis
2. Spam Filtering
3. Weather Prediction
4. Financial Risk Assessment
5. Decision Support Systems
6. Machine Learning
7. Robot Navigation
Q) Compare Fuzzy Vs Crisp Logic. –S23 (3M)
Sr No. Fuzzy Logic Crisp Logic
1 It has imprecise properties. It has precise properties.
2 It has partial membership. It has full membership.
3 It has Fuzzy Sets. It has Crisp Sets.
4 The degree of truth 0 & 1. The degree of truth is 0 or 1.
5 It is infinite valued function logic. It is bi-valued function logic.
6 Example: She is about 18 years old. Example: She is 18 years old.
Q) Explain Inference Rules in Propositional Calculus. –W23 (4M)
Inference rules are logical rules used to deduce new propositions (conclusions) from existing
propositions (premises).
They are fundamental in Propositional Calculus (Propositional Logic) for deriving valid
conclusions from given statements.
Common Inference Rules:
1. Modus Ponens (Law of Detachment)
o Rule: If P → Q and P are both true, then Q is true.
o Example:
If it rains (P), then the ground gets wet (Q).
It rains (P).
∴ The ground gets wet (Q).
2. Modus Tollens (Law of Contrapositive)
o Rule: If P → Q and ¬Q are true, then ¬P is true.
o Example:
If it rains (P), then the ground gets wet (Q).
The ground is not wet (¬Q).
∴ It did not rain (¬P).
3. Hypothetical Syllogism
o Rule: If P → Q and Q → R, then P → R.
o Example:
If it rains (P), the ground gets wet (Q).
If the ground gets wet (Q), the grass grows (R).
∴ If it rains (P), the grass grows (R).
4. Disjunctive Syllogism
o Rule: If P ∨ Q and ¬P are true, then Q is true.
o Example:
It is either raining (P) or cloudy (Q).
It is not raining (¬P).
∴ It is cloudy (Q).
5. Addition (∨ Introduction)
o Rule: From P, infer P ∨ Q.
o Example:
It is raining (P).
∴ It is raining or snowing (P ∨ Q).
6. Simplification (∧ Elimination)
o Rule: From P ∧ Q, infer P (or Q).
o Example:
It is raining and cold (P ∧ Q).
∴ It is raining (P).
7. Conjunction (∧ Introduction)
o Rule: From P and Q, infer P ∧ Q.
o Example:
It is raining (P).
It is cold (Q).
∴ It is raining and cold (P ∧ Q).
8. Resolution Rule
o Rule: From P ∨ Q and ¬P ∨ R, infer Q ∨ R.
o Example:
It is raining or cold (P ∨ Q).
It is not raining or windy (¬P ∨ R).
∴ It is cold or windy (Q ∨ R).
Q) Demonstrate the use of Repeat Predicate in Prolog with example. –W22
The repeat predicate in Prolog is a built-in control predicate used to create loops or
repeated execution of goals.
It always succeeds when first called and on backtracking, it succeeds again — infinitely
many times.
This allows Prolog to repeat a goal until a certain condition is met (often stopped using the
cut (!) and fail predicates).
Syntax: repeat.
The repeat predicate always succeeds and can be used in combination with other predicates to
implement looping behavior.
Example:
loop_example :-
repeat,
write('Hello!'), nl,
fail.
Explanation:
repeat makes Prolog start a loop.
write('Hello!') prints “Hello!”.
fail forces it to go back and repeat forever.
Output:
Hello!
Hello!
Hello!
... (keeps repeating)
Approaches to Reasoning
There are three different approaches to reasoning under uncertainties.
1. Symbolic Reasoning
2. Statistical Reasoning
3. Fuzzy logic Reasoning
1. Symbolic Reasoning : Symbolic logic deals with how symbols relate to each other. It
assigns symbols to verbal reasoning in order to be able to check the validity of the
statements through a mathematical process.
Propositions:
A : All spiders have eight legs.
B : Black widows are a type of spider.
C : Black widows have eight legs.
The Ʌ means “and,” and the ⇒ symbol means “implies.”
Conclusion: A Ʌ B ⇒ C
The reasoning is said to be symbolic when it can be performed by means of primitive
operations manipulating elementary symbols.
Usually, symbolic reasoning refers to mathematical logic, more precisely first-order
(predicate) logic and sometimes higher orders.
Statistical Reasoning
In the logic based approaches described, we have assumed that everything is either
believed false or believed true.
However, it is often useful to represent the fact that we believe, something is probably
true, or true with probability 0.65.
This is useful for dealing with problems where there is randomness and
unpredictability (such as in games of chance) and also for dealing with problems
where we could, if we had sufficient information, work out exactly what is true.
To do all this in a principled way requires techniques for probabilistic reasoning.
Probability quantifies the uncertainty of the outcomes of a random variable / event.
Real world applications are probabilistic in nature, and to represent the relationship between
multiple events, we need a Bayesian network.