Courseiva
Data AnalysishardMultiple ChoiceObjective-mapped

DA0-002 Data Analysis Practice Question

A marketing analyst wants to segment customers based on purchasing behavior and demographics. The dataset includes continuous variables (spending amount, frequency) and categorical variables (region, gender). The analyst decides to use k-means clustering. What should the analyst do to prepare the data?

⚠ Common exam trap

Test-takers frequently assume k-means can natively handle mixed data types because it is a common clustering algorithm, but it strictly requires numerical input and scale normalization to avoid skewed distance calculations.

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

Standardize continuous variables and one-hot encode categorical variables

K-means clustering relies on Euclidean distance, which is sensitive to the scale of features. Standardizing continuous variables (e.g., spending amount, frequency) ensures they contribute equally to distance calculations, while one-hot encoding categorical variables (e.g., region, gender) converts them into numerical form without implying ordinal relationships, allowing k-means to process mixed data types correctly.

Answer analysis

Option-by-option breakdown

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

  • Use raw data because k-means works with mixed types

    Why it's wrong here

    K-means requires numerical input; raw categorical data would be misinterpreted.

  • Standardize continuous variables and one-hot encode categorical variables

    Why this is correct

    Standardization ensures equal weight; one-hot encoding converts categories to binary vectors.

  • Apply PCA first to reduce dimensionality

    Why it's wrong here

    PCA can be applied after standardization, but it is not necessary for data preparation.

  • Remove categorical variables entirely

    Why it's wrong here

    Removing categorical variables loses important demographic information.

About these practice questions

This DA0-002 question is part of Courseiva's 986-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This DA0-002 practice question is part of Courseiva's free CompTIA 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 DA0-002 exam.