0% found this document useful (0 votes)
12 views27 pages

Reasoning with Uncertainty Explained

The document discusses reasoning under uncertainty, focusing on the causes of uncertainty, probabilistic reasoning, and the use of random variables. It explains concepts such as prior and posterior probabilities, Bayes' theorem, and Bayesian belief networks, highlighting their applications in decision making, prediction, and anomaly detection. The document also provides examples to illustrate these concepts and their practical implications.

Uploaded by

aman.236167101
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views27 pages

Reasoning with Uncertainty Explained

The document discusses reasoning under uncertainty, focusing on the causes of uncertainty, probabilistic reasoning, and the use of random variables. It explains concepts such as prior and posterior probabilities, Bayes' theorem, and Bayesian belief networks, highlighting their applications in decision making, prediction, and anomaly detection. The document also provides examples to illustrate these concepts and their practical implications.

Uploaded by

aman.236167101
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

MODULE 5.

REASONING UNDER
UNCERTAINTY

Mrs. Rujuta Vartak

1
UNCERTAINTY

2
REASONING

• To develop a system that reasons with uncertainty means to provide :


• 1. An explanation about the origin and the nature of uncertainty
• 2. To represent uncertainty in a formal language
• 3. A set of inference rules that derive uncertain conclusions
• 4. An efficiency memory control mechanism for uncertainty management

3
CAUSES OF UNCERTAINTY:

• Following are some leading causes of uncertainty to occur in the real world.
1. Information occurred from unreliable sources.
2. Experimental Errors
3. Equipment fault
4. Temperature variation
5. Climate change.

4
HANDLING UNCERTAIN KNOWLEDGE

• Probabilistic reasoning is a way of knowledge representation where we apply


the concept of probability to indicate the uncertainty knowledge

5
RANDOM VARIABLES

• A random variable is a mathematical function that links a distinct numerical value to each
experiment result. It can accept any one of the several possible values, making it a variable. Since
each possible value carries some element of chance, it is random.
• Example:
• If you flip a coin twice, for instance, the following describes the sample space for the potential
outcomes:
• S={HH,HT,TH,TT}
• Random variables come in two different varieties.
• Continuous random variables and discrete random variables

6
CONTINUOUS RANDOM VARIABLE

• Random variable’s opposite is continuous random variable. Continuous


random variables can have any value, including decimals and fractions.
Continuous probability distributions result from continuous random
variables.
• Examples:
• Task completion time
• Height, weight

7
DISCRETE RANDOM VARIABLES

• Discrete refers to something distinct and unique. Therefore, discrete


random variables are only capable of taking on integer values. Decimals
and fractions are never included. Discrete probability distributions
result from discrete random variables.
• Is one which may take on only a countable number of distinct values
• Examples:
• Total of roll of two dice:2,3,….12

8
PRIOR AND POSTERIOR PROBABILITY

• Prior probability: The prior probability of an event is probability computed


before observing new information.
• Posterior Probability: The probability that is calculated after all evidence or
information has taken into account. It is a combination of prior probability and
new information.

9
INFERENCE USING FULL JOINT
DISTRIBUTION
• Probability of all possible worlds can be described using a table called a full
joint probability distribution – the elements are indexed by values of random
variables

The full joint probability distribution specifies the probability of each complete
assignment of values to random variables. It is usually too large to create or use in its
explicit form, but when it is available it can be used to answer queries simply by adding
up entries for the possible worlds corresponding to the query propositions.

10
• Marginalizatiion / summing out: The process of extract the distribution over some subset
of variables or a single variable (to get the marginal probability), by summing up the
probabilities for each possible value of the other variables, thereby taking them out of the
equation.
• e.g. P(Cavity) = 0.108 + 0.012 + 0.072 + 0.008 = 0.2

• P(cavity ∨ toothache) = 0.108+0.012+0.072+0.008+0.016+0.064 = 0.28


• P(¬cavity|toothache) = P(¬cavity ∧ toothache) / P(toothache)
= (0.016 + 0.064) / (0.108 + 0.012 + 0.016 + 0.064) = 0.4

11
NORMALIZATION

12
BAYES’ RULE

• 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 is a method to determine conditional probabilities – that is,
the probability of one event occurring given that another event has already
occurred. Because a conditional probability includes additional conditions – in
other words, more data – it can contribute to more accurate results.

13
BAYS’ RULE EQUATION

likelihood

prior

data

hypothesis marginal 14
• Bayes' Rule lets you calculate the posterior (or "updated") probability. This is a conditional probability. It is the probability
of the hypothesis being true, if the evidence is present.

• Think of the prior (or "previous") probability as your belief in the hypothesis before seeing the new evidence. If you had a
strong belief in the hypothesis already, the prior probability will be large.

• The prior is multiplied by a fraction. Think of this as the "strength" of the evidence. The posterior probability is greater
when the top part (numerator) is big, and the bottom part (denominator) is small.

