0
$\begingroup$

What are the prerequisites that need to be fulfilled before conducting a chi-square test (Bivariate analysis)? For instance, before having a correlation matrix, we should first ensure linearity. What about the chi-square test? Are there any papers or resources that can be referenced for guidance on these prerequisites?

$\endgroup$
2
  • $\begingroup$ Your title and body do not match. Are you asking about the chi-square test assumptions? Or are you asking how to perform said test for feature selection? $\endgroup$ Jun 29, 2023 at 10:13
  • $\begingroup$ @user2974951, sorry if both body & title doesn't match. I'm asking when chi-square test is feasible. For example, if I plotted a feature against the output and now linearity exists, I cannot then use correlation, and using it at this point doesn't make sense. What about Chi-Squrare? What conditions do I have to check before applying this kind of test? Hope this clarifies my question. $\endgroup$
    – user
    Jun 29, 2023 at 14:31

1 Answer 1

0
$\begingroup$

The chi-square test is a non-parametric statistical test that is used to determine if there is a significant association between two categorical variables in a sample.

  • Categorical Variables: Both variables should be categorical

  • Independence: The observations should be independent of each other.

  • Sample Size: The sample size should be sufficiently large.

  • Mutually Exclusive Categories: Categories must be mutually exclusive.

$\endgroup$
2
  • $\begingroup$ Thank you for your response. I would like to clarify each condition to ensure that I understand them correctly. - Categorical Variables: Does this mean that the chi-square test is not suitable if one of the variables is numerical or boolean? - Independence: Could you explain what you mean by this? What is the distinction between association and dependence? I thought that the chi-square test performs a similar role to correlation but for categorical variables. And I specifically want to use this test to determine if there is a dependency between the two variables. $\endgroup$
    – user
    Jun 29, 2023 at 15:13
  • $\begingroup$ You can find multiple articles on chi-square, actually. I can suggest one approach. Use a RandomForest model on your data and then plot feature importance out of it. Then you can see all the columns/features that are contributing towards the model and which are not. Then you will better understanding of the columns and you can actually select those which you think are important and you can remove which are not important. $\endgroup$ Jun 29, 2023 at 15:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.