3 개의 벡터가 모두 음의 쌍별 상관 관계를 가질 수 있습니까? c 사이 의 상관 관계 가 모두

세 개의 벡터 , bc 가 주어지면 ab , a , c , bc 사이 상관 관계 가 모두 음수 일 수 있습니까? 즉, 이것이 가능합니까?

a

b

c

a

b

a

c

b

c

corr(a,b)<0corr(a,c)<0corr(b,c)<0



답변

벡터의 크기가 3 이상이면 가능합니다. 예를 들어

a=(−1,1,1)b=(1,−9,−3)c=(2,3,−1)

상관 관계는

cor(a,b)=−0.80...cor(a,c)=−0.27...cor(b,c)=−0.34...

크기가 2 인 벡터의 경우 이것이 불가능하다는 것을 증명할 수 있습니다 :

cor(a,b)<02(∑iaibi)−(∑iai)(∑ibi)<02(a1b1+a2b2)−(a1+a2)(b1b2)<02(a1b1+a2b2)−(a1+a2)(b1b2)<02(a1b1+a2b2)−a1b1+a1b2+a2b1+a2b2<0a1b1+a2b2−a1b2+a2b1<0a1(b1−b2)+a2(b2−b1)<0(a1−a2)(b1−b2)<0

The formula makes sense: if

a1

is larger than

a2

,

b1

has to be larger than

b1

to make the correlation negative.

Similarly for correlations between (a,c) and (b,c) we get

(a1−a2)(c1−c2)<0(b1−b2)(c1−c2)<0

Clearly, all of these three formulas can not hold in the same time.


답변

Yes, they can.

Suppose you have a multivariate normal distribution

X∈R3,X∼N(0,Σ)

.
The only restriction on

Σ

is that it has to be positive semi-definite.

So take the following example

Σ=(1−0.2−0.2−0.21−0.2−0.2−0.21)

Its eigenvalues are all positive (1.2, 1.2, 0.6), and you can create vectors with negative correlation.


답변

let's start with a correlation matrix for 3 variables

Σ=(1pqp1rqr1)

non-negative definiteness creates constraints for pairwise correlations

p,q,r

which can be written as

pqr≥p2+q2+r2−12

For example, if

p=q=−1

, the values of

r

is restricted by

2r≥r2+1

, which forces

r=1

. On the other hand if

p=q=−12

,

r

can be within

2±34

range.

Answering the interesting follow up question by @amoeba: "what is the lowest possible correlation that all three pairs can simultaneously have?"

Let

p=q=r=x<0

, Find the smallest root of

2x3−3x2+1

, which will give you

−12

. Perhaps not surprising for some.

A stronger argument can be made if one of the correlations, say

r=−1

. From the same equation

−2pq≥p2+q2

, we can deduce that

p=−q

. Therefore if two correlations are

−1

, third one should be

1

.


답변

A simple R function to explore this:

f <- function(n,trials = 10000){
  count <- 0
  for(i in 1:trials){
    a <- runif(n)
    b <- runif(n)
    c <- runif(n)
    if(cor(a,b) < 0 & cor(a,c) < 0 & cor(b,c) < 0){
      count <- count + 1
    }
  }
  count/trials
}

의 함수는 0 n에서 f(n)시작하여 0이 아닌 n = 3값 (일반 값은 약 0.06)으로 증가한 다음 약 0.11로 증가한 n = 15후 안정화됩니다.

따라서 세 가지 상관 관계를 모두 음수로 만들 수있을뿐만 아니라 (적어도 균일 한 분포의 경우)별로 드문 일은 아닙니다.