I am not formally trained in statistics so please bear with me. I am interested in seeing if the explanatory variable in an experiment is correlated with the response variable. However the response variable is binary (pass/fail). What would the appropriate test for relationship be?
2 Answers
If you simply seek a correlation coefficient then you can compute the Point-Biserial Correlation Coefficient, and this will produce a statistic in the range of (-1, 1)
However, since you mention the response and explanatory variables, I suspect you would like to fit a regression model. An appropriate model in this case is Logistic Regression, a specific type of a generalized linear model, which will provide an odds ratio.
Could you please provide some more information? Have you tried any correlation tests? Parametric or non-parametric, and if so, was the result unsatisfactory?
Depending on your data you could try Pearson Correlation, Spearman Correlation or another test. If your using python check the functions provided by scipy here see Robert Long's comment and reply
Furthermore, please do a more comprehensive search on this stack. This has too be a duplicate question. (e.g Correlation issue)
-
1$\begingroup$ Pearson's correlation and Spearman's correlation are both innapropriate when one of the variables is binary. $\endgroup$ Commented Apr 12, 2019 at 8:50