MLA-C01 Practice Question 11: Missing Value Imputation
AWS Certified Machine Learning Engineer – Associate (MLA-C01) · Test 2 · question 1 of 10
A lender is preparing a tabular loan dataset in Amazon S3 for a default-prediction model. The annual_income column is missing for about 6% of rows, the gaps are scattered across all customer segments, and the column is heavily right-skewed: most values fall between $30,000 and $120,000, but a handful of records exceed $20 million. Business analysts will build the cleaning logic in AWS Glue DataBrew as a reusable recipe, without writing code.
Which recipe step is the most appropriate way to handle the missing incomes?
Show answer and explanation
Answer:
This is a judgment call about the shape of the data. The median is the middle value of the column, so a few extreme incomes barely move it; the imputed value lands where a typical customer actually sits. DataBrew's FILL_WITH_MEDIAN step replaces missing data in a column with the median of all its values, and because it is saved in a recipe the same logic is applied every time the job runs. With only 6% of rows affected and the gaps spread evenly across segments, simple imputation keeps the rows without injecting much bias. (Adding a separate "income was missing" flag column is a common and sensible extra step, but the imputation choice itself is what the question asks.)
Option A throws away 6% of the training data and, if the model ever receives a live application with no income, it has never learned how to handle one. Deleting rows is reasonable when very few are affected or the data is irrecoverably corrupt, not as a default.
Option C is the classic mistake with skewed data. A few $20 million incomes drag the arithmetic mean far above what almost every customer earns, so every imputed row would be given an implausibly high income, a systematic distortion of exactly the feature a lender cares most about.
Option D invents a value that is not just missing but wrong: a zero income is a real, meaningful, and highly predictive state for a lender. The model would confuse "we do not know" with "earns nothing". If you want the model to learn from missingness, add an indicator column rather than overloading a real value.
References: FILL_WITH_MEDIAN; Data quality recipe steps