Artificial IntelligenceUnit 69 min read
Reasoning under Uncertainty: Probability, Bayes, Dempster-Shafer, and Decision Trees
Unit 6 of Artificial Intelligence covers probabilistic reasoning, Bayesian networks, Dempster-Shafer theory, and decision-making under uncertainty, with real-world applications in medical diagnosis, fraud detection, and autonomous systems.
Key Concepts and Definitions
Probability and Uncertainty
Uncertainty arises when we lack complete information about an event or outcome. Probability quantifies this uncertainty, providing a numerical measure of how likely an event is to occur. Probability theory is foundational for reasoning under uncertainty.
Probability Basics
- Probability Space: Defined by a sample space , events , and a probability measure .
- Conditional Probability: , representing the probability of event given that has occurred.
- Bayes' Theorem: , used to update beliefs based on evidence.
Bayesian Networks
Bayesian networks (or belief networks) are graphical models that represent probabilistic relationships among variables. They consist of nodes (random variables) and directed edges (dependencies).
Structure of Bayesian Networks
- Nodes: Represent random variables (e.g., disease, symptoms).
- Edges: Indicate conditional dependencies (e.g., a disease causing symptoms).
- Conditional Probability Tables (CPTs): Specify probabilities for each variable given its parents.
Example: Medical Diagnosis
Consider a simple Bayesian network for diagnosing a disease based on symptoms and :
Nodes:
- : Disease (True/False)
- : Symptom 1 (Present/Absent)
- : Symptom 2 (Present/Absent)
CPT for :
CPT for given :
CPT for given :
Worked Example: Calculating Probability of Disease
Suppose a patient exhibits both symptoms and . What is the probability that the patient has the disease ?
Using Bayes' Theorem:
First, calculate :
Next, calculate :
Finally, apply Bayes' Theorem:
Thus, the probability that the patient has the disease given both symptoms is approximately 26.7%.
Dempster-Shafer Theory of Evidence
Dempster-Shafer theory (DST) is an extension of Bayesian probability that allows for uncertainty and ignorance. It uses belief functions to represent degrees of belief.
Key Concepts
- Frame of Discernment: Set of all possible hypotheses .
- Mass Function: Assigns a degree of belief to subsets of .
- Belief Function: Sum of masses of all subsets of a given hypothesis.
- Plausibility Function: Sum of masses of all subsets that do not contradict the hypothesis.
Comparison with Bayesian Probability
| Feature | Bayesian Probability | Dempster-Shafer Theory |
|---|---|---|
| Representation | Single probability value | Mass function over subsets |
| Ignorance | Not explicitly modeled | Modeled via mass to |
| Combining Evidence | Multiplication of probabilities | Dempster's rule of combination |
| Complexity | Simpler | More complex |
Worked Example: DST in Fraud Detection
Suppose a bank uses DST to detect fraudulent transactions. The frame of discernment , where is "fraudulent" and is "not fraudulent."
Mass Function Assignments:
- (30% belief in fraud)
- (40% belief in no fraud)
- (30% ignorance)
Belief and Plausibility:
- Belief in :
- Plausibility of :
Decision Making under Uncertainty
Decision-making under uncertainty involves choosing the best action given incomplete information. Common approaches include:
- Utility Theory: Maximizing expected utility.
- Decision Trees: Graphical representation of decisions and outcomes.
Decision Trees
Decision trees model sequential decisions and outcomes, incorporating probabilities and utilities.
flowchart TD
A["Buy Stock"] --> B["Market Up: +1000"]
A --> C["Market Down: -500"]
D["Sell Stock"] --> E["Market Up: 0"]
D --> F["Market Down: 0"]Decision tree for stock investment (expected utility: Buy=$400, Sell=$0)Structure of a Decision Tree
- Decision Nodes: Represent choices (e.g., "Buy Stock" or "Sell Stock").
- Chance Nodes: Represent uncertain events (e.g., "Market Up" or "Market Down").
- Leaf Nodes: Represent outcomes with associated utilities.
Worked Example: Investment Decision
Consider an investor deciding whether to buy a stock. The market can go up (probability 0.6) or down (probability 0.4).
```mermaid
flowchart TD
A["Buy Stock"] --> B["Market Up: +$1000"]
A --> C["Market Down: -$500"]
D["Sell Stock"] --> E["Market Up: $0"]
D --> F["Market Down: $0"]
Utilities:
- Buy and Market Up: $1000
- Buy and Market Down: -$500
- Sell: $0 (regardless of market)
Expected Utility for Buying: [ EU(\text{Buy}) = 0.6 \times 1000 + 0.4 \times (-500) = 600 - 200 = 400 ]
Expected Utility for Selling: [ EU(\text{Sell}) = 0.6 \times 0 + 0.4 \times 0 = 0 ]
The investor should buy the stock since the expected utility ($400) is higher than selling ($0).
In the Real World
eSewa (Nepal):
- Application: Fraud detection in online payments.
- Idea Used: Bayesian networks to assess the probability of fraudulent transactions based on user behavior, transaction history, and device information.
- How: If a user suddenly makes a large transaction from a new device, the system calculates the probability of fraud using Bayes' Theorem and flags suspicious activities.
Pathao (Nepal):
- Application: Dynamic pricing and route optimization for ride-hailing.
- Idea Used: Decision trees to adjust prices based on demand, time of day, and driver availability.
- How: During peak hours, the system increases prices to balance supply and demand, using expected utility calculations to maximize both driver earnings and passenger satisfaction.
Ncell (Nepal):
- Application: Predictive maintenance of network infrastructure.
- Idea Used: Dempster-Shafer theory to combine sensor data and historical failure rates to predict equipment failures.
- How: If multiple sensors indicate potential failure, the system aggregates evidence to compute belief and plausibility scores, triggering maintenance before a full breakdown occurs.
Exam Tip
For exams, focus on the following:
- Understand the Definitions: Clearly define probability, conditional probability, Bayes' Theorem, and Dempster-Shafer theory.
- Practice Calculations: Work through numerical examples for Bayesian networks and decision trees. Show all steps clearly.
- Compare Methods: Be able to explain the differences between Bayesian probability and Dempster-Shafer theory, including when to use each.
- Real-World Applications: Relate concepts to real-world scenarios like fraud detection, medical diagnosis, or dynamic pricing. Examiners often test applied understanding.
- Diagrams: Draw Bayesian networks and decision trees accurately. Label nodes, edges, and probabilities clearly.
- Common Pitfalls:
- Misapplying Bayes' Theorem (e.g., confusing ( P(H|E) ) and ( P(E|H) )).
- Incorrectly combining evidence in Dempster-Shafer theory (e.g., ignoring the frame of discernment).
- Forgetting to calculate expected utilities correctly in decision trees.
flowchart TD
A["Bayesian Network"] --> B["Nodes: Variables"]
A --> C["Edges: Dependencies"]
A --> D["CPTs: Probabilities"]
E["Dempster-Shafer Theory"] --> F["Frame of Discernment"]
E --> G["Mass Function"]
E --> H["Belief/Plausibility"]
I["Decision Trees"] --> J["Decision Nodes"]
I --> K["Chance Nodes"]
I --> L["Leaf Nodes: Utilities"]Based on the PU BE Computer (PU) syllabus for Artificial Intelligence (CMP346), unit 6.
Discussion
Loading…