4
$\begingroup$

I sometimes have to perform sample size calculations during the planning of a study. For some of these calculations, a correlation coefficient is needed as input. In my experience, the experts involved find it quite tricky to translate their experience into realistic values for the correlation. That's why I'm interested in other ways to elicit the correlation by re-expressing it as average absolute difference.

Specifically, assume that $n$ subjects are measured twice using the same instrument. Presumably, the two measurements of the same subject are correlated, say with correlation coefficient $\rho$. Information about the means and variances at both time points is available.

As an example: Assume that systolic blood pressure is measured before and after some intervention. The pre-intervention mean and variance are $130$ mmHg and $169$ mmHg$^2$. The post-intervention mean and variance are $118$ mmHg and $169$ mmHg$^2$. We assume a correlation of $0.65$ between pre- and post-measurements.

Question: How can (if at all) the correlation coefficient be expressed as average absolute differences between the two measurements from the same subjects?

This is somewhat analogous to Gini's mean difference which is the average distance between two measurements of two randomly drawn observations.

$\endgroup$
4
  • 2
    $\begingroup$ It cannot be done without additional information, such as the variance of the means of each pair. Compare, for instance, a set of estimates of the length of distances between world cities that all differ by less than 1 km and a set of estimates of the heights of buildings that all differ by less than 1 km: the first is great correlation while the latter is useless, even though both datasets might have the same average absolute difference. $\endgroup$
    – whuber
    Apr 1 at 19:54
  • 1
    $\begingroup$ @whuber We would have information about the pre- and post-means and variances. I will shortly edit the answer to reflect this. Does that make the questions answerable? $\endgroup$ Apr 2 at 7:06
  • 1
    $\begingroup$ Yes, at least approximately -- which suffices for this application. $\endgroup$
    – whuber
    Apr 2 at 13:19
  • 1
    $\begingroup$ You will likely find the various characterizations of $r$ at stats.stackexchange.com/questions/70969 to be useful. $\endgroup$
    – whuber
    Apr 5 at 14:29

2 Answers 2

2
+100
$\begingroup$

For two correlated variables, $X$ and $Y$, the difference is a normal distributed variable with variance and mean

$$ \begin{array}{rcl} \mu' &=& \mu_X-\mu_Y \\ \sigma' &=& \sqrt{ \sigma_{X}^2 + \sigma_{Y}^2 - 2 \rho \sigma_{Y} \sigma_{X}} \end{array}$$

The mean absolute value of this variable is (you can derive this for instance with the formula of the mean for a truncated normal distribution)

$$\bar{d} := E[|X-Y|] = \left( \Phi(|z|)-\Phi(-|z|)\right)\mu'+2\phi(z)\sigma'$$

Where $\phi$ and $\Phi$ are the pdf and cdf of the standard normal distribution and $z= \mu'/\sigma'$

If $\sigma=\sigma_X = \sigma_Y$ and $\mu_X = \mu_Y$ then this simplifies to

$$\bar{d} =\frac{2\sigma}{\sqrt{\pi}} \sqrt{1-\rho}$$

and

$$\rho = 1- \frac{\pi}{4} \frac{\bar{d}^2}{\sigma^2}$$


The assumption $\sigma=\sigma_X = \sigma_Y$ and $\mu_X = \mu_Y$ makes sense if you speak about expert experience about errors in terms of average absolute differences between two identical and independent distributed measurements.

$\endgroup$
4
  • $\begingroup$ Thank you. So basically, multiply $\sigma_{Y-X}$ by $\sqrt{2/\pi}$ to estimate the average of absolute differences? This works well if $d$ is mean zero but is wildly inaccurate if the pre- and post-measurements means are different. $\endgroup$ Apr 3 at 16:18
  • $\begingroup$ I found the exact solution in a paper (see my updated question). $\endgroup$ Apr 3 at 16:54
  • $\begingroup$ Very nice, thank you! But I suspect $\sigma'$ should involve a square root? $\endgroup$ Apr 7 at 16:08
  • $\begingroup$ @COOLSerdash yes square root. $\endgroup$ Apr 7 at 16:12
2
$\begingroup$

