A covariância igual a zero implica independência para variáveis ​​aleatórias binárias?


14

Se e são duas variáveis ​​aleatórias que só podem assumir dois estados possíveis, como posso mostrar que implica independência? Isso vai contra o que aprendi no dia em que não implica independência ...X XYY C O v ( X , Y ) = 0 Cov(X,Y)=0C O v ( X , Y ) = 0Cov(X,Y)=0

A dica diz para começar com 11 e 0 00 como os estados possíveis e generalizar a partir daí. E eu posso fazer isso e mostrar E ( X Y ) = E ( X ) E ( Y )E(XY)=E(X)E(Y) , mas isso não implica independência ???

Meio confuso como fazer isso matematicamente, eu acho.


Não é verdade, em geral, como título da sua pergunta sugere ..
— Michael R. Chernick

5
A afirmação que você está tentando provar é realmente verdadeira. Se e são variáveis ​​aleatórias de Bernoulli com os parâmetros e respectivamente, então e . Portanto, é igual a apenas se é igual a mostrando que e são eventos independentes . É um resultado padrão que, se e são um par de eventos independentes, entãoX XY Yp 1 p1p 2p2 E [ X ] = p 1E[X]=p1 E [ Y ] = p 2E[Y]=p2 cov ( X , Y ) = E [ X Y ] - E [ X ] E [ Y ] cov(X,Y)=E[XY]−E[X]E[Y]0 0E [ X Y ] = P { X = 1 , Y = 1 } E[XY]=P{X=1,Y=1}p 1 p2 = P { X = 1 } P { Y = 1 } p1p2=P{X=1}P{Y=1}{ X = 1 }{X=1}{ Y = 1 } A B A , B c A c , B A c , B c X{Y=1} ABA,Bc, e eventos independentes e , ou seja, e são variáveis ​​aleatórias independentes. Agora generalize. Ac,BAc,BcXYY
— precisa saber é o seguinte

Respostas:


23

Para variáveis ​​binárias, seu valor esperado é igual à probabilidade de serem iguais a um. Portanto,

E ( X Y ) = P ( X Y = 1 ) = P ( X = 1 ∩ Y = 1 )E ( X ) = P ( X = 1 )E ( Y ) = P ( Y = 1 )

E(XY)=P(XY=1)=P(X=1∩Y=1)E(X)=P(X=1)E(Y)=P(Y=1)

Se os dois têm covariância zero, isso significa , o que significaE ( X Y ) = E ( X ) E ( Y )E(XY)=E(X)E(Y)

P(X=1∩Y=1)=P(X=1)⋅P(Y=1)

P(X=1∩Y=1)=P(X=1)⋅P(Y=1)

É trivial ver todas as outras probabilidades conjuntas também se multiplicarem, usando as regras básicas sobre eventos independentes (ou seja, se e são independentes, então seus complementos são independentes etc.), o que significa que a função de massa conjunta fatora, que é a definição de duas variáveis ​​aleatórias sendo independentes.AABB


2
Conciso e elegante. Com classe! 1 = D
— Marcelo Ventura

9

Tanto a correlação quanto a covariância medem a associação linear entre duas variáveis ​​fornecidas e não tem obrigação de detectar nenhuma outra forma de associação.

Portanto, essas duas variáveis ​​podem estar associadas de várias outras formas não lineares e a covariância (e, portanto, a correlação) não conseguiu distinguir dos casos independentes.

Como muito didáctico, artificial e não realista exemplo, pode-se considerar XX de modo a que P ( X = x ) = 1 / 3P(X=x)=1/3 para X = - 1 , 0 , 1x=−1,0,1 e também considerar Y = X 2Y=X2 . Observe que eles não são apenas associados, mas um é função do outro. No entanto, sua covariância é 0, pois sua associação é ortogonal à associação que a covariância pode detectar.

EDITAR

De fato, como indicado por @whuber, a resposta original acima foi na verdade um comentário sobre como a afirmação não é universalmente verdadeira se ambas as variáveis ​​não eram necessariamente dicotômicas. Foi mal!

Então vamos matemática. (O equivalente local do "Traje!" De Barney Stinson)

Caso particular

