Databricks Machine Learning Associate Question 512
Single answerYou are working on a dataset in Databricks that contains two continuous features: age and salary. You want to determine if there is a significant relationship between these two features. Which method would be the most appropriate to use?
- A
Pearson correlation coefficient
- B
Chi-square test
- C
ANOVA (Analysis of Variance)
- D
Kendall rank correlation coefficient
Show answer and explanation
Correct answer: A
Explanation
To compare two continuous features and determine their linear relationship, the Pearson correlation coefficient is the most suitable method. This metric quantifies the strength and direction of the linear association. Other methods like Chi-square and ANOVA are designed for categorical data or specific use cases, making them inappropriate in this scenario.
- A. Correct.
The Pearson correlation coefficient is used to measure the linear relationship between two continuous variables, making it the most appropriate choice in this scenario.
- B. Incorrect.
The Chi-square test is used to evaluate the relationship between two categorical variables, so it is not applicable for continuous features like
ageandsalary. - C. Incorrect.
ANOVA is used to compare the means of three or more groups, typically for one categorical and one continuous variable. It is not suitable for comparing two continuous features.
- D. Incorrect.
The Kendall rank correlation coefficient measures the ordinal association between two variables. While it can be used for continuous data, it is generally applied for non-linear or ordinal data. Pearson correlation is more suitable for linear relationships between continuous variables.