Databricks Machine Learning Associate Question 180
Select 3You are building a machine learning model in Databricks and encounter missing values in a numeric feature. When deciding whether to impute the missing values using the mean or the median, which of the following considerations are correct?
- A
Imputing with the mean is more sensitive to extreme outliers in the data.
- B
Imputing with the median reduces the impact of extreme outliers compared to imputing with the mean.
- C
Imputing with the mean always leads to better model performance than imputing with the median.
- D
The median is less appropriate for normally distributed data compared to the mean.
- E
Both mean and median imputations assume that missing values are missing completely at random (MCAR).
Show answer and explanation
Correct answers: A, B, E
Explanation
Choosing between mean and median imputation depends on the data's distribution and the presence of outliers. The mean is sensitive to extreme values and is typically used for normally distributed data, while the median is robust to outliers and is preferable in skewed datasets. Both methods assume missing values are MCAR, so understanding the nature of the missing data is critical before applying these techniques.
- A. Correct.
Correct. The mean is sensitive to extreme outliers because it is calculated as the sum of all values divided by their count, so outliers can disproportionately skew this value.
- B. Correct.
Correct. The median is the middle value in a sorted list, which makes it robust to extreme outliers since it does not depend on the magnitude of the values.
- C. Incorrect.
Incorrect. Model performance depends on the data distribution and the model itself. The mean does not always guarantee better results than the median, especially in datasets with skewed distributions or outliers.
- D. Incorrect.
Incorrect. The median can still be appropriate for normally distributed data, but the mean is typically preferred in this case as it better represents the central tendency of a normal distribution.
- E. Correct.
Correct. Both mean and median imputations assume that the missing values are MCAR. If this assumption does not hold, using either method might introduce bias into the dataset.