Courseiva
Exploratory Data AnalysishardMultiple SelectObjective-mapped

Statistical Tests for Categorical Features vs Binary Target

A data scientist is analyzing a dataset with several categorical features and a binary target. The scientist wants to check for association between each categorical feature and the target. Which THREE statistical tests are appropriate?

Quick Answer

This question is really asking you to match statistical tests to the type of variables involved, and all three variables here, the categorical features and the binary target, are categorical in nature, which rules out any test built for continuous data. The chi-square test of independence is the foundational tool for this situation because it directly tests whether two categorical variables are statistically associated, comparing observed frequencies in a contingency table against what would be expected if the variables were independent. Cramér's V builds on that same chi-square statistic but rescales it into a bounded measure of association strength, which chi-square alone doesn't provide, so it answers not just whether an association exists but how strong it is. Mutual information adds a third, complementary lens: it's a non-parametric measure that can capture more complex or non-linear dependency patterns between categorical variables that chi-square-based methods might not fully characterize. ANOVA and Pearson correlation are both designed for continuous data, ANOVA compares means of a continuous variable across groups, and Pearson measures linear correlation between two continuous variables, so neither is appropriate when every variable involved is categorical. Whenever a question specifies categorical features and a categorical (including binary) target and asks about testing association, expect the correct answers to cluster around chi-square-family and information-theoretic measures rather than tests meant for continuous variables.

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

Chi-square test of independence

Options C, D, and E are correct. The chi-square test of independence is used to test for association between two categorical variables, such as a categorical feature and a binary target. Cramér's V is a measure of association derived from chi-square, indicating the strength of association. Mutual information is a non-parametric measure that captures dependency between variables, including non-linear relationships, and is suitable for categorical data. Option A (ANOVA) is used for comparing means across groups and is appropriate for a continuous dependent variable, not a binary target. Option B (Pearson correlation coefficient) measures linear correlation between two continuous variables and is not suitable for categorical data.

Answer analysis

Option-by-option breakdown

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

  • ANOVA

    Why it's wrong here

    Used for comparing means across categories, not for categorical-categorical.

  • Pearson correlation coefficient

    Why it's wrong here

    For continuous variables only.

  • Chi-square test of independence

    Why this is correct

    Tests association between two categorical variables.

  • Mutual information

    Why this is correct

    Captures dependence between categorical variables.

  • Cramér's V

    Why this is correct

    Measures association strength based on chi-square.

About these practice questions

Courseiva writes every MLS-C01 question from scratch — 1,672 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

2 more ways 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. A data scientist is analyzing a dataset with a large number of categorical features. The target variable is binary. Which technique should the scientist use to assess the relationship between each categorical feature and the target?

hard
  • A.ANOVA
  • B.Point-biserial correlation
  • C.Cramér's V
  • D.Chi-square test of independence

Why D: The chi-square test of independence is appropriate for testing association between categorical features and a binary target. ANOVA is for continuous target. Mutual information measures dependency but is not a hypothesis test. Point-biserial correlation is for continuous and binary. Cramér's V is a measure of association after chi-square.

Variation 2. A machine learning engineer is analyzing a dataset with a mix of categorical and numerical features. The engineer wants to understand the correlation between categorical features and the target variable. Which statistical test is most appropriate for measuring association between a categorical feature and a binary target?

medium
  • A.Pearson correlation coefficient
  • B.ANOVA (Analysis of Variance)
  • C.Chi-squared test of independence
  • D.Mutual information

Why C: The Chi-squared test of independence is used to determine if there is a significant association between two categorical variables, which is applicable here. Option A is wrong because Pearson correlation is for continuous variables. Option B is wrong because ANOVA is for comparing means across groups, but assumes continuous target. Option D is wrong because Mutual Information can be used but is not a statistical test with a p-value.

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.