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?
- APearson correlation coefficient, to measure linear relationship.
- BChi-squared test of independence, to assess association between categorical variables.
- CANOVA, to compare means across multiple groups.
- DIndependent samples t-test, to compare means of two groups.
Show answer & explanationAnswer & 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.