Se XX e YY eram dicotômicos, você pode assumir, sem perda de generalidade, que ambos assumem apenas os valores 00 e 11 com probabilidades arbitrárias pp , qq e rr dados por P ( X = 1 ) = p ∈ [ 0 , 1 ] P ( Y = 1 ) = q ∈ [ 0 , 1 ] P ( X = 1 , Y= 1 ) = r ∈ [ 0 , 1 ] ,

P(X=1)=p∈[0,1]P(Y=1)=q∈[0,1]P(X=1,Y=1)=r∈[0,1],
o qual caracterizar completamente a distribuição conjunta deXXeYY. Tomando a dica de @ DilipSarwate, observe que esses três valores são suficientes para determinar a distribuição conjunta de(X,Y)(X,Y), já que P ( X = 0 , Y = 1 )= P ( Y = 1 ) - P ( X = 1 , Y = 1 ) = q - r P ( X = 1 , Y = 0 )= P ( X = 1 ) - P ( X = 1 , Y = 1 ) = p - r P ( X = 0 , Y = 0 )= 1 - P ( X = 0 , Y = 1 ) - P ( X = 1 , Y = 0 ) - P ( X = 1 , Y = 1 )= 1 - ( q - r ) - ( p - r ) - r = 1 - p - q - r . (Em uma nota lateral,éclaro querdeve respeitarp-r∈[0,1],q-r∈[0,1]e1-p-q-r∈[
P(X=0,Y=1)P(X=1,Y=0)P(X=0,Y=0)=P(Y=1)−P(X=1,Y=1)=q−r=P(X=1)−P(X=1,Y=1)=p−r=1−P(X=0,Y=1)−P(X=1,Y=0)−P(X=1,Y=1)=1−(q−r)−(p−r)−r=1−p−q−r.
rp−r∈[0,1]q−r∈[0,1]0 , 1 ] além de r ∈ [ 0 , 1 ] , ou seja, r ∈ [ 0 , min ( p , q , 1 - p - q ) ] .)1−p−q−r∈[0,1]r∈[0,1]r∈[0,min(p,q,1−p−q)]

Observe que r = P ( X = 1 , Y = 1 ) pode ser igual ao produto p ⋅ q = P ( X = 1 ) P ( Y = 1 ) , o que tornaria X e Y independentes, pois P ( X = 0 , Y = 0 )r=P(X=1,Y=1)p⋅q=P(X=1)P(Y=1)XY= 1 - p - q - p q = ( 1 - p ) ( 1 - q ) = P ( X = 0 ) P ( Y = 0 ) P ( X = 1 , Y = 0 )= p - p q = p ( 1 - q ) = P ( X = 1 ) P ( Y = 0 ) P ( X = 0 , Y = 1 )= q - p q = ( 1 - p ) q = P ( X = 0 ) P ( Y = 1 ) .

P(X=0,Y=0)P(X=1,Y=0)P(X=0,Y=1)=1−p−q−pq=(1−p)(1−q)=P(X=0)P(Y=0)=p−pq=p(1−q)=P(X=1)P(Y=0)=q−pq=(1−p)q=P(X=0)P(Y=1).

Sim, r pode ser igual a p q , MAS pode ser diferente, desde que respeite os limites acima.rpq

Bem, a partir da distribuição conjunta acima, teríamos E ( X )= 0 ⋅ P ( X = 0 ) + 1 ⋅ P ( X = 1 ) = P ( X = 1 ) = p E ( Y )= 0 ⋅ P ( Y = 0 ) + 1 ⋅ P ( Y = 1 ) = P ( Y = 1 ) = q E ( X Y )= 0 ⋅ P ( X Y = 0 ) + 1 ⋅ P ( X Y = 1 )=P(XY=1)=P(X=1,Y=1)=rCov(X,Y)=E(XY)−E(X)E(Y)=r−pq

E(X)E(Y)E(XY)Cov(X,Y)=0⋅P(X=0)+1⋅P(X=1)=P(X=1)=p=0⋅P(Y=0)+1⋅P(Y=1)=P(Y=1)=q=0⋅P(XY=0)+1⋅P(XY=1)=P(XY=1)=P(X=1,Y=1)=r=E(XY)−E(X)E(Y)=r−pq

