AI CSE Unit - 3 First Half
AI CSE Unit - 3 First Half
By
Dr.A.Nirmal Kumar
11
ARTIFICIAL INTELLIGENCE
- The Future
2
SYLLABUS
3
COURSE OUTCOMES
Upon completion of the course, the student will be able
CO 1: To explain the concepts of artificial intelligence
(Unit – I)
CO 2: To illustrate various search algorithms
(Unit – II)
CO 3: To adapt various probabilistic reasoning
approaches (Unit – III)
CO 4: To elaborate Markov decision process
(Unit – IV)
CO 5: To perceive various reinforcement learning
approaches (Unit – V)
4
UNIT – III
Probabilistic Reasoning
Part-A:
Probability
Conditional probability
Bayes Rule
Bayesian Networks- representation
Construction and inference
Part-B:
Temporal Model
Hidden Markov Model
Probabilistic reasoning in Artificial Intelligence
Uncertainty:
• Till now, we have learned knowledge
representation using first-order logic and
propositional logic with certainty, which means
we were sure about the predicates. With this
knowledge representation, we might write A→B,
which means if A is true then B is true, but
consider a situation where we are not sure about
whether A is true or not then we cannot express
this statement, this situation is called uncertainty.
• So to represent uncertain knowledge, where we
are not sure about the predicates, we need
uncertain reasoning or probabilistic reasoning.
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
Probabilistic Reasoning
• Probabilistic reasoning is a way of knowledge
representation where we apply the concept of probability
to indicate the uncertainty in knowledge. In probabilistic
reasoning, we combine probability theory with logic to
handle the uncertainty.
• We use probability in probabilistic reasoning because it
provides a way to handle the uncertainty that is the result
of someone's laziness and ignorance.
• 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
Probability
• Probability can be defined as a chance that an uncertain
event will occur.
• It is the numerical measure of the likelihood that an
event will occur.
• The value of probability always remains between 0 and
1 that represent ideal uncertainties.
• Probability implies 'likelihood' or 'chance'.
• When an event is certain to happen then the probability
of occurrence of that event is 1 and when it is certain
that the event cannot happen then the probability of that
event is 0.
• Hence the value of probability ranges from 0 to 1.
Probability has been defined in a varied manner by
various schools of thought.
Classical Definition of Probability
• As the name suggests the classical approach to defining
probability is the oldest approach. It states that if there are
n exhaustive, mutually exclusive and equally likely cases
out of which m cases are favorable to the happening of
event A.
Example
• Problem Statement:
A coin is tossed. What is the probability of getting a
head?
• Solution:
Total number of equally likely outcomes (n) = 2 (i.e. head
or tail)
Number of outcomes favorable to head (m) = 1
• 0 ≤ P(A) ≤ 1, where P(A) is the probability of an eve
nt A.
• P(A) = 0, indicates total uncertainty in an event A.
• P(A) =1, indicates total certainty in an event A.
We can find the probability of an uncertain event
by using the below formula.
• Probability of Occurrence = (Number of
desired Outcomes / Total No of Outcomes)
• P(¬A) = probability of a not happening event.
• P(¬A) + P(A) = 1.
Terminologies in Probability Theory
• Event: Each possible outcome of a variable is called
an event.
• Sample space: The collection of all possible events is
called sample space.
• Random variables: Random variables are used to
represent the events and objects in the real world.
• 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.
Basic Probability Rules
• Probability Rule One (For any event A, 0 ≤
P(A) ≤ 1)
• Probability Rule Two (The sum of the
probabilities of all possible outcomes is 1)
• Probability Rule Three (The Complement
Rule)
• Probabilities Involving Multiple Events.
• Probability Rule Four (Addition Rule for
Disjoint Events)
• Finding P(A and B) using Logic.
How is probability used in real life?
• You use probability in daily life to make
decisions when you don't know for sure what
the outcome will be. Most of the time, you
won't perform actual probability problems,
but you'll use subjective probability to make
judgment calls and determine the best course
of action.
What is a certain event?
• A certain event is an event that is sure to
happen. E is a certain event if and only if P(E)
= 1. Example. In flipping a coin once,
a certain event would be getting a head or a
tail.
• The probability formula provides the ratio
of the number of favorable outcomes
to the total number of possible outcomes. The
probability of an Event = (Number of
favorable outcomes) / (Total number of
possible outcomes) P(A) = n(E) / n(S)
What is impossible event?
• An impossible event is an event that cannot
happen. E is an impossible event if and only if
P(E) = 0. Example. In flipping a coin once,
an impossible event would be getting BOTH a
head AND a tail.
• The probability line is a line that
shows probabilities and how
these probabilities relate to each other. Since
the probability of an event is a number from 0
to 1, we can use the probability line above to
show the possible ranges of probability values.
Four perspectives on probability are
commonly used:
• Classical (sometimes called "A priori" or "Theoretical") ...
• Empirical (sometimes called "A posteriori" or "Frequentist") ...
• Subjective. ...
• Axiomatic.
What are the different types of probability
distributions?
• There are many different classifications of probability
distributions. Some of them include the normal distribution,
chi square distribution, binomial distribution, and Poisson
distribution.
What are probability models?
• A probability model is a mathematical representation of
a random phenomenon. It is defined by its sample space,
events within the sample space, and probabilities associated
with each event. The sample space S for a probability
model is the set of all possible outcomes.
Who is known as father of probability?
• A gambler's dispute in 1654 led to the creation of a
mathematical theory of probability by two famous French
mathematicians, Blaise Pascal and Pierre de Fermat.
What are the 3 axioms of probability?
• For any event A, P(A) ≥ 0. In English, that's
“For any event A, the probability of A is
greater or equal to 0”.
• When S is the sample space of an experiment;
i.e., the set of all possible outcomes, P(S) = 1.
• If A and B are mutually exclusive outcomes,
P(A ∪ B ) = P(A) + P(B).
Conditional Probability
• Conditional probability is a probability of occurring
an event when another event has already happened.
• Let's suppose, we want to calculate the event A when
event B has already occurred, "the probability of A
under the conditions of B", it can be written as: