Real world AI
Getachew Mamo (Ph.D.)
November 16, 2025
Getachew M. Real World AI November 16, 2025 1 / 18
Introduction: Uncertainty in Real-world AI
Perfect information scenarios (like chess) are rare in real life
Real world is full of uncertainty and incomplete information
Examples of uncertainty:
Self-driving cars: sensor noise, unexpected obstacles
Medical diagnosis: conflicting symptoms, test inaccuracies
Weather prediction: incomplete atmospheric data
Key Insight
Modern AI succeeds because it can handle uncertainty through probability,
unlike earlier AI systems (1960s-1980s) that required perfect information.
Getachew M. Real World AI November 16, 2025 2 / 18
Probability vs. Other Approaches
Fuzzy Logic: Handles degrees of truth
Used in washing machines, air conditioners
”Somewhat dirty” vs ”very dirty” clothes
Probability: Current dominant approach
Quantifies uncertainty numerically
Basis for most modern AI applications
Why Probability Won
Solid mathematical foundation
Well-understood properties
Can be combined with statistical learning
Provides clear interpretation of results
Getachew M. Real World AI November 16, 2025 3 / 18
Why Probability Matters
Everyday Applications: AI Applications:
Games: Poker odds (1 in 47 for Medical diagnosis automation
three of a kind) Fraud detection
Risks: Car accident probabilities Spam filtering
Finance: Interest rate changes Autonomous vehicles
Healthcare: Disease prevalence Recommendation systems
Key Lesson
Uncertainty can be quantified and compared rationally using probability,
enabling systematic decision-making under uncertainty.
Getachew M. Real World AI November 16, 2025 4 / 18
Odds: An Intuitive Representation
Definition
Odds: Expression like 3:1 means ”three wins for every one loss”
Example
3
Odds 3:1 = Probability 4 = 75%
1
Odds 1:4 = Probability 5 = 20%
2
Odds 2:1 = Probability 3 66.7%
Warning!
Odds 1:5 = 0.2 but probability = 20% = 0.2
Same number, different meaning!
Odds 1:5 means 1 win per 6 trials
Probability 20% means 1 win per 5 trials
Getachew M. Real World AI November 16, 2025 5 / 18
Why Use Odds Instead of Percentages?
Natural frequencies (3 out of 4) are easier to understand
People make fewer calculation errors with whole numbers
Easier to update beliefs with new evidence
Example
”75% chance of rain” vs ”3 out of 4 days like this had rain”
Which is more intuitive?
Studies show natural frequencies improve reasoning accuracy by
30-50%
Getachew M. Real World AI November 16, 2025 6 / 18
Bayes Rule: The Foundation of Modern AI
Theorem
Bayes Rule (Odds Form):
Posterior Odds = Likelihood Ratio × Prior Odds
Definition
Prior Odds: Initial belief before new evidence
Likelihood Ratio: Strength of new evidence
Posterior Odds: Updated belief after evidence
Simple but Powerful
This single multiplication underpins:
Medical diagnosis systems
Spam filters
Courtroom evidence evaluation
Scientific
Getachew [Link] testing Real World AI November 16, 2025 7 / 18
Rain Example: Applying Bayes Rule
Given:
Prior odds of rain: 206:159 Example
Cloudy on rainy day: 9/10 Before seeing clouds:
206
Cloudy on dry day: 1/10 Probability of rain: 365 ≈ 56%
Calculate: After seeing clouds:
11.66
Likelihood ratio = 9/10 Probability of rain: ≈ 92%
1/10 = 9 12.66
The clouds dramatically increased
Posterior odds = 9 × 206
159
our confidence in rain prediction!
Posterior odds 11.66:1
Getachew M. Real World AI November 16, 2025 8 / 18
Rain Example — Bayes (odds form)
Given
206 206
Prior: P(rain) = ≈ 0.5643836, Prior odds =
365 159
P(clouds | rain) = 0.9, P(clouds | no rain) = 0.1
Likelihood ratio
P(clouds | rain) 0.9
LR = = =9
P(clouds | no rain) 0.1
Posterior odds
206 1854
Posterior odds = LR × Prior odds = 9 × = ≈ 11.66037 : 1
159 159
Convert to probability
11.66037
P(rain | clouds) = ≈ 0.920996 ≈ 92.10%
1 + 11.66037
Getachew M. Real World AI November 16, 2025 9 / 18
Same result — Bayes (probability form)
Bayes formula
P(clouds | rain) P(rain)
P(rain | clouds) =
P(clouds)
with
P(clouds) = P(clouds | rain)P(rain) + P(clouds | no rain)P(no rain)
Compute numerator
206
P(clouds | rain)P(rain) = 0.9 × = 0.9 × 0.5643836 ≈ 0.5079452
365
Compute denominator
P(clouds) = 0.9·0.5643836+0.1·(1−0.5643836) ≈ 0.5079452+0.0435616 ≈ 0
Posterior probability
0.5079452
P(rain | clouds) = ≈ 0.920996 ≈ 92.10%
0.5515068
Interpretation: Observing clouds multiplies prior odds by 9 and raises the
Getachew M. Real World AI November 16, 2025 10 / 18
Medical Diagnosis: Breast Cancer Screening
Base Rates:
Example
5% of women have breast cancer Intuitive (Wrong) Answer:
Test sensitivity: 80% ”Test is 80% accurate, so 80%
chance”
Test specificity: 90%
Correct Bayesian Calculation:
Question:
Prior odds: 5:95 = 1:19
Positive test result 0.8
Likelihood ratio: 0.1 =8
What’s the probability of 1 8
actually having cancer? Posterior odds: 8 × 19 = 19
8
Probability: 27 ≈ 30%
Getachew M. Real World AI November 16, 2025 11 / 18
The Base Rate Fallacy
Definition
Base Rate Fallacy: Ignoring general prevalence (base rate) when
interpreting specific evidence.
Example
Disease affects 1 in 1000 people
Test is 99% accurate
Positive test result → intuition says ”99% chance of disease”
Reality: About 9% chance of disease!
Why This Matters
Common in medical testing, legal reasoning, risk assessment
Leads to overestimation of probabilities
Bayes Rule provides the cure
Getachew M. Real World AI November 16, 2025 12 / 18
Visualizing Base Rate Fallacy
Large gray area: Healthy population
Small red area: Actually sick
Blue circles: False positives overwhelm true positives
Getachew M. Real World AI November 16, 2025 13 / 18
Naive Bayes Classification
Definition
Naive Bayes: Machine learning method that applies Bayes rule with
”naive” independence assumption between features.
Why ”Naive”?
Assumes all words in email are independent:
”FREE” and ”MONEY” treated separately
Ignores word order and context
Surprisingly effective despite simplicity!
”
All models are wrong, but some are useful” - George E.P. Box
Getachew M. Real World AI November 16, 2025 14 / 18
Spam Filter Example: Word Probabilities
Word Spam Count Ham Count Likelihood Ratio
million 156 98 5.1
dollars 29 119 0.8
adclick 51 0 53.2
conferences 0 12 0.3
Example
”million” appears 156 times in 95,791 spam words
”million” appears 98 times in 306,438 ham words
156/95791
Likelihood ratio: 98/306438 = 5.1
Word ”million” is 5.1× more likely in spam
Getachew M. Real World AI November 16, 2025 15 / 18
Classifying a Message Step-by-Step
Example
Message: ”Win million dollars now!”
Prior odds: 1:1 (50% spam probability)
After ”win” (LR=4.2):
Posterior odds = 4.2 × 1 = 4.2
Probability = 4.2
5.2 ≈ 81%
After ”million” (LR=5.1):
Posterior odds = 5.1 × 4.2 = 21.4
Probability = 21.4
22.4 ≈ 96%
After ”dollars” (LR=0.8):
Posterior odds = 0.8 × 21.4 = 17.1
Probability = 17.1
18.1 ≈ 94%
Final classification: SPAM (94% confidence)
Getachew M. Real World AI November 16, 2025 16 / 18
Handling Zero Counts
The Zero Problem
If word never appears in training data for a class...
Probability estimate becomes zero
This can wreck the entire calculation!
Solution: Smoothing
Add small constant to all counts
1
Example: Use 100000 as minimum probability
Prevents division by zero
Improves generalization to new data
Example
Without smoothing: ”adclick” in ham = 0/306438 = 0
With smoothing: ”adclick” in ham 1/100000
Much more reasonable estimate!
Getachew M. Real World AI November 16, 2025 17 / 18
Real-world Applications of Bayesian Methods
Everyday Applications: Advanced Applications:
Email spam filters Genetic analysis
News recommendation Drug discovery
Medical diagnosis aids Weather prediction models
Fraud detection systems Financial risk assessment
Search engines Legal evidence evaluation
Voice recognition Autonomous vehicle perception
Key Advantage
Bayesian methods naturally handle:
Uncertainty and noise
Conflicting evidence
Prior knowledge incorporation
Sequential information updating
Getachew M. Real World AI November 16, 2025 18 / 18