What is a weighted average, and when should you use it instead of a simple average?
A weighted average multiplies each value by its importance (weight) and divides by the total weight. Use it when items do not count equally, such as marks with different credit values or averaging group means of unequal size.
Explain it simply
In a semester, a 5-credit subject should matter more to your CGPA than a 2-credit one. A simple average treats both the same; a weighted average respects the credits.
Weighted average = (sum of value x weight) / (sum of weights).
Example
Marks of 80, 70 and 90 with weights 2, 3 and 5 (percent of final grade, say):
- Simple mean = (80 + 70 + 90) / 3 = 80
- Weighted = (80 x 2 + 70 x 3 + 90 x 5) / 10 = (160 + 210 + 450) / 10 = 82
import numpy as np
print(np.average([80, 70, 90], weights=[2, 3, 5])) # 82.0A common data trap is averaging averages. If Pune has 100 orders at Rs 200 average and Delhi has 900 orders at Rs 300 average, the true overall average is (100 x 200 + 900 x 300) / 1000 = Rs 290, not Rs 250.
What to say in the interview
"When observations carry unequal importance or groups have unequal sizes, I use a weighted average. Averaging group averages directly is a classic mistake; I weight each group mean by its count to recover the overall mean."
Common mistakes
- Taking the mean of city-wise or month-wise averages without weighting by counts.