Databricks Machine Learning Associate Question 183
Select 3A data scientist is working with a dataset containing numerical features that have missing values. The scientist is deciding whether to impute the missing values using the mean or the median. Which of the following statements correctly describe the differences between these two imputation methods?
- A
Imputing with the mean is more sensitive to outliers compared to imputing with the median.
- B
Imputing with the median is generally more robust for skewed data distributions than imputing with the mean.
- C
Imputing with the mean always results in better model performance than imputing with the median.
- D
Both mean and median imputation preserve the overall data distribution exactly.
- E
Median imputation can reduce the influence of extreme values on the dataset compared to mean imputation.
Show answer and explanation
Correct answers: A, B, E
Explanation
Mean imputation is more sensitive to outliers because it incorporates all values in its calculation, including extreme ones, which can distort the imputed value. Median imputation, on the other hand, is more robust in the presence of outliers or skewed data distributions as it focuses on the central tendency. The choice between mean and median should be informed by the characteristics of the dataset, such as the presence of outliers or skewness, as well as the specific requirements of the machine learning model.
- A. Correct.
Correct: The mean is affected by extreme outliers, making it less robust than the median in datasets with significant outliers.
- B. Correct.
Correct: The median is less affected by skewed distributions, making it a more robust choice for such data.
- C. Incorrect.
Incorrect: The choice between mean and median imputation depends on the dataset and model being used. Neither method guarantees better performance in all cases.
- D. Incorrect.
Incorrect: Neither method preserves the exact data distribution; both introduce a form of approximation when filling in missing values.
- E. Correct.
Correct: Since the median is less influenced by extreme values, it reduces their impact compared to mean imputation.