0% found this document useful (0 votes)
9 views35 pages

Unit6 Uncertain

Chapter 6 discusses the representation and reasoning with uncertain knowledge in artificial intelligence, focusing on probabilistic reasoning as a method to handle uncertainty. It covers key concepts such as Bayes' theorem, Bayesian networks, and conditional probability, illustrating their applications in decision-making and real-world scenarios. The chapter emphasizes the importance of probabilistic reasoning in AI when dealing with unpredictable outcomes and large possibilities.

Uploaded by

eeshasingh2501
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)
9 views35 pages

Unit6 Uncertain

Chapter 6 discusses the representation and reasoning with uncertain knowledge in artificial intelligence, focusing on probabilistic reasoning as a method to handle uncertainty. It covers key concepts such as Bayes' theorem, Bayesian networks, and conditional probability, illustrating their applications in decision-making and real-world scenarios. The chapter emphasizes the importance of probabilistic reasoning in AI when dealing with unpredictable outcomes and large possibilities.

Uploaded by

eeshasingh2501
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
You are on page 1/ 35

Representing and Reseaoning with Uncertain

Knowledge

Chapter 6:
Artificial Intelligence (UCS411)

Thapar Institute of Engineering and Technology, Patiala


mukesh.singh@thapar.edu

Prof. Mukesh Singh (EIED) Artificial Intelligence 1 / 35


Chapter 6: Representing and Reasoning with
Uncertain Knowledge

Chapter Content
• Probability, Connection to logic
• Independence
• Bayes rule
• Bayesian networks
• Probabilistic inference;Sample applications
• Decision-Making: basics of utility theory, decision theory,
sequential decision problems, elementary game theory,
sample applications.

Prof. Mukesh Singh (EIED) Artificial Intelligence 2 / 35


Representing and Reasoning with Uncertain
Knowledge
• 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 uncertainity to occur in the real world.
1 Information occurred from unreliable sources
2 Experimental errors
3 Equipment fault
4 Temperature variation
5 Climate change

Prof. Mukesh Singh (EIED) Artificial Intelligence 3 / 35


Probabilistic Reasoning- A method to model
uncertainty
• 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.
• 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
• Each action has its own set of preconditions

Prof. Mukesh Singh (EIED) Artificial Intelligence 4 / 35


Probabilistic reasoning

In probabilistic reasoning, there are two ways to solve problems with uncertain knowledge:
1 Bayes’ rule
2 Bayesian Statistics
Probabilistic reasoning uses probability and related terms, so before understanding
probabilistic reasoning, let’s understand some common terms:

Probability
• Probability can be defined as chance of occurrence of an uncertain event.
• It is the numerical measure of the likelihood that an event will occur. The value of
probability always remains between 0 and 1.
• 0 ≤ P(X) ≤ 1, where P(X) is the probability of an event X.
• P(X) = 0, indicates total uncertainty in an event X.
• P(X) =1, indicates total certainty in an event X.

Prof. Mukesh Singh (EIED) Artificial Intelligence 5 / 35


Independent and Dependent Events
Independent Events
• Each event is not affected by any other events.
• Example: Tossing a coin
• Each toss of a coin is a perfect isolated thing.
• What it did in the past will not affect the current toss.
• The chance is simply 1 in 2, or 50%, just like any toss of the coin.
• So each toss is an Independent event.

Dependent Events
• Events can also be ”dependent” ... which means they can be affected by previous
events
• Example: 2 blue and 3 red balls are in a bag.
• What are the chances of getting a red ball?
• The chance is 3 in 5
• But after taking one ball out, the chances change!
• So the next time:
• if we got a red ball before, then the chance of a blue ball next is 2 in 4
• if we got a blue ball before, then the chance of a red ball next is 1 in 4

Prof. Mukesh Singh (EIED) Artificial Intelligence 6 / 35


Dependent Event...

Note:
If we replace the ball in the bag each time, then the chances do not change and the events
are independent
With Replacement: the events are Independent (the chances don’t change)
Without Replacement: the events are Dependent (the chances change)

Prof. Mukesh Singh (EIED) Artificial Intelligence 7 / 35


Tree Diagram
There is a 2/5 chance of pulling out a blue ball, and a 3/5 chance for a red ball:

We can go one step further and see what happens when we pick a second ball:

Prof. Mukesh Singh (EIED) Artificial Intelligence 8 / 35


Tree Diagram....
Now we can answer questions like ”What are the chances of drawing 2 blue balls?”

Answer: It is a 2/5 chance followed by a 1/4 chance

• Event A is ”get a Blue ball first” with a probability of 2/5:


