In a dataset of cars, a column 'colour' has missing values. The dataset has to be free of any missing values. Which measure of central tendency we should use to fill the data?
In a dataset of cars, a column 'colour' has missing values. The dataset has to be free of any missing values. Which measure of central tendency we should use to fill the data?
Solution
Colour is a categorical (nominal) variable, so its values are labels such as "red" or "blue", not numbers. The only measure of central tendency that works on labels is the mode, the most frequent value. Missing colours are filled with the most common colour in the column.
Options 1 and 2: the mean needs numeric values to add, and the median needs values that can be ordered, which colours cannot be.
Option 4: count is just the number of entries, not a measure of central tendency.
Related questions:
2026: 23 May Shift 1
2026: 11 May Shift 2
2026: 29 May Shift 2
2025: 3 June Shift 2