Czy to możliwe, że wszystkie 3 wektory mają ujemne korelacje par?


16

Biorąc pod uwagę trzy wektory , i , jest możliwe, że korelacja pomiędzy i , i i i są negatywne? Czy to możliwe?b c a b a c b cabcabacbc

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

3
Korelacje ujemne oznaczają geometrycznie, że wyśrodkowane wektory wzajemnie tworzą kąty rozwarte. Nie powinieneś mieć problemu z rysowaniem konfiguracji trzech wektorów na płaszczyźnie, które mają tę właściwość.
— whuber

Nie mogą one być całkowicie ujemnie ( ρ=−1 ), ale generalnie nie może być pewne ujemne korelacje ponownie w granicach wyznaczanych przez inne korelacji.
— karakfa

2
@whuber Twój komentarz wydaje się być sprzeczny z odpowiedzią Heikki Pulkkinen, która twierdzi, że wektory w samolocie są niemożliwe. Jeśli będziesz go stać, powinieneś zamienić swój komentarz w odpowiedź.
— RM

2
@RM Nie ma sprzeczności między whuber i Heikki. To pytanie dotyczy macierzy danych o rozmiarze n × 3 . Zwykle mówilibyśmy o n punktach danych w 3 wymiarach, ale to Q mówi o trzech „wektorach” w n wymiarach. Heikki mówi, że wszystkie ujemne korelacje nie mogą się zdarzyć, jeśli n = 2 (w rzeczywistości dwa punkty po centrowaniu są zawsze idealnie skorelowane, więc korelacje muszą wynosić ± 1 i nie mogą być wszystkie - 1 ). Whuber twierdzi, że 3 wektory w n wymiarach mogą skutecznie leżeć w 2-wymiarowej podprzestrzeni (tj. XXn×3nnn=2±1−1nXma rangę 2) i sugeruje wyobrażenie sobie logo Mercedesa.
— ameba mówi Przywróć Monikę

Odpowiedzi:


19

Jest to możliwe, jeśli rozmiar wektora wynosi 3 lub więcej. Na przykład

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

Korelacje to

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

Możemy udowodnić, że dla wektorów o rozmiarze 2 nie jest to możliwe:

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.


3
Kolejny przykład czegoś nieoczekiwanego, co dzieje się tylko w wymiarze trzecim lub wyższym.
— n

1
2±1−1

9

Tak, moga.

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.


7

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.



2

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
}

As a function of n, f(n) starts at 0, becomes nonzero at n = 3 (with typical values around 0.06), then increases to around 0.11 by n = 15, after which it seems to stabilize:

enter image description here So, not only is it possible to have all three correlations negative, it doesn't seem to be terribly uncommon (at least for uniform distributions).

Korzystając z naszej strony potwierdzasz, że przeczytałeś(-aś) i rozumiesz nasze zasady używania plików cookie i zasady ochrony prywatności.
Licensed under cc by-sa 3.0 with attribution required.