Artificial Intelligence
ADC503
Prof. Smita S. Mane
Asst. Prof.
Dept. of AI & DS,
VESIT,Chembur
Chapter – 05
Reasoning Under Uncertainty
5 Reasoning Under Uncertainty
Handling Uncertain Knowledge, Random Variables,
Prior and Posterior Probability, Inference using Full
Joint Distribution
Bayes' Rule and its use, Bayesian Belief Networks,
Reasoning in Belief Networks
Uncertainty
● An uncertain domain in artificial intelligence (AI) refers to a field or
environment where the information available is incomplete,
ambiguous, noisy, or inherently unpredictable.
● Unlike deterministic domains where outcomes can be predicted with
certainty given the inputs, uncertain domains require AI systems to
handle and reason about uncertainty in a structured manner.
● sources of uncertainty in AI:
Random variables
● Random variables are a way to represent uncertainty in artificial
intelligence (AI) by mapping the outcomes of a process to
numerical values. They can be used to represent the outcome of
an experiment that hasn't been performed yet, or a value that is
currently uncertain.
Characteristics of Uncertain Domains
● Incomplete Information: The system does not have
access to all the data required to make a fully
informed decision.
● Ambiguity: Information might be unclear or open to
multiple interpretations.
● Noise: Data might be corrupted or imprecise due to
measurement errors or external factors.
● Stochastic Processes: The environment might involve
random processes or events.
Importance of Handling Uncertainty
● Make informed decisions based on probabilistic
reasoning.
● Adapt to new information and changing
environments.
● Provide robust and reliable performance in complex
scenarios.
Strategies used to handle
Uncertainty
● Probabilistic Models: AI systems can incorporate
probabilistic models to represent uncertainty. Instead of
providing a single, deterministic answer, these models
assign probabilities to different outcomes.
● Uncertainty Quantification: AI systems should be
capable of quantifying uncertainty. This involves
estimating the likelihood of different outcomes or the
confidence level associated with a particular decision.
● Continuous Learning and Adaptation: AI systems
should be able to adapt and improve over time by
continuously learning from new data. This adaptive
learning process can help AI models better cope with
1)Probabilistic reasoning
● It involves using probability theory to make decisions and draw
conclusions based on uncertain or incomplete information.
● It's a way for AI systems to handle uncertainty and make educated
guesses rather than giving definitive answers.For Example:
● AI weather app that uses probabilistic reasoning.
● When you check the app, it doesn't just give you a single weather
forecast (e.g., "It will rain today"). Instead, it provides a probability-
based forecast like this:
● "There's a 70% chance of rain today."
● "There's a 30% chance of sunshine."
● Instead of making binary (yes/no) decisions, AI acknowledges and
quantifies uncertainty by expressing probabilities.
● For instance, it might say, "There's an 80% chance it's true,"
indicating the level of confidence in an outcome.
2) Bayesian Network
● Bayesian probability theory is a common framework used in
probabilistic reasoning. It involves updating probabilities as new
evidence becomes available.
● For example, if a medical test is 90% accurate and yields a
positive result, Bayesian reasoning allows for adjusting the
probability of having a disease based on this new information
Bayesian Network
● Machine Learning: In machine learning, it's used for Bayesian
inference and probabilistic modeling. For instance, it's
employed in Bayesian networks, which are graphical models
that represent probabilistic relationships among variables.
● Natural Language Processing: Bayes' Theorem can be used in
text classification tasks, such as spam detection, sentiment
analysis, and language modeling.
● Medical Diagnosis: Bayes' Theorem helps doctors update the
probability of a patient having a disease based on the results
of medical tests and the patient's symptoms.
Bayesian Network
● Autonomous Systems: In autonomous systems like self-driving
cars, Bayes' Theorem is used for sensor fusion and decision-
making under uncertainty.
● Recommendation Systems: It can be applied in recommendation
engines to improve the accuracy of personalized
recommendations by updating user preferences based on their
interactions and feedback.
3) Rule-based systems
● Rule-based systems use a set of conditional rules to make decisions
or draw conclusions.
● These rules consist of conditions and corresponding actions.
● The system evaluates conditions and triggers actions based on the
conditions that are satisfied.
● Example: In a weather forecasting system, a rule might be: If the
sky is cloudy and the temperature is below 10°C, then predict rain.
● The system checks the conditions (cloudy sky and low temperature)
and triggers the action (predicting rain) if both conditions are met.
● Bayesian Networks in AI
4) Markov Decision Processes
● Markov Decision Processes (MDPs) provide a framework for
modeling decision-making in environments with stochastic
dynamics.
● MDPs consist of states, actions, transition probabilities, and
rewards, enabling the computation of optimal policies for decision-
making.
● Example: An autonomous robot navigating a grid world can use
an MDP to determine the optimal path to its destination while
accounting for uncertain movements and rewards.
5) Fuzzy Logic
● Fuzzy logic is an approach to reasoning that deals with approximate rather
than fixed and exact values. Unlike traditional binary logic, fuzzy logic
variables can have a truth value that ranges between 0 and 1, representing
the degree of truth.
● Fuzzy Sets and Membership Functions
● Fuzzy sets allow for the representation of concepts with vague boundaries.
Each element in a fuzzy set has a membership value indicating its degree of
belonging to the set.putation of optimal policies for decision-making.
● Example: In a temperature control system, the concept of “warm” can
be represented as a fuzzy set with a membership function assigning
values between 0 (not warm) and 1 (completely warm) to different
temperatures.
Applications of Uncertain
Knowledge Representation
● Medical Diagnosis: Probabilistic models like Bayesian networks are used
to diagnose diseases based on symptoms and medical history.
● Autonomous Vehicles: Fuzzy logic and MDPs help autonomous vehicles
navigate and make decisions in dynamic environments.
● Natural Language Processing: probabilistic context-free grammars are
used for tasks like speech recognition and language modeling.
● Robotics: Robots use probabilistic reasoning to handle sensor noise and
uncertain environments for navigation and manipulation tasks.
● Finance: Probabilistic models are employed for risk assessment, fraud
detection, and market prediction.
Chapter – 05
Reasoning Under Uncertainty
5 Reasoning Under Uncertainty
Handling Uncertain Knowledge, Random
Variables, Prior and Posterior Probability,
Inference using Full Joint Distribution
Bayes' Rule and its use, Bayesian Belief Networks,
Reasoning in Belief Networks
Prior probability
● Prior probability is defined as the initial assessment or the
likelihood of the event or an outcome before any new data is
considered.
● In simple words, it tells us about what we know based on previous
knowledge or experience.
● E:g: - The prior probability could be the distribution of voters who
will support a particular candidate in a future election.
Posterior probability
● Posterior probability is a conditional probability that is used to
calculate the likelihood of an event occurring after new
information is available.
● Posterior probability is used to make predictions and decisions
based on observed data.
● For example, if you are trying to classify buyers of a specific car, you
might know that 60% of buyers are male and 40% are female. You
can use this prior probability to calculate the posterior probability
of assigning buyers to groups.
Bayes' Rule
● Bayesian probability theory is a common framework used in
probabilistic reasoning. It involves updating probabilities as new
evidence becomes available.
● For example, if a medical test is 90% accurate and yields a
positive result, Bayesian reasoning allows for adjusting the
probability of having a disease based on this new information
Bayes' Rule
● Mathematically, Bayes theorem is expressed as:
P(A | B) = (P(B | A) * P(A)) / P(B)
● P(A | B) is the posterior probability, the likelihood of event A
happening given that event B has already occurred.
● P(B | A) is the likelihood, the probability of observing B if A is
true.
● P(A) is the prior probability, our initial belief about the chance of
event A occurring.
● P(B) is the total probability of event B happening (irrespective of
A).
Bayes' Rule
● Bayesian probability theory is a common framework used in
probabilistic reasoning. It involves updating probabilities as new
evidence becomes available.
● For example, if a medical test is 90% accurate and yields a
positive result, Bayesian reasoning allows for adjusting the
probability of having a disease based on this new information
Benefits of Bayes theorem
● Continuous Learning: By incorporating new data and evidence,
models using Bayes’ theorem can constantly improve their
performance.
● Handling Uncertainty: Bayes’ theorem explicitly addresses
uncertainty in data, making it suitable for real-world scenarios
with incomplete information.
● Interpretability: The underlying logic of Bayes’ theorem is
relatively easy to understand, allowing for better interpretation
of model predictions.
Applications of Bayes theorem in AI
1) Spam Filtering: spam filters leverage Bayes’ theorem to
effectively categorize emails.
2) Image Classification: Image recognition systems can use
Bayes’ theorem to assign probabilities to different object
categories in an image.
3) Recommendation Systems: Recommendation engines
can utilize Bayes’ theorem to personalize suggestions
based on a user’s past behavior and preferences.
Applications of Bayes theorem in AI
4) Anomaly Detection: Identifying unusual patterns in data
(e.g., fraudulent credit card transactions) often involves
Bayes’ theorem to calculate the likelihood of an event being
anomalous.
5) Sentiment Analysis: Analyzing the sentiment of text data
(positive, negative, or neutral) can be enhanced with Bayes’
theorem by considering the context and prior knowledge
about sentiment-related words.
Applications of Bayes theorem in AI
6) Natural Language Processing (NLP): Beyond sentiment analysis, NLP
tasks like machine translation and part-of-speech tagging can benefit
from Bayes’ theorem. It can help determine the most likely translation
for a sentence or the most probable part of speech for a word based
on surrounding words and context.
7) Medical Diagnosis: While not a replacement for medical expertise,
Bayes’ theorem can be used in conjunction with patient data and
medical history to calculate the probability of a specific disease. This
can aid doctors in making informed decisions and prioritizing further
tests.
Applications of Bayes theorem in AI
8) Robot Navigation: Robots navigating complex environments can
leverage Bayes’ theorem to update their understanding of the
surroundings based on sensor data. This helps them adapt to changes
and avoid obstacles more effectively.
9) Self-Driving Cars: Similar to robot navigation, self-driving cars utilize
Bayes’ theorem to interpret sensor data (like LiDAR or cameras) and
make real-time decisions about steering, braking, and lane changes
while considering uncertainties in the environment.
Bayes' Rule
Bayesian Belief Networks
Bayesian Belief Networks