La covarianza uguale a zero implica l'indipendenza per le variabili casuali binarie?


14

Se X e Y sono due variabili casuali che possono assumere solo due stati possibili, come posso dimostrare che Cov(X,Y)=0 implica indipendenza? Questo tipo di va contro ciò che ho appreso nel giorno in cui Cov(X,Y)=0 non implica l'indipendenza ...

Il suggerimento dice di iniziare con 1 e 0 come possibili stati e generalizzare da lì. E posso farlo e mostrare E(XY)=E(X)E(Y) , ma questo non implica indipendenza ???

Un po 'confuso su come farlo matematicamente, immagino.


Non è vero in generale, come suggerisce l'intestazione della tua domanda ..
— Michael R. Chernick,

5
L'affermazione che stai cercando di dimostrare è davvero vera. Se X e Y sono variabili casuali di Bernoulli con parametri rispettivamente p1 e p2 , allora E[X]=p1 ed E[Y]=p2 . Quindi, cov⁡(X,Y)=E[XY]−E[X]E[Y] uguale a 0solo se E[XY]=P{X=1,Y=1} uguale a p1p2=P{X=1}P{Y=1} che mostra che {X=1} e {Y=1} sono eventi indipendenti . È un risultato standard che se A e BABsono una coppia di eventi indipendenti, quindi lo sono anche A,Bc e Ac,B e Ac,Bc eventi indipendenti, ovvero X e Y sono variabili casuali indipendenti. Ora generalizza.
— Dilip Sarwate,

Risposte:


23

Per le variabili binarie il loro valore atteso è uguale alla probabilità che siano uguali a uno. Perciò,

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

Se i due hanno zero covarianza questo significa E(XY)=E(X)E(Y) , che significa

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

È banale vedere anche moltiplicare tutte le altre probabilità congiunte, usando le regole di base sugli eventi indipendenti (cioè se A e B sono indipendenti, i loro complementi sono indipendenti, ecc.), Il che significa che la funzione di massa articolare fattorizza, che è la definizione di due variabili casuali che sono indipendenti.


2
Conciso ed elegante. Classy! +1 = D
— Marcelo Ventura,

9

Sia la correlazione che la covarianza misurano l'associazione lineare tra due variabili date e non ha l'obbligo di rilevare altre forme di associazione.

Quindi queste due variabili potrebbero essere associate in molti altri modi non lineari e la covarianza (e, quindi, la correlazione) non potrebbe distinguere dal caso indipendente.

Come molto didattico, artificiale e non realistica esempio, si può considerare X tale che P(X=x)=1/3 per x=−1,0,1 e considerare anche Y=X2 . Si noti che non sono solo associati, ma l'uno è una funzione dell'altro. Tuttavia, la loro covarianza è 0, poiché la loro associazione è ortogonale all'associazione che la covarianza è in grado di rilevare.

MODIFICARE

In effetti, come indicato da @whuber, la risposta originale sopra era in realtà un commento su come l'asserzione non è universalmente vera se entrambe le variabili non fossero necessariamente dicotomiche. Colpa mia!

Quindi facciamo matematica. (L'equivalente locale di "Suit up!" Di Barney Stinson)

Caso particolare

Se entrambi e Y sono dicotomico, allora si può supporre, senza perdita di generalità, che sia assumere solo i valori 0 e 1 con probabilità arbitrarie p , q ed r data da P ( X = 1 ) = p ∈ [ 0 , 1 ] P ( Y = 1 ) = q ∈ [ 0 , 1 ] P ( X = 1 , YXY01pqr che caratterizzano completamente la distribuzione congiunta diXeY. Prendendo in considerazione il suggerimento di @ DilipSarwate, nota che questi tre valori sono sufficienti per determinare la distribuzione congiunta di(X,Y), poiché P ( X = 0 , Y = 1 )

P(X=1)=p∈[0,1]P(Y=1)=q∈[0,1]P(X=1,Y=1)=r∈[0,1],
XY(X,Y) (Su una nota a margine, ovviamenterè tenuto a rispettare siap-r∈[0,1],q-r∈[0,1]che1-p-q-r∈[
P(X=0,Y=1)=P(Y=1)−P(X=1,Y=1)=q−rP(X=1,Y=0)=P(X=1)−P(X=1,Y=1)=p−rP(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.
rp−r∈[0,1]q−r∈[0,1] oltre r ∈ [ 0 , 1 ] , ovvero 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)]

Si noti che potrebbe essere uguale al prodotto p ⋅ q = P ( X = 1 ) P ( Y = 1 ) , che renderebbe X e Y indipendenti, poiché P ( X = 0 , Y = 0 )r=P(X=1,Y=1)p⋅q=P(X=1)P(Y=1)XY

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

Yes, r might be equal to pq, BUT it can be different, as long as it respects the boundaries above.

Well, from the above joint distribution, we would have

E(X)=0⋅P(X=0)+1⋅P(X=1)=P(X=1)=pE(Y)=0⋅P(Y=0)+1⋅P(Y=1)=P(Y=1)=qE(XY)=0⋅P(XY=0)+1⋅P(XY=1)=P(XY=1)=P(X=1,Y=1)=rCov(X,Y)=E(XY)−E(X)E(Y)=r−pq

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

General Case

About the without loss of generality clause above, if X and Y were distributed otherwise, let's say, for a<b and c<d,

P(X=b)=pP(Y=d)=qP(X=b,Y=d)=r
then X′ and Y′ given by
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.
So X and Y are independent if and only if X′ and 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).
So Cov(X,Y)=0 if and only Cov(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 … not necessarily equal to the product pq. That exceptional situation corresponds to the case of independence between X and Y." which is a perfectly true statement but only for the cognoscenti because for the hoi polloi, independence requires not just that
(1)P(X=1,Y=1)=P(X=1)P(Y=1)
but also
(2)P(X=u,Y=v)=P(X=u)P(Y=v), u.v∈{0,1}.
Yes, (1)⟹(2) as the cognoscenti know; for lesser mortals, a proof that (1)⟹(2) is helpful.
— Dilip Sarwate

3

IN GENERAL:

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

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

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

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

independence⇒zero cov, yet

zero cov⇏independence.

Great example: X∼N(0,1), and 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
Utilizzando il nostro sito, riconosci di aver letto e compreso le nostre Informativa sui cookie e Informativa sulla privacy.
Licensed under cc by-sa 3.0 with attribution required.