The correlation between two variables, \(x'\) and \(y'\) is:
\[\begin{align} r = \frac{\sum ^n _{i=1}w_i(x_i - \bar{x})(y_i - \bar{y})}{\sqrt{\sum ^n _{i=1}w_i(x_i - \bar{x})^2} \sqrt{\sum ^n _{i=1}w_i(y_i - \bar{y})^2}}\end{align}\]
where:
\(x = rank(x')\) and \(y = rank(y')\) where ties are replaced by their means,
\(\bar{x}\) and \(\bar{y}\) are their means, respectively,
\(w_i\) is the Calibrated Weight for the \(i\)th of \(n\) observations
\(p \approx \Pr(t_{\sum^n_{i=1}w_i-2} \ge r\sqrt{\frac{\sum^n_{i=1}w_i-2}{1 - r^2}})\)