• P(A) = 2/5
• Event B is ”get a Blue ball second” ... but for that we have 2 choices:
• If we got a Blue ball first the chance is now 1/4
• If we got a Red ball first the chance is now 2/4
• So we have to say which one we want, and use the symbol ”|” to mean ”given”:
• P(B|A) means ”Event B given Event A”
• In other words, event A has already happened, now what is the chance of event B?
• P(B|A) is also called the ”Conditional Probability” of B given A.

Prof. Mukesh Singh (EIED) Artificial Intelligence 9 / 35


Conditional Probability

Question:
Drawing 2 Queens from a Deck
Event A is drawing a Queen first, and Event B is drawing a second Queen.

P(A and B) = P(A) x P(B|A) = (4/52) x (3/51) = 12/2652 = 1/221

Prof. Mukesh Singh (EIED) Artificial Intelligence 10 / 35


Conditional Probability

• Conditional probability is defined as the likelihood of occurrence of an event,


based on the occurrence of some other event.
• Conditional Probability of event B given A is represented as P(B|A).
• P(B|A) means “Probability of event B given event A”
• In other words, event A has already happened, now what is the chance of event B?
P(A ∩ B)
• P(B|A) = when P(A) >0
P(A)
• P(A∩B)= P(A)x P(B|A) : Probability of event A and event B equals to probability of event
A times probability of event B given event A.
• P(B|A)= P(A∩B)/P(A)
• If A and B are independent events then P(A∩B)= P(A) x P(B)
• P(B|A)= P(A) x P(B)/P(A) =P(B)

Prof. Mukesh Singh (EIED) Artificial Intelligence 11 / 35


Conditional Probaibility

Example
If 70% of your friends like Pizza, and 35% like Pizza AND like Cold Drink. What percent of
those who like Pizza also like Cold Drink?

Solution
P(Pizza and Cold Drink) = 35/100 = 0.35
P(Pizza) = 70/100 = 0.70
P(Cold Drink |Pizza) = P(Pizza and Cold Drink) / P(Pizza)
P(Cold Drink |Pizza) = 0.35 / 0.7 = 0.5

Prof. Mukesh Singh (EIED) Artificial Intelligence 12 / 35


Conditional Probability

To calculate the probability of the intersection of more than two events, the conditional
probabilities of all of the preceding events must be considered.

In the case of three events, A, B, and C, the probability of the intersection

P(A ∩ B ∩ C) = P(A) x P(B|A) x P(C|A ∩B)

Chain rule for conditional probability:

P(A1∩A2∩....∩An)= P(A1)P(A2 | A1)P(A3 | A2 ∩ A1)...P(An | An-1 ∩ An-2.... ∩ A1)

Assignment
Discuss the Axioms of Conditional Probability

Prof. Mukesh Singh (EIED) Artificial Intelligence 13 / 35


Bayes’ Theorem in Artificial Intelligence

• 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 was named after the British mathematician Thomas Bayes.
• The Bayesian inference is an application of Bayes’ theorem, which is fundamental to
Bayesian statistics.
• It is a way to calculate the value of P(B|A) with the knowledge of P(A|B)
• Bayes’ theorem allows updating the probability prediction of an event by observing
new information of the real world

Example
If cancer corresponds to one’s age then by using Bayes’ theorem, we can determine the
probability of cancer more accurately with the help of age

Prof. Mukesh Singh (EIED) Artificial Intelligence 14 / 35


Bays Theorem
P(A ∩ B) P(B ∩ A)
P(A|B)= ; P(B|A)= (As per Conditional Probability)
P(B) P(A)
P(A|B) X P(B)=P(A∩ B) and P(B|A) X P(A)=P(B∩ A)

P(A|B) X P(B)=P(B|A) X P(A)

P(B|A)P(A)
P(A|B)=
P(B)

P(Face|King)P(King) 1x4/52 1x1/13 1


P(King|Face)= = = =
P(Face) 12/52 4/13 3

Prof. Mukesh Singh (EIED) Artificial Intelligence 15 / 35


Naive Bays Classifier- Example

P(B|A)P(A)
P(A|B)=
P(B)
P(Yellow|Orange)=
P(Orange|Yellow)P(Yellow)
P(Orange)

P(Orange|Yellow)P(Yellow) (350/800)x(800/1200)
P(Yellow|Orange)= = =0.53
P(Orange) 650/1200

P(Orange|sweet)P(sweet) P(Orange|Long)P(Long)
P(Sweet|Orange)= = 0.69; P(Long|Orange)=
P(Orange) P(Orange)
=0

