Unit 4( Probabilistic Reasoning)
Unit 4( Probabilistic Reasoning)
Probabilistic Reasoning
• Non-Monotonic Reasoning, Default
Reasoning, Statistical Reasoning: Probability
and Bayes’ theorem, Certainty factors and
Rule- based systems, Bayesian networks,
Dempster-Shafer theory & Fuzzy logic.
Probabilistic reasoning:
• In the real world, there are lots of scenarios, where the certainty of
something is not confirmed, such as "It will rain today," "behavior of
someone for some situations," "A match between two teams or
two players." These are probable sentences for which we can
assume that it will happen but not sure about it, so here we use
probabilistic reasoning
Need of probabilistic reasoning in AI:
• When there are unpredictable outcomes.
• When specifications or possibilities of predicates
becomes too large to handle.
• When an unknown error occurs during an
experiment.
In probabilistic reasoning, there are two ways to
solve problems with uncertain knowledge:
• Bayes' rule
• Bayesian Statistics
Reasoning in Artificial intelligence
• Bayes theorem (also known as the Bayes Rule or Bayes Law) is used to
determine the conditional probability of event A when event B has already
occurred.
• where,
• P(A) and P(B) are the probabilities of events A and B
• P(A|B) is the probability of event A when event B happens
• P(B|A) is the probability of event B when A happens
Bayes Theorem Statement
where,
P(A) and P(B) are the probabilities of events A and B also P(B) is never
equal to zero.
P(A|B) is the probability of event A when event B happens
P(B|A) is the probability of event B when A happens
Terms Related to Bayes Theorem
• After learning about Bayes theorem in detail, let us understand some important terms
related to the concepts we covered in formula and derivation.
• Hypotheses: Events happening in the sample space E1, E2,… En is called the hypotheses
• Priori Probability: Priori Probability is the initial probability of an event occurring before any
new data is taken into account. P(Ei) is the priori probability of hypothesis Ei.
• Posterior Probability: Posterior Probability is the updated probability of an event after
considering new information. Probability P(Ei|A) is considered as the posterior probability of
hypothesis Ei.
• Conditional Probability
• The probability of an event A based on the occurrence of another event B is
termed conditional Probability.
• It is denoted as P(A|B) and represents the probability of A when event B has already
happened.
• Joint Probability
• When the probability of two more events occurring together and at the same time is
measured it is marked as Joint Probability. For two events A and B, it is denoted by joint
probability is denoted as, P(A∩B).
• Random Variables
• Real-valued variables whose possible values are determined by random experiments are
called random variables. The probability of finding such variables is the experimental
probability.
Certainty factors (CFs)
• In artificial intelligence (AI), certainty factors (CFs) are numerical
values that indicate how likely a statement or event is to be true:
Range
• CFs range from -1.0 to +1.0.
Meaning
• A CF of -1.0 means the statement is never true, while a CF of +1.0
means the statement is always true. A CF of 0 means the agent is
unaware of the condition or occurrence.
Use
• CFs are used to represent uncertain or incomplete information in AI
systems. They allow for efficient inference in uncertain situations by
combining CFs from multiple rules.
Bayesian networks
• 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.
• 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
• 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.
Example
• Each node corresponds to the random variables, and a variable can
be continuous or discrete.
• Arc or directed arrows represent the causal relationship or
conditional probabilities between random variables. These directed
links or arrows connect the pair of nodes in the graph.
These links represent that one node directly influence the other
node, and if there is no directed link that means that nodes are
independent with each other
– In the given diagram, A, B, C, and D are random variables
represented by the nodes of the network graph.
– If we are considering node B, which is connected with node A by a
directed arrow, then node A is called the parent of Node B.
– Node C is independent of node A.
Bayesian network
The Bayesian network has mainly two components:
• Causal Component
• Actual numbers
• Each node in the Bayesian network has condition
probability distribution P(Xi |Parent(Xi) ), which
determines the effect of the parent on that node.
• Bayesian network is based on Joint probability
distribution and conditional probability.
Example
• 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.
Solution:
• The Bayesian network for the above problem is given below. The network structure is showing that
burglary and earthquake is the parent node of the alarm and directly affecting the probability of
alarm's going off, but David and Sophia's calls depend on alarm probability.
• The network is representing that our assumptions do not directly perceive the burglary and also do
not notice the minor earthquake, and they also not confer before calling.
• The conditional distributions for each node are given as conditional probabilities table or CPT.
• Each row in the CPT must be sum to 1 because all the entries in the table represent an exhaustive
set of cases for the variable.
• In CPT, a boolean variable with k boolean parents contains 2K probabilities. Hence, if there are two
parents, then CPT will contain 4 probability values