Now, notice then that XX and YY are independent if and only if Cov(X,Y)=0Cov(X,Y)=0. Indeed, if XX and YY are independent, then P(X=1,Y=1)=P(X=1)P(Y=1)P(X=1,Y=1)=P(X=1)P(Y=1), which is to say r=pqr=pq. Therefore, Cov(X,Y)=r−pq=0Cov(X,Y)=r−pq=0; and, on the other hand, if Cov(X,Y)=0Cov(X,Y)=0, then r−pq=0r−pq=0, which is to say r=pqr=pq. Therefore, XX and YY are independent.

General Case

About the without loss of generality clause above, if XX and YY were distributed otherwise, let's say, for a<ba<b and c<dc<d, P(X=b)=pP(Y=d)=qP(X=b,Y=d)=r

P(X=b)=pP(Y=d)=qP(X=b,Y=d)=r
then X′X′ and Y′Y′ given by X′=X−ab−aandY′=Y−cd−c
X′=X−ab−aandY′=Y−cd−c
would be distributed just as characterized above, since X=a⇔X′=0,X=b⇔X′=1,Y=c⇔Y′=0andY=d⇔Y′=1.
X=a⇔X′=0,X=b⇔X′=1,Y=c⇔Y′=0andY=d⇔Y′=1.
So XX and YY are independent if and only if X′X′ and Y′Y′ are independent.

Also, we would have E(X′)=E(X−ab−a)=E(X)−ab−aE(Y′)=E(Y−cd−c)=E(Y)−cd−cE(X′Y′)=E(X−ab−aY−cd−c)=E[(X−a)(Y−c)](b−a)(d−c)=E(XY−Xc−aY+ac)(b−a)(d−c)=E(XY)−cE(X)−aE(Y)+ac(b−a)(d−c)Cov(X′,Y′)=E(X′Y′)−E(X′)E(Y′)=E(XY)−cE(X)−aE(Y)+ac(b−a)(d−c)−E(X)−ab−aE(Y)−cd−c=[E(XY)−cE(X)−aE(Y)+ac]−[E(X)−a][E(Y)−c](b−a)(d−c)=[E(XY)−cE(X)−aE(Y)+ac]−[E(X)E(Y)−cE(X)−aE(Y)+ac](b−a)(d−c)=E(XY)−E(X)E(Y)(b−a)(d−c)=1(b−a)(d−c)Cov(X,Y).

E(X′)E(Y′)E(X′Y′)Cov(X′,Y′)=E(X−ab−a)=E(X)−ab−a=E(Y−cd−c)=E(Y)−cd−c=E(X−ab−aY−cd−c)=E[(X−a)(Y−c)](b−a)(d−c)=E(XY−Xc−aY+ac)(b−a)(d−c)=E(XY)−cE(X)−aE(Y)+ac(b−a)(d−c)=E(X′Y′)−E(X′)E(Y′)=E(XY)−cE(X)−aE(Y)+ac(b−a)(d−c)−E(X)−ab−aE(Y)−cd−c=[E(XY)−cE(X)−aE(Y)+ac]−[E(X)−a][E(Y)−c](b−a)(d−c)=[E(XY)−cE(X)−aE(Y)+ac]−[E(X)E(Y)−cE(X)−aE(Y)+ac](b−a)(d−c)=E(XY)−E(X)E(Y)(b−a)(d−c)=1(b−a)(d−c)Cov(X,Y).
So Cov(X,Y)=0Cov(X,Y)=0 if and only Cov(X′,Y′)=0Cov(X′,Y′)=0.

=D


1
I recycled that answer from this post.
— Marcelo Ventura

Verbatim cut and paste from your other post. Love it. +1
— gammer

2
The problem with copy-and-paste is that your answer no longer seems to address the question: it is merely a comment on the question. It would be better, then, to post a comment with a link to your other answer.
— whuber

2
How is thus an answer to the question asked?
— Dilip Sarwate

