Covariance
Direction first, strength later 🔄
1️⃣ What is Covariance?
Covariance tells us how two variables move together.
- Both increase → Positive covariance
- One up, one down → Negative covariance
- No pattern → Zero covariance
👉 It answers:
“Direction same aa opposite aa?”
2️⃣ Real-World Examples
📚 Study & Marks
Positive covariance
Positive covariance
🌡️ Temperature & Heater
Negative covariance
Negative covariance
🎲 Shoe Size & IQ
Covariance ≈ 0
Covariance ≈ 0
3️⃣ Intuition (Student Friendly)
Each data point checks:
- X above average?
- Y above average?
Same sign → positive
Opposite sign → negative
4️⃣ Visual 1: Covariance Direction
5️⃣ Covariance vs Correlation (IMPORTANT)
| Covariance | Correlation |
| Shows direction only | Shows direction + strength |
| Depends on scale | Scale independent |
| Range is unlimited | Always between -1 and +1 |
| Hard to interpret alone | Easy to interpret |
👉 Correlation = Normalized Covariance
6️⃣ Visual 2: Same Relationship – Different Scale
Covariance changes with scale, correlation does not.
7️⃣ Covariance Formula
Cov(X,Y) = Σ (Xi − X̄)(Yi − Ȳ) / (n − 1)
Interview Checkpoint 🎯 (5)
1. What does covariance tell?
Direction of relationship.
2. Why not use covariance alone?
Scale dependent.
3. Range of covariance?
Unlimited.
4. Relation between covariance & correlation?
Correlation is normalized covariance.
5. Where is covariance used?
PCA, finance, statistics.