# Relationship between 3 variables confused

I am working on analyzing some data for my master's thesis, and I am not exactly sure how to interpret my results. Let's call my variables A, B, and C. Variable A is negatively correlated with variable B, and variable A is positively correlated with variable C. There is no significant relationship between variables B and C. I can't seem to make sense of why this would be the case. I have tried some other analyses as well. When entering B and C into a regression model together, neither remains significant for predicting A. When entering A and C into a model together, neither remains significant for predicting B. Does anyone have any insight into what this means or further analyses I should run?

• In light of the answer that's already been posted, I have to ask: how are you determining whether a relationship is "significant"? Commented Jan 30, 2015 at 5:47

This is a somewhat odd set of observations! They'd actually be impossible with a sufficiently large sample: it's impossible that the true individual correlations are nonzero but the true regression coefficients are all zero. However, it's possible to observe it in a finite sample, if your power is high enough to detect some correlations but not others. Here's an example model:

• Suppose there's some hidden factor D, that's positively related to A, B and negatively to C.

• Suppose that A has a low amount of noise compared to the signal from D, but B and C have a high amount of noise.

• Then your study might be powered highly enough to detect a correlation between A and B or between A and C, but not between B and C (because there's more noise).

• Furthermore, when you include both C and B in a regression on A, it makes the correlation of each one individually look smaller! That's because adding C doesn't give you very much additional information about A once you have B, but it makes the information that's already there look like it came from two features, so the true regression coefficients are smaller than the individual correlations, and you may not have enough power to detect them reliably.

Here's some Python code that reproduces your problem:

import statsmodels.formula.api as smf
import pandas as pd
import scipy.stats as st

np.random.seed(1)

n = 1.6
A_D = 1.0 / n
B_D = 0.2 / n
C_D = 0.4 / n

d = np.random.normal(size=100)
a = np.random.normal(size=100) + A_D * d
b = np.random.normal(size=100) + B_D * d
c = np.random.normal(size=100) - C_D * d

df = pd.DataFrame({'a':a,'b':b,'c':c,'d':d})

print 'r(a,b)', st.pearsonr(a, b)
print 'r(a,c)', st.pearsonr(a, c)
print 'r(b,c):', st.pearsonr(b, c)
for formula in ['a ~ b + c', 'b ~ a + c', 'c ~ a + b']:
print '=====', formula, '====='
print smf.ols(formula=formula, data=df).fit().pvalues


This prints:

r(a,b) (0.20767110684292975, 0.038147895523320687)
r(a,c) (-0.20126337417899448, 0.044651098353283673)
r(b,c): (-0.074606935674748215, 0.46068557184760595)
===== a ~ b + c =====
Intercept    0.104334
b            0.050376
c            0.059011
dtype: float64
===== b ~ a + c =====
Intercept    0.859879
a            0.050376
c            0.736510
dtype: float64
===== c ~ a + b =====
Intercept    0.989280
a            0.059011
b            0.736510
dtype: float64


Unfortunately, I don't have any great advice for further analyses--I think you may need more power/a larger sample to resolve your confusion!

• Thank you so much for answering my question. We had 45 participants in this study, so I was hoping power wouldn't be an issue, but if that is the best explanation, it works for me. I looked at the scatterplots for each of these, and noticed that the relationship between B and C is just a lot more variable than the relationship between A and B or A and C, so that seems to fit with what you are saying. This helped a lot! Thanks! Commented Jan 30, 2015 at 14:32