Measure correlation for categorical vs continous variable
By saying you want to &quot;explain Y by X&quot; it sounds that you try to build a classifier F that can map X values into expected Y: F(X) --&gt; Y.
If so, you don't have to search for &quot;correlation&quot; necessarily.
There are various methods to build such a classifier. You can use logistic regression \ SVM \ Neural network \ etc.
Besides, if it make more sense for you, you can always first discretize the continuous variables into categorical vars and than use also other methods such as decision trees \ Naive Bayes and more.