P(Fruit|Orange)= 0.53x0.69x0=0
P(Fruit|Banana)= 1x0.75x0.87=0.65
P(Fruit|others)= 0.33x0.66x0.33=0.072

Prof. Mukesh Singh (EIED) Artificial Intelligence 16 / 35


Example

Question
A desk lamp produced by The Luminar Company was found to be defective (D). There are
three factories (A, B, C) where such desk lamps are manufactured. A Quality Control
Manager (QCM) is responsible for investigating the source of defects. This is what the QCM
knows about the company’s desk lamp production and the possible source of defects:

The QCM would like to answer the following question:


If a randomly selected lamp is defective, what is the probability that the lamp was
manufactured in factory C, when P(D), the probability that a lamp manufactured by the
Luminar Company is defective, is 0.01475.

Prof. Mukesh Singh (EIED) Artificial Intelligence 17 / 35


Example...

Solution
The probability that a lamp was manufactured in factory A given that it is defective (D) is:

P(A ∩ D) P(D|A)XP(A) (0.015)X(0.35)


P(A|D)= = = =0.356
P(D) P(D) 0.01475
And, the probability that a lamp was manufactured in factory B given that it is defective (D)
is:

B ∩ D P(D|B)XP(B) (0.01)X(0.35)
P(B|D)= = = = 0.237
P(D) P(D) 0.01475
P(C|D) = 0.407

P(B|D) = 0.237

P(A|D) = 0.356

Prof. Mukesh Singh (EIED) Artificial Intelligence 18 / 35


Generalization of Bayes Rule

Prof. Mukesh Singh (EIED) Artificial Intelligence 19 / 35


Baysian Network
• A Bayesian network is a probabilistic graphical model which use a directed
acyclic graph to represent a set of variables and their conditional dependencies.
• These networks are probabilistic in nature, because they use concepts of
probability theory.
• These are very useful in understanding the dependency among events and
assigning probabilities to them.

Bayesian Network consists of two parts:

1 Directed Acyclic Graph


2 Table of conditional probabilities.

• A, B, C, and D are random variables represented by the nodes of the network graph.
• 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.

Prof. Mukesh Singh (EIED) Artificial Intelligence 20 / 35


Joint probability
• Joint probability is the likelihood of more than one event occurring at the same
time.
• Joint probability for two events, A and B, is expressed mathematically as P(A, B) and is
calculated by multiplying the probability, P(A), of event A by the probability, P(B), of
event B.
• For example, suppose a statistician wishes to know the probability that the number
five will occur on two dices when they are rolled at the same time.
• Since each die has six possible outcomes, the probability of a five occurring on each
die is 1/6 or 0.1666.
• P(A)=0.1666 P(B)=0.1666
• P(A,B)=0.1666 x 0.1666=0.02777
• This means the joint probability that a five will be rolled on both dice at the
same time is 0.02777.

Prof. Mukesh Singh (EIED) Artificial Intelligence 21 / 35


Question

Asssignment
Ram installed a alarm system at his home to detect burglary. The alarm reliably responds at
detecting a burglary but also responds for fire. Ram has two neighbors- Krishan and Sonia,
who have taken a responsibility to inform Ram at work when they hear the alarm. Krishan
always calls Ram when he hears the alarm, but sometimes he got confused with the phone
ringing and calls at that time too. On the other hand, Sonia likes to listen to high music, so
sometimes she misses to hear the alarm. Calculate the probability that alarm has sounded,
but there is neither a burglary, nor an fire catching occurred, and Krishan and Sonia both
called the Ram. Solve using joint Probability

Prof. Mukesh Singh (EIED) Artificial Intelligence 22 / 35


Decision Making

AI Decision making tool


• An AI decision-making tool is a software application that uses AI algorithms to analyze
data and make decisions.
• It helps organizations or individuals make more efficient and accurate decisions by
automating data analysis and identifying patterns and trends.

AI Algorithm used for decision making


• There are many different types of AI algorithms that can be used for decision-making,
including
• Machine learning algorithms
• Deep neural networks
• Expert systems
• Decision trees and
• Rule-based systems.
• The choice of algorithm will depend on the specific application and the type of data
being analyzed.

Prof. Mukesh Singh (EIED) Artificial Intelligence 23 / 35


Uses of Utility and Utility Function in Decision
Theory
Utility

1 Utility is the level of satisfaction or benefits that someone gains from consuming a
given amount of goods or services.
2 It is an abstract theoretical concept rather than a concrete, observable quantity.
3 For example, if the utility of investment A is 100, and the utility of investment B is 150,
we cannot claim that investment B is 50% better than investment A.
4 In most of the cases, the utility value is expressed on a 0 to 1, which is standard in
many textbooks.

