Missing Values Have Reasons
Pantry asks customers to rate every delivery, but 40% of orders have no rating. The dashboard simply ignores the blanks and shows an average of 4.45 stars. Before anyone celebrates, ask a simple question: who skips the rating? If the customers who stay silent are different from the ones who answer, 4.45 describes the talkers, not the customers.
The rule
Before filling or dropping blanks, ask why they are blank.
Blanks arise in roughly three ways, and each calls for a different response:
- Unrelated to anything: a logging outage lost the ratings for three days. The gaps are a random slice of orders, so dropping them costs data but adds no bias.
- Explained by something you recorded: an old app version never shows the rating prompt. The blanks depend on
app_version, which you have, so you can compare like with like within each version. - Caused by the missing value itself: customers who had a bad delivery close the app without rating. Now the blanks hide exactly the low scores, and both dropping them and filling them with the average will overstate satisfaction.
You usually cannot prove which case you are in, but you can gather strong clues.
The shortcut
Compare the blanks with the non-blanks on columns you do have. If the two groups look alike, dropping is fairly safe. If they differ, the blanks are telling you something.
Split the orders
60% of orders have a rating and 40% do not.
The weighting in the last step assumes that an unrated order would have scored like a rated order with the same lateness. It is an assumption, but a far more honest one than pretending the blanks are random. Filling every blank with the overall average is the worst of both worlds: it keeps the bias and makes the column look complete.
Drills
Answer fast — trust the rule.
A server outage lost the ratings for all orders on three random days. Does dropping those rows bias the average rating?
What happens if you fill every missing rating with the average of 4.45?
You are building a churn model. What is a useful way to keep the information in the missing ratings?
Remember
- Before filling or dropping blanks, ask why they are blank.
- Compare rows with and without the value on columns you trust.
- Trap: filling blanks with the average, which hides the missingness and keeps the bias.