1
Your edits still don't answer the question, at least not at the level the question is asked. You write "Notice that r …r … not necessarily equal to the product pqpq. That exceptional situation corresponds to the case of independence between XX and YY." which is a perfectly true statement but only for the cognoscenti because for the hoi polloi, independence requires not just that P(X=1,Y=1)=P(X=1)P(Y=1)
P(X=1,Y=1)=P(X=1)P(Y=1)(1)
but also P(X=u,Y=v)=P(X=u)P(Y=v), u.v∈{0,1}.
P(X=u,Y=v)=P(X=u)P(Y=v), u.v∈{0,1}.(2)
Yes, (1)⟹(2)(1)⟹(2) as the cognoscenti know; for lesser mortals, a proof that (1)⟹(2)(1)⟹(2) is helpful.
— Dilip Sarwate

3

IN GENERAL:

The criterion for independence is F(x,y)=FX(x)FY(y)F(x,y)=FX(x)FY(y). Or fX,Y(x,y)=fX(x)fY(y)

fX,Y(x,y)=fX(x)fY(y)(1)

"If two variables are independent, their covariance is 0.0. But, having a covariance of 00 does not imply the variables are independent."

This is nicely explained by Macro here, and in the Wikipedia entry for independence.

independence⇒zero covindependence⇒zero cov, yet

zero cov⇏independence.zero cov⇏independence.

Great example: X∼N(0,1)X∼N(0,1), and Y=X2.Y=X2. Covariance is zero (and E(XY)=0, which is the criterion for orthogonality), yet they are dependent. Credit goes to this post.


IN PARTICULAR (OP problem):

These are Bernoulli rv's, X and Y with probability of success Pr(X=1), and Pr(Y=1).

cov(X,Y)=E[XY]−E[X]E[Y]=∗Pr(X=1∩Y=1)−Pr(X=1)Pr(Y=1)⟹Pr(X=1,Y=1)=Pr(X=1)Pr(Y=1).

This is equivalent to the condition for independence in Eq. (1).


(∗):

E[XY]=∗∗∑domain X, YPr(X=x∩Y=y)xy=≠0 iff x×y≠0Pr(X=1∩Y=1).

(∗∗): by LOTUS.


As pointed out below, the argument is incomplete without what Dilip Sarwate had pointed out in his comments shortly after the OP appeared. After searching around, I found this proof of the missing part here:

If events A and B are independent, then events Ac and B are independent, and events Ac and Bc are also independent.

Proof By definition,

A and B are independent ⟺P(A∩B)=P(A)P(B).

But B=(A∩B)+(Ac∪B), so P(B)=P(A∩B)+P(Ac∪B), which yields:

P(Ac∩B)=P(B)−P(A∩B)=P(B)−P(A)P(B)=P(B)[1−P(A)]=P(B)P(Ac).

Repeat the argument for the events Ac and Bc, this time starting from the statement that Ac and B are independent and taking the complement of B.

Similarly. A and Bc are independent events.

So, we have shown already that Pr(X=1,Y=1)=Pr(X=1)Pr(Y=1)

and the above shows that this implies that Pr(X=i,Y=j)=Pr(X=i)Pr(Y=j),  i,j∈{0,1}
that is, the joint pmf factors into the product of marginal pmfs everywhere, not just at (1,1). Hence, uncorrelated Bernoulli random variables X and Y are also independent random variables.

2
Actually that's not an equivalent condition to Eq (1). All you showed was that fX,Y(1,1)=fX(1)fY(1)
— gammer

Please consider replacing that image with your own equations, preferably ones that don't use overbars to denote complements. The overbars in the image are very hard to see.
— Dilip Sarwate

@DilipSarwate No problem. Is it better, now?
— Antoni Parellada

1
Thanks. Also, note that strictly speaking, you also need to show that A and Bc are independent events since the factorization of the joint pdf into the product of the marginal pmts must hold at all four points. Perhaps adding the sentence "Similarly. A and Bc are independent events" right after the proof that Ac and B are independent events will work.
— Dilip Sarwate

@DilipSarwate Thank you very much for your help getting it right. The proof as it was before all the editing seemed self-explanatory, because of all the inherent symmetry, but it clearly couldn't be taken for granted. I am very appreciative of your assistance.
— Antoni Parellada
Ao utilizar nosso site, você reconhece que leu e compreendeu nossa Política de Cookies e nossa Política de Privacidade.
Licensed under cc by-sa 3.0 with attribution required.