• The numerator is the likelihood. This is another conditional probability. It is the probability of the evidence being present,
given the hypothesis is true.

• This is not the same as the posterior!

• Remember, the "probability of the evidence being present given the hypothesis is true" is not the same as the "probability
of the hypothesis being true given the evidence is present".

• Now look at the denominator. This is the marginal probability of the evidence. That is, it is the probability of the evidence
being present, whether the hypothesis is true or false. The smaller the denominator, the more "convincing" the evidence.
15
EXAMPLE

• 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:

16
• P(king): probability that the card is King= 4/52= 1/13

• P(face): probability that a card is a face card= 12/52=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:

17
APPLICATION 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.

18
BAYESIAN BELIEF NETWORK

• Bayesian belief network is key computer technology for dealing with probabilistic
events and to solve a problem which has uncertainty. We can define a Bayesian
network as:

• "A Bayesian network is a probabilistic graphical model which represents a set of


variables and their conditional dependencies using a directed acyclic graph."

• It is also called a Bayes network, belief network, decision network, or Bayesian model.

• Bayesian networks are probabilistic, because these networks are built from a
probability distribution, and also use probability theory for prediction and anomaly
detection. 19
• Real world applications are probabilistic in nature, and to represent the relationship between multiple events, we
need a Bayesian network. It can also be used in various tasks including prediction, anomaly detection, diagnostics,
automated insight, reasoning, time series prediction, and decision making under uncertainty.
• Bayesian Network can be used for building models from data and experts opinions, and it consists of two parts:

• Directed Acyclic Graph


• Table of conditional probabilities.
• The generalized form of Bayesian network that represents and solve decision problems under uncertain knowledge
is known as an Influence diagram.
• Bayesian network is based on Joint probability distribution and conditional probability. So let's first understand the
joint probability distribution:

20
• Joint probability distribution:
• If we have variables x1, x2, x3,....., xn, then the probabilities of a different combination of x1, x2, x3.. xn, are known as
Joint probability distribution.

• P[x1, x2, x3,....., xn], it can be written as the following way in terms of the joint probability distribution.

• = P[x1| x2, x3,....., xn]P[x2, x3,....., xn]

• = P[x1| x2, x3,....., xn]P[x2|x3,....., xn]....P[xn-1|xn]P[xn].

• In general for each variable Xi, we can write the equation as:

• P(Xi|Xi-1,........., X1) = P(Xi |Parents(Xi ))

21
EXAMPLE

• Harry installed a new burglar alarm at his home to detect burglary. The alarm reliably responds at
detecting a burglary but also responds for minor earthquakes. Harry has two neighbors David and
Sophia, who have taken a responsibility to inform Harry at work when they hear the alarm. David
always calls Harry when he hears the alarm, but sometimes he got confused with the phone ringing
and calls at that time too. On the other hand, Sophia likes to listen to high music, so sometimes she
misses to hear the alarm. Here we would like to compute the probability of Burglary Alarm.
• Problem:
• Calculate the probability that alarm has sounded, but there is neither a burglary, nor an earthquake
occurred, and David and Sophia both called the Harry.

22
23
• Let's take the observed probability for the Burglary and earthquake component:

• P(B= True) = 0.002, which is the probability of burglary.

• P(B= False)= 0.998, which is the probability of no burglary.

• P(E= True)= 0.001, which is the probability of a minor earthquake

• P(E= False)= 0.999, Which is the probability that an earthquake not occurred.

24
• The Conditional probability of Alarm A
depends on Burglar and earthquake

P(S, D, A, ¬B, ¬E) = P (S|A) *P (D|A)*P (A|¬B ^ ¬E) *P (¬B) *P (¬E).


= 0.75* 0.91* 0.001* 0.998*0.999
= 0.00068045.
Hence, a Bayesian network can answer any query

25
APPLICATIONS OF BAYESIAN NETWORKS IN AI

• Prediction and classification: Bayesian belief networks can be used to predict the probability of an event or classify
data into different categories based on a set of inputs. This is useful in areas such as fraud detection, medical diagnosis,
and image recognition.
• Decision making: Bayesian networks can be used to make decisions based on uncertain or incomplete information.
For example, they can be used to determine the optimal route for a delivery truck based on traffic conditions and
delivery schedules.
• Risk analysis: Bayesian belief networks can be used to analyze the risks associated with different actions or events.
This is useful in areas such as financial planning, insurance, and safety analysis.
• Anomaly detection: Bayesian networks can be used to detect anomalies in data, such as outliers or unusual patterns.
This is useful in areas such as cybersecurity, where unusual network traffic may indicate a security breach.
• Natural language processing: Bayesian belief networks can be used to model the probabilistic relationships between
words and phrases in natural language, which is useful in applications such as language translation and sentiment
analysis.

26
THANK YOU

27

You might also like