Numerical Problems MLE and MAP
๐ Numerical Problem: Binomial + Beta (MLE & MAP)
๐ Problem
A coin is tossed 10 times, and the number of heads observed is 7.
Assume:
Tasks:
-
Find the MLE estimate of
-
Assume prior:
Find the MAP estimate of - Compare the results
✅ Step 1: MLE Estimate
For Binomial distribution:
Where:
-
,
✅ Step 2: MAP Estimate
๐น Formula (Very Important)
๐น Substitute values
-
-
-
,
✅ Final Answers
| Method | Estimate |
|---|---|
| MLE | 0.7 |
| MAP | 0.667 |
๐ฅ Key Insight
MAP = MLE + Prior influence
๐ Modified Problem (Stronger Prior Effect)
Suppose:
๐น Recompute MAP
๐ฅ Comparison
| Method | Value |
|---|---|
| MLE | 0.7 |
| MAP (weak prior) | 0.667 |
| MAP (strong prior) | 0.571 |
๐น Insight
- Strong prior → more influence
- Estimate moves closer to 0.5
๐ Summary (Exam Ready)
- MLE:
- MAP:
✅ Practice Question (Try Yourself)
A machine produces defective items. Out of 20 items, 6 are defective.
- Find MLE of defect probability
- Assume prior , find MAP
๐ Numerical Problem: MLE vs MAP (Gaussian Mean)
๐ Problem
Given data:
Assume:
-
Data follows
- Variance (known)
Also given prior:
๐น Tasks
-
Find MLE estimate of
-
Find MAP estimate of
- Compare both results
✅ Step 1: Compute Sample Mean (MLE)
๐ MLE = 5
✅ Step 2: Compute MAP Estimate
Formula:
where:
๐น Calculate
๐น Substitute values
✅ Final Answers
| Method | Estimate |
|---|---|
| MLE | 5 |
| MAP | 5 |
๐น Interpretation
๐ Both are same because:
- Prior mean = data mean
- No conflict between data and prior
๐ Modified Problem (More Interesting)
Let’s slightly change prior:
- (strong prior away from data)
๐น Recompute MAP
๐ฅ Comparison
| Method | Value |
|---|---|
| MLE | 5 |
| MAP | 2.5 |
๐น Insight
- MLE depends only on data
- MAP is pulled toward prior
๐ This is called shrinkage effect
๐ Summary (Exam Ready)
- MLE:
- MAP:
✅ Practice Question (Try Yourself)
Given:
- Data:
-
, ,
๐ Find MLE and MAP
Comments
Post a Comment