Assuming bivariate normality, the mean and standard deviation of the differences are normally distributed with mean and standard deviation $\mu_d = \mu_1 - \mu_2$ and $\sigma_d = \sqrt{\sigma_1^2 + \sigma_2^2 - 2\rho\sigma_1\sigma_2}$. The absolute values of these differences exhibit a folded normal distribution. According to Tsagris et al. (2014), the density function of a folded normal distribution $Y = |X|$ where $X\sim\operatorname{N}(\mu, \sigma^2)$ is: $$ f(x) = \sqrt{\frac{2}{\pi\sigma^2}}\exp{\left(-\frac{\left(x^2 + \mu^2\right)}{2\sigma^2}\right)}\cosh{\left(\frac{\mu x}{\sigma^2}\right)} $$ with mean and variance $$ \begin{array}{rcl} \mu_f &=& \sqrt{\dfrac{2}{\pi}}\sigma\exp{\left(-\dfrac{\mu^2}{2\sigma^2}\right)} + \mu\left[1 - 2\Phi\left(-\dfrac{\mu}{\sigma}\right)\right] \\ \sigma_f^2 &=& \mu^2 + \sigma^2 - \mu_f^2 \end{array} $$

Plugging in the values in the question, we get a mean and standard deviation of the absolute differences of $17.55$ and $9.96$, respectively. These values are in excellent agreement with the numerical simulation in R below.

An exact and general solution for bivariate normal distribution is given by equation 14 in Vila et al. (2024) in section 4.1.

First, define $$ c_{i,j}=\sqrt{1 - \rho_{i,j}^2+\left[\left(\sigma_j/\sigma_i\right)-\rho_{i,j}\right]^{2}} $$ where $\sigma$ denote the standard deviation and $\rho$ the correlation coefficient.

Gini's mean difference is then given by $$ GMD_2 =\frac{2 \sigma _2 \left(\frac{\sigma _2}{\sigma _1}-\rho \right) \phi \left(\frac{\mu _2-\mu _1}{\sigma _1 c_{1,2}}\right)}{c_{1,2}}+\frac{2 \sigma _1 \left(\frac{\sigma _1}{\sigma _2}-\rho \right) \phi \left(\frac{\mu _1-\mu _2}{\sigma _2 c_{2,1}}\right)}{c_{2,1}}+2 \mu _1 \Phi \left(\frac{\mu _1-\mu _2}{\sigma _2 c_{2,1}}\right)+2 \mu _2 \Phi \left(\frac{\mu _2-\mu _1}{\sigma _1 c_{1,2}}\right)-\mu _1-\mu _2 $$ where $\phi$ and $\Phi$ denote the PDF and CDF of the standard normal while $\sigma$ and $\mu$ are the standard deviations and means of the involved variables.

For the example given in the question with $\mu_1 = 130, \mu_2 = 118, \sigma_1 =\sigma_2=13, \rho_{1,2}=\rho_{2,1} = 0.65$, the formula evaluates to $17.55$. A quick simulation is in excellent agreement with this result:

library(MASS) # For multivariate normal

set.seed(142857)

# Sample size for simulation
n <- 1e7

# Means
mu1 <- 130
mu2 <- 113

# Standard deviations
s1 <- 13
s2 <- 13

sdmat <- diag(c(s1, s2))

# Correlation 

rho <- 0.65

corrmat <- matrix(c(1, rho, rho, 1), 2, 2, byrow = TRUE)

# Generate variance-covariance matrix
Sigma <- sdmat%*%corrmat%*%sdmat

# Simulate data
x <- mvrnorm(n, mu = c(mu1, mu2), Sigma = Sigma)

# Calculate mean and standard deviation of absolute difference
mean(abs(x[, 1] - x[, 2]))
[1] 17.55119
sd(abs(x[, 1] - x[, 2]))
[1] 9.961126

References

Tsagris, M., Beneki, C., & Hassani, H. (2014). On the folded normal distribution. Mathematics, 2(1), 12-28. (link)

Vila, R., Balakrishnan, N., & Saulo, H. (2024). An upper bound and a characterization for Gini’s mean difference based on correlated random variables. Statistics & Probability Letters, 207, 110032. (link to arXiv version).

$\endgroup$
3
  • $\begingroup$ I believe that the expression which stems from a more general case with more than two variables is unnecessarily complicated for the bivariate case. $\endgroup$ Apr 7 at 14:31
  • $\begingroup$ @SextusEmpiricus Yeah it would be great to see a simplification. I'm pretty sure that I can't find one, though. $\endgroup$ Apr 7 at 14:59
  • 1
    $\begingroup$ you can use $$GMD = \left[ \Phi(|z|)-\Phi(-|z|)\right]\mu+2\phi(z)\sigma$$ with $$\begin{array}{rcl} \mu &=& \mu_1-\mu_2 \\ \sigma &=& \sigma_{1}^2 + \sigma_{2}^2 - 2 \rho \sigma_{1} \sigma_{2} \end{array}$$ and $z = \mu/\sigma$ $\endgroup$ Apr 7 at 15:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.