2
$\begingroup$

Am I committing the ratio fallacy when I calculate the Pearson's correlation between a variable x/y and a variable z, with no common terms?

I have found a similar question to mine here but the reader is referenced to a paper goes far beyond my understanding: "Spurious Correlation and the Fallacy of the Ratio Standard Revisited" by Richard Kronmal (1993) Journal of the Royal Statistical Society. Series A (vol 156, no 3, pp. 379-392).

$\endgroup$

1 Answer 1

2
$\begingroup$

If x and y are each independent of z, x/y and z will also be independent. So observing a significant correlation between x/y and z is an indication that there is some genuine association between the two.

You can see an example of this by recreating the example in the Wikipedia article you linked for your setting in R (or a similar program):

n <- 1000
x <- rnorm(n, mean = 10, sd = 1)
y <- rnorm(n, mean = 10, sd = 1)
z <- rnorm(n, mean = 10, sd = 1)
plot(x/y, z)
cor(x/y, z, method = "spearman")
cor.test(x/y, z, alternative = "two.sided", method = "spearman")

For 1000 observations, I arrive at a Spearman correlation of -0.035 and a pretty unimpressive p-value of 0.269. You can also use a Pearson correlation (-0.031, p=0.321 for my simulation), but be careful not to produce outliers in your x/y by choosing sensible means and variances. As you can see, in this setting both correlations are close to 0, whereas in the example you linked the Pearson correlation was 0.53, which is pretty far away from 0.

Edit: x and y need not be independent for this to work, we just need that x and y are each independent of z (and hence x/y is independent of z). Changing the example from above so that there is quite a strong association between x and y:

n <- 1000
x <- rnorm(n, mean = 10, sd = 1)
y <- x + 1 + rnorm(n, mean = 1, sd = 1) ## create some dependence on x, maybe add random noise
cor(x, y, method = "spearman")
cor.test(x, y, alternative = "two.sided", method = "spearman")
cor(x, y, method = "pearson")
cor.test(x, y, alternative = "two.sided", method = "pearson")


z <- rnorm(n, mean = 10, sd = 1)
plot(x/y, z)
cor(x/y, z, method = "spearman")
cor.test(x/y, z, alternative = "two.sided", method = "spearman")
cor(x/y, z, method = "pearson")
cor.test(x/y, z, alternative = "two.sided", method = "pearson")

We see a strong relationship between x and y in this example (Pearson=0.729, p<2.2e-16; Spearman=0.709, p<2.2e-16), but no relationship between x/y and z (Pearson=0.036, p=0.252; Spearman=0.026, p=0.396).

$\endgroup$
5
  • 1
    $\begingroup$ Thank you for that explanation! I'm afraid x and y are not independent of each other though. They are each independent of z. Am I still in the clear in that case? $\endgroup$
    – Dark
    Commented Sep 18, 2014 at 12:42
  • 2
    $\begingroup$ The fallacy occurs because the ratios x/z and y/z are not independent of each other, due to the common denominator z. This is not the case with your data. $\endgroup$
    – Hong Ooi
    Commented Sep 18, 2014 at 12:54
  • $\begingroup$ @Hong Ooi: I'm not sure that's true. On the wikipedia page it reads "Pearson derived an approximation of the correlation that would be observed between two indices (x_1/x_3 and x_2/x_4), i.e., ratios of the absolute measurements x_1, x_2, x_3, x_4:" followed by some math and implication that this would commit the ratio fallacy as well. As I don't understand how that could be, I became worried that the same would apply in my case. I assume they also refer to independent variables x1 through x4. Why would the fallacy be relevant when it involves 2 ratios and not relevant with 1? $\endgroup$
    – Dark
    Commented Sep 18, 2014 at 13:06
  • $\begingroup$ Maybe you should have a closer look at that formula involving x1, x2, x3 and x4. Hint: consider what happens if $r_{ij} = 0$. $\endgroup$
    – Hong Ooi
    Commented Sep 18, 2014 at 13:28
  • $\begingroup$ I have amended the answer above to give a simulation example for the situation you are describing. The formula on Wikipedia contains the pairwise Pearson correlations r12, r14, r23, and r24. These would all be 0 for x1, x3 pairwise independent of x2, x4. Hence, the estimate for the correlation between x1/x3 and x2/x4 would also be 0. $\endgroup$
    – Rob Hall
    Commented Sep 18, 2014 at 14:04

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.