Probabilistic Reasoning
Probabilistic Reasoning
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.
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
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.
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:
Venn Diagram
Chandigarh Group of Colleges, Landran
• 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):
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.