Databricks Machine Learning Associate Question 181
Select 3You are working on a machine learning project using a dataset with missing numerical values. You are deciding between imputing the missing values with the mean or the median. Which of the following statements are true regarding the difference between these two approaches?
- A
Imputing with the mean is more sensitive to outliers compared to imputing with the median.
- B
Imputing with the median is generally better for skewed data compared to imputing with the mean.
- C
Imputing with the mean can lead to biased predictions if the data contains extreme outliers.
- D
Imputing with the median is always preferable, regardless of the distribution of the data.
- E
Both mean and median imputation preserve the original variance of the dataset.
Show answer and explanation
Correct answers: A, B, C
Explanation
Deciding between mean and median imputation depends on the characteristics of the data. Mean imputation works well for normally distributed data but is sensitive to outliers, which can skew the results. Median imputation, on the other hand, is robust to outliers and better for skewed data. However, neither approach preserves the original variance of the dataset. Understanding the data distribution and its potential outliers is crucial for selecting the appropriate imputation method.
- A. Correct.
Mean imputation is sensitive to outliers because the mean is directly affected by extreme values, making it less robust for datasets with significant outliers.
- B. Correct.
Median imputation is better suited for skewed data because the median is less influenced by extreme values, making it a better representation of the central tendency in such cases.
- C. Correct.
Mean imputation can introduce bias in predictions when extreme outliers are present, as it shifts the central tendency away from the typical values in the dataset.
- D. Incorrect.
While median imputation is robust to outliers, it is not always preferable. The choice between mean and median imputation depends on the data distribution and the specific problem at hand.
- E. Incorrect.
Neither mean nor median imputation preserves the original variance of the dataset, as replacing missing values inherently alters the distribution.