How do i check that two random variables satisfy the requirements for computing correlation via Pearson or Spearman? If the data is non-linear/ non-Monotonic, are there other tests i could use to compute a correlation coefficient?
Distance correlation takes also nonlinear correlations into account.
Correlation is a measure of association between two variables. It does not establish linearity or no linearity. It provides us with indication whether the relationship is generally positive or negative and its average magnitude.
If one has grouped data on each of two variables, Pearson correlation may be calculated. And also if we have continuous data, the Karl Pearson formula of correlation coefficient can be applied. Spearman correlation requires the rank database.