AWS Certified Machine Learning – SpecialtyExploratory Data AnalysisMedium
A financial institution is analyzing credit card transaction data to detect fraudulent activities. They have a dataset with features like transaction amount, time, merchant category, and number of previous transactions. Before building a predictive model, they want to understand the relationships between these features. Specifically, they need to identify if there's a linear relationship between transaction amount and the number of previous transactions, and how strong that relationship is. Which statistical analysis method is most suitable for this purpose?
- AChi-squared test, to assess the independence of categorical variables.
- BANOVA (Analysis of Variance), to compare means across multiple groups.
- CT-test, to compare the means of two groups.
- DPearson correlation coefficient, to measure the linear relationship between two continuous variables.
Show answer & explanationAnswer & explanation
Correct answer: D. Pearson correlation coefficient, to measure the linear relationship between two continuous variables.
The Pearson correlation coefficient is specifically designed to measure the strength and direction of a linear relationship between two continuous variables, which directly addresses the requirement to understand the linear relationship between transaction amount and number of previous transactions.
Why the other options are wrong
- A. Incorrect. Chi-squared test is for categorical variables, not for measuring linear relationships between continuous variables.
- B. Incorrect. ANOVA compares means across groups, typically when one variable is categorical and another is continuous, not for linear correlation between two continuous variables.
- C. Incorrect. A T-test compares the means of two groups, which is not suitable for assessing the linear relationship between two continuous variables.
Pearson Correlation Coefficient
A measure of the linear correlation between two continuous variables, ranging from -1 (perfect negative linear correlation) to +1 (perfect positive linear correlation), with 0 indicating no linear correlation.
- Measures linear relationships only.
- Values range from -1 to +1.
- Sensitive to outliers.
Memory trick: Pearson's 'R' for linear 'relations' you see.