AWS Certified Machine Learning – SpecialtyExploratory Data AnalysisMedium
A data scientist is performing Exploratory Data Analysis (EDA) on a dataset of customer demographics. They want to investigate if there is a statistically significant association between two categorical variables: 'customer_segment' (e.g., 'New', 'Regular', 'VIP') and 'preferred_communication_channel' (e.g., 'Email', 'SMS', 'Phone'). Which statistical test is most appropriate to determine this association?
- AIndependent samples t-test
- BChi-squared test of independence
- CPearson correlation coefficient
- DANOVA
Show answer & explanationAnswer & explanation
Correct answer: B. Chi-squared test of independence
The Chi-squared test of independence is specifically designed to assess whether there is a statistically significant association between two categorical variables. In this scenario, both 'customer_segment' and 'preferred_communication_channel' are categorical, making the Chi-squared test the correct choice.
Why the other options are wrong
- A. An independent samples t-test compares the means of two independent groups on a continuous variable, which is not applicable here as both variables are categorical.
- C. The Pearson correlation coefficient measures the linear relationship between two continuous variables, not the association between categorical variables.
- D. ANOVA is used to compare the means of three or more groups on a continuous variable, not for assessing association between categorical variables.
Chi-squared Test of Independence
A non-parametric statistical test used to determine if there is a statistically significant association between two categorical variables.
- Compares observed frequencies to expected frequencies.
- Used for categorical data.
- Null hypothesis: variables are independent (no association).
Memory trick: Chi-squared: 'C'ategorical 'C'omparison, 'C'hecking independence.