Databricks Machine Learning Associate Question 179
Select 3You are working on a dataset in Databricks with several missing values in a numerical column. You are considering imputing the missing values using either the mean or the median. Which of the following statements are correct when deciding between these two imputation strategies?
- A
Imputing with the mean is sensitive to outliers, as it can be heavily influenced by extreme values.
- B
Imputing with the median is more robust to outliers, making it a better choice for skewed distributions.
- C
Imputing with the mean always reduces the variance of the dataset more effectively than imputing with the median.
- D
The median is always the best imputation strategy, regardless of the data's distribution or presence of outliers.
- E
When the data is symmetrically distributed without extreme outliers, imputing with the mean and median will likely produce similar results.
Show answer and explanation
Correct answers: A, B, E
Explanation
The decision to impute missing values with the mean or median depends on the data's characteristics. The mean is sensitive to outliers and may not be appropriate for skewed data, while the median is more robust in such cases. However, when the data is symmetrically distributed and lacks extreme values, both methods are likely to perform similarly.
- A. Correct.
Correct. The mean is calculated by averaging all values in the column, and extreme values can disproportionately affect the result.
- B. Correct.
Correct. Since the median is the middle value of a sorted dataset, it is not influenced by extreme outliers, making it more robust for skewed data.
- C. Incorrect.
Incorrect. While imputing with the mean can sometimes reduce variance, this is not guaranteed, especially for skewed or non-normal distributions.
- D. Incorrect.
Incorrect. The best imputation strategy depends on the data's characteristics, such as its distribution and presence of outliers, rather than always defaulting to the median.
- E. Correct.
Correct. In a symmetrically distributed dataset without outliers, the mean and median are typically close in value, so both imputation methods yield similar results.