Unit6 Uncertain
Unit6 Uncertain
Knowledge
Chapter 6:
Artificial Intelligence (UCS411)
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.
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
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.
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
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)
We can go one step further and see what happens when we pick a second ball:
Question:
Drawing 2 Queens from a Deck
Event A is drawing a Queen first, and Event B is drawing a second Queen.
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
To calculate the probability of the intersection of more than two events, the conditional
probabilities of all of the preceding events must be considered.
Assignment
Discuss the Axioms of Conditional Probability
• 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
P(B|A)P(A)
P(A|B)=
P(B)
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
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:
Solution
The probability that a lamp was manufactured in factory A 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
• 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.
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
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.
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.
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?
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.