Databricks Machine Learning Professional Question 261
Single answerYou are working on a machine learning project aimed at predicting customer churn for a subscription-based service. You have categorical data on customer demographics, such as 'Subscription Type' (Basic, Premium, Enterprise) and 'Churn' (Yes, No). Which scenario would be most appropriate for using a chi-square test?
- A
To determine if the 'Subscription Type' is independent of 'Churn'.
- B
To evaluate the correlation between 'Churn' and the customer's monthly expenditure.
- C
To assess whether 'Subscription Type' affects the model's accuracy after training.
- D
To test if the distribution of 'Subscription Type' matches the expected distribution in a new dataset.
Show answer and explanation
Correct answer: A
Explanation
The chi-square test is a statistical method used to determine if there is a significant association between two categorical variables. In this scenario, 'Subscription Type' and 'Churn' are both categorical, making the chi-square test appropriate for assessing whether they are independent of each other. This insight can inform feature selection or preprocessing steps in the machine learning pipeline.
- A. Correct.
Correct: A chi-square test is used to evaluate the independence between two categorical variables, such as 'Subscription Type' and 'Churn'.
- B. Incorrect.
Incorrect: Correlation is typically measured for continuous variables, and the chi-square test is not suitable for this purpose.
- C. Incorrect.
Incorrect: Assessing model accuracy is not related to the chi-square test, as it does not involve testing relationships between categorical features.
- D. Incorrect.
Incorrect: Testing if a distribution matches an expected distribution would involve a goodness-of-fit test, not a test of independence.