AWS Certified Machine Learning – SpecialtyExploratory Data AnalysisMedium

A data scientist is performing Exploratory Data Analysis (EDA) on a dataset of customer demographics for a new product launch. They have collected data on 'age', 'gender', 'income_level' (low, medium, high), and 'purchase_intent' (binary: yes/no). The team wants to understand if there is a statistically significant association between 'income_level' and 'purchase_intent'. Which hypothesis test is the most appropriate to determine this association?

  1. APearson correlation coefficient, to measure linear relationship.
  2. BChi-squared test of independence, to assess association between categorical variables.
  3. CANOVA, to compare means across multiple groups.
  4. DIndependent samples t-test, to compare means of two groups.
Show answer & explanation

Correct answer: B. Chi-squared test of independence, to assess association between categorical variables.

The Chi-squared test of independence is specifically designed to determine if there is a statistically significant association between two categorical variables. In this scenario, both 'income_level' and 'purchase_intent' are categorical.

Why the other options are wrong

  • A. Incorrect. Pearson correlation is for linear relationships between two continuous variables.
  • C. Incorrect. ANOVA is used to compare the means of a continuous variable across three or more groups defined by a categorical variable.
  • D. Incorrect. An independent samples t-test compares the means of a continuous variable between two groups defined by a categorical variable.

Chi-squared Test of Independence

A non-parametric statistical test used to determine if there is a statistically significant association between two categorical variables.

  • Used for categorical data.
  • Tests if observed frequencies differ significantly from expected frequencies.
  • Null hypothesis: the variables are independent.

Memory trick: Chi-squared: 'C' for 'Categorical' connections.

More Exploratory Data Analysis questions