Note that in a sense there are two different types of statistics under consideration. Hypothesis tests, and measures of association (which might be called effect size statistics).
1. A dichotomous variable could be treated either as a nominal variable or an ordinal variable. That is, you could use 5. or 7.
1a. and 5. For two ordinal variables, Kendall (Stuart) tau-c, Kendall tau-b, Spearman correlation. Also Somers’ D (or delta), Goodman and Kruskal's gamma. Also polychoric correlation.
These may have hypothesis tests associated with them. Or a confidence interval could be constructed about the statistic.
1b and 7. For a nominal variable and an ordinal variable. Freeman’s theta and epsilon-squared (for ordinal variables; that is, that would be used in association with a Kruskal-Wallis test).
A hypothesis test for situation is the extented Cochran-Armitage test. Perhaps also, Kruskal-Wallis test.
IMO the easiest way to deal with this problem and at the same time is use various types of regression for each of these situations. A reference set comes from Frank Harrell Jr of Vanderbilt University Dept. Of Biostatistics and is attached below. Now which gets used for what? 6 Ordinary least squares 5 ordinal logistic regression 4. Binary logistic regression 3 ordinal logistic regression 2 binary logistic regression, 1 either binary logistic regression or ordinal logistic regression depending on which one is the DV. Best wishes David Booth examples in R and more details are in the notes.
D. Eastern Kang Sim , unfortunately things aren't always that simple, and it's probably not a good idea to let a simple algorithm choose the measure of association for you. It's better to understand each method before making a choice.
As you can see in my answer, for ordinal x ordinal correlation, there are several different options.
Polychoric and tetrachoric assume there is an underlying continuous latent variable, which may not be the case when there are categorical variables. (But is a common assumption in psychology or sociology.) As general advice, I would avoid polychoric and tetrachoric correlation unless you are explicitly making the assumption of underlying continuous variables.
In the continuous case, Pearson may not be default choice.
All that being said, as long as you choose an appropriate method given the type of variables you have, and you are using correlation for general purposes, the specific method chosen may not matter much.
Hello Ehab Mustafa. For the 6 scenarios you listed, is one of the variables an outcome and the other explanatory? Or is there no such distinction between the variables? My question is prompted by the suggestion that you use regression models. IMO, regression makes (most) sense if one variable is an outcome and the other is explanatory. YMMV. Thanks for clarifying.
On Bruce Weaver 's point on regression and directionality, if it is not directional but you still want to use regression, that are approaches that rather than just minimizing the vertical distances in the scatterplot, take into account both. Here is the bit from my teaching materials (and book to be) in the regressions with just two variables chapter.
Let me add a more controversial comment. Suppose you have two variables that most people would claim are ordinal (e.g., the place in a race of 100 people on consecutive days). And suppose that you are interested in knowing if there is a straight line relationship (perhaps looking at regression towards the mean). The assumption that they are ordinal variables does not trump your desire to evaluate if there is a straight line relationship. Your research questions and what you want to use the answers for is more important for deciding the statistical procedure. So in this sense, your question cannot (and should not have been) answer.
Daniel Wright , the thing is with your example, that you're treating the data as interval in nature, and not simply ordinal. Which is fine. It's essentially a rank transformation. But it is assuming that there is equal spacing between the values. In some cases, you'd want to treat this kind of data as ordinal. For example if you don't know if Place 1 is perhaps far above Place 2, and Place 2 and Place 3 are relatively close. In this case, it wouldn't make sense to think of a linear relationship (unless you know the relative spacing of the Places), or, e.g., thinking about the mean.
Sal Mangiafico , I agree. If it makes sense to think of a linear relationship, the variables (both) are not how many people think of as ordinal. I am just re-stating Lord's football number example.
There are several statistical tests that can be used to test for the existence of a correlation between two variables. The most common test for correlation is Pearson's correlation coefficient, which measures the linear relationship between two continuous variables. This test is appropriate when the variables are normally distributed and have a linear relationship.
If the variables are not normally distributed or have a nonlinear relationship, you may want to consider using Spearman's rank correlation coefficient or Kendall's rank correlation coefficient. These tests are based on the rank of the values rather than the actual values, so they are more robust to violations of the assumptions of the Pearson correlation coefficient.
It's important to note that these tests can only detect linear or monotonic relationships between variables. If the relationship between the variables is more complex, other techniques such as regression analysis or nonparametric tests may be more appropriate.
It's also important to carefully consider the research question you are trying to answer and choose the appropriate test based on the characteristics of the data and the assumptions of the test.
The statistical test used to test for correlation depends on the type of variables involved in the analysis. The most common tests for correlation include:
Pearson's correlation coefficient: This test is used when both variables are continuous and normally distributed. It measures the linear association between two continuous variables.
Spearman's rank correlation coefficient: This test is used when one or both variables are ordinal or not normally distributed. It measures the monotonic association between two variables.
Kendall's tau: This test is used when one or both variables are ordinal or not normally distributed. It measures the rank correlation between two variables.
In addition to the above tests, it is important to consider the sample size and the distribution of the data when choosing a correlation test. If the sample size is small (n < 30), it is recommended to use non-parametric tests such as Spearman's rank correlation or Kendall's tau.
It is also important to consider the assumptions of the test and check for outliers and other potential sources of confounding before conducting the test. Further analysis such as regression analysis may be necessary to explore the relationship between the variables in more detail.
Use Pearson’s correlation coefficient or Spearman’s rank correlation coefficient. Pearson’s correlation coefficient is used when the data is normally distributed and the relationship between the variables is linear. Spearman’s rank correlation coefficient is used when the data is not normally distributed or the relationship between the variables is non-linear