Chebyshev’s Inequality Made Simple (With Real Examples)
๐ Table of Contents
- What is Chebyshev’s Inequality?
- Core Intuition
- Gaussian Example (Heights)
- Non-Gaussian Example (Income)
- Comparison Table
- Code Example
- CLI Output
- Key Takeaways
๐ What is Chebyshev’s Inequality?
Chebyshev’s inequality tells us how far values can be from the mean — for any dataset.
Formula:
P(|X - ฮผ| ≥ kฯ) ≤ 1 / k²
Meaning:
- k = number of standard deviations
- It gives a maximum possible percentage outside that range
๐ง Core Intuition
Chebyshev is a safety guarantee.
It says:
But it does NOT tell the exact distribution — only a safe upper limit.
๐ Gaussian Example (Heights)
Mean = 65 inches Standard deviation = 3 inches
Chebyshev Prediction
- k = 2 → ≤ 25% outside
- k = 3 → ≤ 11.1% outside
Actual Reality (Normal Distribution)
- 2ฯ → ~95% inside
- 3ฯ → ~99.7% inside
๐ฐ Non-Gaussian Example (Income)
Mean = $50,000 Standard deviation = $20,000 Distribution = Right-skewed
Chebyshev Prediction
- k = 2 → ≤ 25% outside
- k = 3 → ≤ 11.1% outside
Reality
Income data is skewed:
- More extreme values on the high side
- Not symmetric like Gaussian
๐ Comparison Table
| Feature | Gaussian | Non-Gaussian |
|---|---|---|
| Shape | Symmetric | Skewed |
| Accuracy of Chebyshev | Loose | Still safe but less informative |
| Extreme Values | Rare | More common |
| Best Use | Backup estimate | Safety guarantee |
๐ป Code Example
import numpy as np data = np.random.normal(65, 3, 1000) mean = np.mean(data) std = np.std(data) k = 2 outside = np.sum(np.abs(data - mean) >= k * std) prob = outside / len(data) print(prob)
๐ฅ CLI Output
0.048
≈ 4.8% outside 2ฯ → matches Gaussian (~5%)
No comments:
Post a Comment