Courseiva
Exploratory Data AnalysiseasyMultiple ChoiceObjective-mapped

MLS-C01 Exploratory Data Analysis Practice Question

A data scientist is performing EDA on a dataset that contains customer demographics and purchase history. The dataset has a column 'age' with some values that are negative or unreasonably high (e.g., 200). The scientist wants to identify and handle these outliers. The scientist is using a SageMaker notebook with pandas. Which approach should the scientist take to effectively handle these outliers?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Define reasonable bounds based on domain knowledge and filter or cap the outliers

The most appropriate approach is to define reasonable bounds based on domain knowledge (e.g., 0-120) and filter out or cap the outliers. Option A is incorrect because standard scaling does not handle outliers; it will still be influenced by extreme values. Option B is incorrect because imputing with the mean can distort the distribution when outliers are present. Option D is incorrect because removing the entire column discards valuable information.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Apply standard scaling to the 'age' column

    Why it's wrong here

    Scaling does not remove or correct outliers.

  • Impute the outlier values with the mean of the column

    Why it's wrong here

    Imputation with mean is sensitive to extreme outliers.

  • Define reasonable bounds based on domain knowledge and filter or cap the outliers

    Why this is correct

    Domain knowledge provides logical bounds to handle outliers appropriately.

  • Remove the 'age' column entirely

    Why it's wrong here

    Removing a potentially important feature loses information.

About these practice questions

One of 1,672 original MLS-C01 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more way this is tested on MLS-C01

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. An ML engineer is performing EDA on a dataset of customer transactions. The dataset has 1 million rows and 20 columns, including a 'transaction_amount' column. The engineer notices that 5% of the transaction amounts are negative, which are data entry errors. The rest are positive. Which approach is most appropriate for handling these negative values during EDA?

hard
  • A.Impute the negative values with the median of positive transaction amounts.
  • B.Remove rows with negative transaction amounts from the dataset.
  • C.Take the absolute value of the negative transaction amounts.
  • D.Cap the negative values at zero.

Why B: Removing rows with negative transaction amounts is the most appropriate approach during EDA. The negative values are data entry errors, not legitimate transactions. Removing them cleans the dataset without introducing bias from imputation or transformation. Option A is incorrect because imputing negative values with the median would treat the errors as missing data, but they are not missing; they are erroneous. This could distort the distribution. Option C is incorrect because taking absolute values would convert errors into positive values, adding noise and misrepresenting the data (e.g., a negative $100 error becomes a legitimate $100 transaction). Option D is incorrect because capping negative values at zero would create a spike at zero and distort the distribution, treating errors as valid zero amounts. Therefore, removal is the cleanest approach for erroneous data.

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This MLS-C01 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the MLS-C01 exam.