Чи коваріація, рівна нулю, передбачає незалежність для бінарних випадкових величин?


14

Якщо X і Y - дві випадкові величини, які можуть приймати лише два можливі стани, то як я можу показати, що Cov(X,Y)=0 передбачає незалежність? Це суперечить тому, що я дізнався ще в той день, коли Cov(X,Y)=0 не означає незалежності ...

Підказка говорить, що починати з 1 і 0 як можливих станів і узагальнювати звідти. І я можу це зробити і показати E(XY)=E(X)E(Y) , але це не означає незалежності ???

Вигляд плутаний, як це зробити математично, я думаю.


Це взагалі не вірно, як підказує заголовок вашого питання ..
— Майкл Р. Черник

5
Заява, яку ви намагаєтесь довести, справді правдива. Якщо X і Y - випадкові величини Бернуллі з параметрами p1 і p2 відповідно, то E[X]=p1 і E[Y]=p2 . Отже, cov⁡(X,Y)=E[XY]−E[X]E[Y] дорівнює 0тільки тоді , коли E[XY]=P{X=1,Y=1} дорівнює p1p2=P{X=1}P{Y=1} , що показує , що {X=1} і {Y=1} є самостійні події . Це стандартний результат, що якщо A і Bє парою незалежних подій, то так само A,Bc , і Ac,B , і Ac,Bc незалежні події, тобто X і Y є незалежними випадковими змінними. Тепер узагальнюємо.
— Діліп Сарват

Відповіді:


23

Для бінарних змінних їх очікуване значення дорівнює ймовірності того, що вони дорівнюють одиниці. Тому

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

Якщо двоє мають нульову коваріацію, це означає E(XY)=E(X)E(Y) , що означає

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

Неважливо бачити, що всі інші спільні ймовірності також множуються, використовуючи основні правила щодо незалежних подій (тобто, якщо A і B незалежні, то їх доповнення є незалежними тощо), що означає, що функція спільної маси факторизована, що є визначенням з двох випадкових змінних, незалежних.


2
Лаконічний і елегантний. Класно! +1 = D
— Марсело Вентура

9

Як кореляція, так і коваріантність вимірюють лінійну асоціацію між двома заданими змінними, і вона не зобов'язана виявляти будь-яку іншу форму асоціації.

Тож ці дві змінні можуть бути пов'язані декількома іншими нелінійними способами, а коваріація (і, отже, кореляція) не може відрізняти від незалежного випадку.

Як дуже дидактичні, штучний і не реалістичний приклад, можна вважати таке , що Р ( Х = х ) = 1 / 3 для ї = - 1 , 0 , 1 , а також розглянути Y = Х 2 . Зауважте, що вони не тільки пов'язані, але одне є функцією іншого. Тим не менше, їх коваріація дорівнює 0, оскільки їх асоціація є ортогональною відносно асоціації, яку коваріація може виявити.XP(X=x)=1/3x=−1,0,1Y=X2

EDIT

Дійсно, як вказував @whuber, вищенаведена оригінальна відповідь насправді була коментарем щодо того, як твердження не є універсальним, якщо обидві змінні не були неодмінно дихотомічними. Моє ліжко!

Тож давайте математику. (Місцевий еквівалент фільму Барні Стінсона "Костюм!")

Конкретний випадок

Якщо обидва і Y були дихотомічними, то можна без втрати спільності припустити, що обидва припускають лише значення 0 і 1 з довільними ймовірностями p , q і r, заданими P ( X = 1 ) = p ∈ [ 0 , 1 ] P ( Y = 1 ) = q ∈ [ 0 , 1 ] P ( X = 1 , YXY01pqr які характеризують повністю спільний розподілXіY. Звертаючись до підказки @ DilipSarwate, зауважте, що цих трьох значень достатньо для визначення спільного розподілу(X,Y), оскільки 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) (З боку бічної ноти, звичайно,rзобов'язаний дотримуватися якp-r∈[0,1],q-r∈[0,1], такі1-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]1−p−q−r∈[0,1] beyond r∈[0,1], which is to say r∈[0,min(p,q,1−p−q)].)

Notice that r=P(X=1,Y=1) might be equal to the product p⋅q=P(X=1)P(Y=1), which would render X and Y independent, since

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
Використовуючи наш веб-сайт, ви визнаєте, що прочитали та зрозуміли наші Політику щодо файлів cookie та Політику конфіденційності.
Licensed under cc by-sa 3.0 with attribution required.