0% found this document useful (0 votes)
31 views23 pages

Probabilistic Reasoning

Uploaded by

jamesfds007
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)
31 views23 pages

Probabilistic Reasoning

Uploaded by

jamesfds007
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/ 23

Chandigarh Group of Colleges, Landran

Unit 3

Probabilistic reasoning in
Artificial intelligence
Chandigarh Group of Colleges, Landran

Uncertainty
• Suppose A and B are two statements, If we implement if-then rule
to these statements, we might write A→B, which means if A is true
then B is true, or if A is false then B is false, if A is true then B is
false, if A is false then B is true.

• So to represent uncertain knowledge, where we are not sure about


the predicates, we need uncertain reasoning or probabilistic
reasoning.
Chandigarh Group of Colleges, Landran

Causes of uncertainty
1.Information occurred from unreliable sources.
2.Experimental Errors
3.Equipment fault
4.Temperature variation
5.Climate change.
Chandigarh Group of Colleges, Landran

Probabilistic reasoning

• 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.
Chandigarh Group of Colleges, Landran

Need of probabilistic reasoning in A I


• 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
Chandigarh Group of Colleges, Landran

Probability
• Probability - 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.
1.0 ≤ P(A) ≤ 1, where P(A) is the probability of an event A.
2.P(A) = 0, indicates total uncertainty in an event A.
3.P(A) =1, indicates total certainty in an event A.
Chandigarh Group of Colleges, Landran

Probability cont.
We can find the probability of an uncertain event by using the below formula.

•P(¬A) = probability of a not happening event.


•P(¬A) + P(A) = 1.
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.
Chandigarh Group of Colleges, Landran

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:

Where P(A⋀B)= Joint probability of A and B


P(B)= Marginal probability of B.
• If the probability of A is given and we need to find the probability of B, then it will be given as:
•Probability of drawing a King (A):
P(A)=4/52
Probability of drawing a Face Card (B):
P(B)=12/52​
•Probability of drawing a King that is also a Face Card (A and
B):
•Since all Kings are Face Cards, the probability of drawing a King
and it being a Face Card is the same as the probability of drawing a
King:
P(A∩B)=P(A)=4/52
Chandigarh Group of Colleges, Landran

Venn Diagram
Chandigarh Group of Colleges, Landran

Venn Diagram Example


• Example:
• In a class, there are 70% of the students who like English and 40% of the students
who likes English and mathematics, and then what is the percent of students
those who like English also like mathematics?
• Solution:
• Let, A is an event that a student likes Mathematics
• B is an event that a student likes English

• Hence, 57% are the students who like English also like Mathematics.
Chandigarh Group of Colleges, Landran

Bayes'
theorem
• Bayes' theorem - 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.
• Bayes' theorem allows updating the probability prediction of an event by observing
new information of the real world.
Chandigarh Group of Colleges, Landran

Example
•P(A∣B) = Posterior probability: the probability of event A
occurring given B (updated belief).
•P(B∣A) = Likelihood: the probability of event B given A.
•P(A) = Prior probability: the initial belief about event A before any
evidence.
•P(B)= Marginal likelihood: the total probability of event B
occurring.
Chandigarh Group of Colleges, Landran

Example-2:
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:
• Let K: The event that the card drawn is a King.
• Let F: The event that the card drawn is a Face
card (Jack, Queen, or King).
1. Prior Probability, P(K) :
2. Marginal Probability, P(F):
3. Likelihood, P(F∣K):If we know that a card is a
King, it is a face card, so:
• 4. Likelihood, P(F∣¬K):
• If the card is not a King (meaning it could be a Jack or a Queen), there are 8 other
face cards (4 Jacks and 4 Queens).

• 5.Calculate P(F):

• P(F)=Number of Face Cards​/ Total Number of Cards=​12/52=3/13

• 6. Calculate the Posterior Probability P(K∣F):


Chandigarh Group of Colleges, Landran

Application of Bayes' theorem in Artific ial


intelligence
Following are some applications 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.
Chandigarh Group of Colleges, Landran

Bayesian Network cont.


• Bayesian Network can be used for building models from data and
experts opinions, and it consists of :
Nodes: Represent random variables (e.g., events, conditions).
Edges: Directed arrows indicating the probabilistic dependencies
between the variables.
Conditional Probability Tables (CPTs): For each node, a CPT
quantifies the effects of the parents on the node. It defines the
probability of each possible state of the node given each combination of
states of its parents.
Chandigarh Group of Colleges, Landran

Example
•An arrow from B (Burglary) to A (Alarm) means that if there is a burglary, the alarm
is likely to go off.
•An arrow from E (Earthquake) to A (Alarm) means an earthquake might also trigger
the alarm.
•John (J) and Mary (M) being home can also affect whether the alarm goes off.
• To understand how likely each event is, we use probabilities:
• Burglary: There’s a 1% chance a burglary will happen.
• Earthquake: There’s a 2% chance of an earthquake.
• Alarm: If there’s a burglary, the alarm goes off 95% of the time. If
there’s an earthquake, the alarm goes off 10% of the time.
• John and Mary: There’s an 80% chance John is home and a 70%
chance Mary is home.
• Making Decisions
• Now, let’s say the alarm is ringing. You want to know how likely it is
that a burglary is happening. This is where we use the Bayesian
Network!
• Look at the possibilities: The alarm could ring due to a burglary or an
earthquake.
• Use the probabilities: You can calculate how likely a burglary is given
that the alarm is going off.
• Why It’s Useful
• Helps make sense of uncertainty: The Bayesian Network helps you
understand what might be happening based on different events.
• Informed decisions: If the alarm goes off, you can use the network to
decide if you should check for a burglary or if it might just be an
earthquake.

You might also like