Calculate Spearman and Pearson correlation on variables of different units If for example I have the following data
X     Y
3.2   0
1.5   0
6.5   3
2.4   1
6.2   3

where X is a value between 1 (best case) and 7 (worst case)
and Y is a value between 0 (best case) and 3 (worst case)
and I would like to compute Spearman or Pearson correlation between X and Y.
Do I need to convert into values with similar units?

Pearson correlation, $\rho_{XY}$, divides through by the product of the units and results in a unitless measure.
$$
\rho_{XY}=\dfrac{
\text{cov}\left(X,Y\right)
}{
\sigma_X\sigma_Y
}
$$
The covariance in the numerator has the product of the original units as its units, and then the denominator divides through by that product of units to result in a unitless quantity.
Spearman correlation is the Pearson correlation of the ranks, so similar logic applies (even if you consider the ranks to have units).