Prof. Mukesh Singh (EIED) Artificial Intelligence 24 / 35


Utility Function
• When you are very thirsty, one glass of water can make you happy and two glasses of
water can make you happier.
• But, after 2 glasses, your thirst can mitigate, the 3rd glass of water may or may not
give you much pleasure.
• That is the idea of a utility function.

Prof. Mukesh Singh (EIED) Artificial Intelligence 25 / 35


Sequential Decision
• Generally, agents do not make decisions in the dark without observing something
about the world, nor do they make just a single decision.
• A more typical scenario is that the agent makes an observation,
• decides on an action,
• carries out that action,
• makes observations in the resulting world,
• then makes another decision conditioned on the observations,
• and so on.
• Subsequent actions can depend on what is observed, and what is observed can
depend on previous actions.
• In this scenario, it is often the case that the sole reason for carrying out an action is to
provide information for future actions.

A sequential decision problem is a sequence of decisions, where for each decision you
should consider
• what actions are available to the agent;
• what information is, or will be, available to the agent when it has to act;
• the effects of the actions; and
• the desirability of these effects.

Prof. Mukesh Singh (EIED) Artificial Intelligence 26 / 35


Example
An agent is in the field start, and can move in any direction between the field. Its actions
ends when it reaches one of the fields (4,2) or (4,3), with the result marked in those fields.

The steps can be


• U-U-R-R-R.
• Equally good would be the plan: R-R-U-U-R.
• If the single actions did not cost anything (ie. only the final state did matter), then
equally good would also be the plan: R-R-R-L-L-L-U-U-R-R-R,
• and many others.

Prof. Mukesh Singh (EIED) Artificial Intelligence 27 / 35


Types of Decision Theory

Decision Theory under Uncertainity are as follows


1 Maximin Criterian
2 Maximin Criterian
3 Minimax Regret Criterian
4 Laplace Criterian
5 Hurwitz Criterian
Prof. Mukesh Singh (EIED) Artificial Intelligence 28 / 35
Maximin
Maximin criteria
This criterion is the decision to take the course of action which maximizes the minimum
possible pay-off. The working method is:
1 Determine the lowest outcome for each alternative.
2 Choose the alternative associated with the maximum of these.

Prof. Mukesh Singh (EIED) Artificial Intelligence 29 / 35


Minimax criteria
This criterion is the decision to take the course of action which minimizes the maximum
possible pay-off. The working method is:
1 Determine the highest outcome for each alternative.
2 Choose the alternative associated with the minimum of these.

Prof. Mukesh Singh (EIED) Artificial Intelligence 30 / 35


Assignment

1 Discuss the application of Minimax Regret Criterian with a help


of example.
2 Explain mathematically Laplace and Hurwitz Criterian with
respect to Decision Theory.

Prof. Mukesh Singh (EIED) Artificial Intelligence 31 / 35


Game Theory
Game Theory is a branch of mathematics used to model the strategic interaction between
different players in a context with predefined rules and outcomes.
• It is a mathematics of conflict
• It can be said to be aproblem of Multiple Agents
• It is inceasingly been used in AI/ML

Game Theory can be applied in different ambit of Artificial Intelligence:

Prof. Mukesh Singh (EIED) Artificial Intelligence 32 / 35


Game Theory

Prisoner’s Dilemma
• Two suspects arrested for a crime
• Prisoners decide whether to confess or not to confess
• If both confess, both sentenced to 3 months of jail
• If both do not confess, then both will be sentenced to 1 month of jail
• If one confesses and the other does not, then the confessor gets freed (0 months of
jail) and the non-confessor sentenced to 9 months of jail
• What should each prisoner do?

Battle of Wife and Husband


• A couple deciding how to spend the evening
• Wife would like to go for a movie
• Husband would like to go for a cricket match
• Both however want to spend the time together
• Scope for strategic interaction

Prof. Mukesh Singh (EIED) Artificial Intelligence 33 / 35


Payoff Matrix and Nash Equillibrium

Nash Equillibrium
A Nash equilibrium is a strategy profile in game theory in which no player has a dominant
strategy. Each player correctly anticipates the strategic choice of all other players, and thus
has no incentive to unilaterally deviate from their own optimal strategy. The Nash existence
theorem dictates that every game has at least one Nash equilibrium.

Prof. Mukesh Singh (EIED) Artificial Intelligence 34 / 35


Solution using Nash Equllibrium

Prof. Mukesh Singh (EIED) Artificial Intelligence 35 / 35

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy