กลับไปหน้าบทความ

อ่าน 22 นาที

ความแปรปรวนร่วม

ใน ทฤษฎีความน่าจะเป็น และ สถิติ ความแปรปรวน ร่วม เป็นการวัด ความแปรปรวน ร่วม ของ ตัวแปรสุ่ม สอง ตัว [ 1 ] เครื่องหมาย ของความแปรปรวน ร่วม แสดงแนวโน้มใน ความสัมพันธ์เชิงเส้น...

ความแปรปรวนร่วม

เครื่องหมายของค่าความแปรปรวนร่วมของตัวแปรสุ่มสองตัวXและY

ในทฤษฎีความน่าจะเป็นและสถิติความแปรปรวน ร่วม เป็นการวัดความแปรปรวน ร่วม ของตัวแปรสุ่ม สอง ตัว[ 1 ]เครื่องหมาย ของความแปรปรวน ร่วมแสดงแนวโน้มในความสัมพันธ์เชิงเส้นระหว่างตัวแปร ความแปรปรวนร่วมเป็นบวกเมื่อตัวแปรมีแนวโน้มที่จะแสดงพฤติกรรมที่คล้ายคลึงกัน และเป็นลบเมื่อตัวแปรมีแนวโน้มที่จะแสดงพฤติกรรมตรงกันข้าม[ 2 ]ขนาดของความแปรปรวนร่วมคือค่าเฉลี่ยเรขาคณิต ของความแปรปรวนที่แบ่งปันกันสำหรับตัวแปรสุ่มสองตัว โดยขนาด ที่มากขึ้นหมายความว่าตัวแปรสองตัวนั้นขึ้นอยู่ซึ่งกันและกันอย่างแน่นแฟ้นยิ่งขึ้น

ค่าความแปรปรวนร่วมมีหน่วยวัด และขนาดของค่าความแปรปรวนร่วมจะได้รับผลกระทบจากหน่วยดังกล่าว ซึ่งหมายความว่าการเปลี่ยนหน่วย (เช่น จากเมตรเป็นมิลลิเมตร) จะทำให้ค่าความแปรปรวนร่วมเปลี่ยนแปลงไปตามสัดส่วน ทำให้ยากที่จะประเมินความแข็งแกร่งของความสัมพันธ์จากค่าความแปรปรวนร่วมเพียงอย่างเดียว ในบางสถานการณ์ เป็นที่พึงปรารถนาที่จะเปรียบเทียบความแข็งแกร่งของความสัมพันธ์ร่วมกันระหว่างตัวแปรสุ่มคู่ต่างๆ ที่ไม่จำเป็นต้องมีหน่วยเดียวกัน[ 3 ]ในสถานการณ์เหล่านั้น เราใช้สัมประสิทธิ์สหสัมพันธ์ซึ่งจะทำให้ค่าความแปรปรวนร่วมเป็นค่าระหว่าง -1 ถึง 1 โดยการหารด้วยค่าเฉลี่ยเรขาคณิตของความแปรปรวน ทั้งหมด (เช่น ผลคูณของส่วนเบี่ยงเบนมาตรฐาน ) สำหรับตัวแปรสุ่มทั้งสอง[ 4 ]

มีการแยกความแตกต่างระหว่าง (1) ความแปรปรวนร่วมของตัวแปรสุ่มสองตัว ซึ่งเป็นพารามิเตอร์ประชากร ที่สามารถมองได้ว่าเป็นคุณสมบัติของการแจกแจงความน่าจะเป็นร่วมและ (2) ความแปรปรวนร่วมของตัวอย่างซึ่งนอกจากจะทำหน้าที่เป็นตัวอธิบายของตัวอย่างแล้ว ยังทำหน้าที่เป็น ค่า ประมาณของพารามิเตอร์ประชากร อีกด้วย

คำนิยาม

สำหรับตัวแปรสุ่มค่าจริง สองตัว ที่มีการแจกแจงร่วมกันX{\displaystyle X}และวาย{\displaystyle Y}ด้วยโมเมนต์ที่สอง ที่จำกัด ความแปรปรวนร่วมจะถูกกำหนดเป็นค่าที่คาดหวัง (หรือค่าเฉลี่ย) ของผลคูณของค่าเบี่ยงเบนจากค่าที่คาดหวังของแต่ละบุคคล: [ 5 ] [ 6 ] : 119

โควิด(X,วาย)=อี[(Xอี[X])(วายอี[วาย])]{\displaystyle \operatorname {cov} (X,Y)=\operatorname {E} {{\big [}(X-\operatorname {E} [X])(Y-\operatorname {E} [Y]){\big ]}}}

ที่ไหนอี[X]{\displaystyle \operatorname {E} [X]}คือค่าที่คาดหวังของX{\displaystyle X}หรือเรียกอีกอย่างว่าค่าเฉลี่ยของX{\displaystyle X}ค่าความแปรปรวนร่วมบางครั้งก็ถูกแสดงด้วยสัญลักษณ์อื่นเช่นกันσXวาย{\displaystyle \sigma _{XY}}หรือσ(X,วาย){\displaystyle \sigma (X,Y)}ในทำนองเดียวกับความแปรปรวนโดยใช้คุณสมบัติความเป็นเส้นตรงของค่าคาดหวัง สามารถลดรูปให้เหลือเพียงค่าคาดหวังของผลคูณลบด้วยผลคูณของค่าคาดหวัง: โควิด(X,วาย)=อี[(Xอี[X])(วายอี[วาย])]=อี[XวายXอี[วาย]อี[X]วาย+อี[X]อี[วาย]]=อี[Xวาย]อี[X]อี[วาย]อี[X]อี[วาย]+อี[X]อี[วาย]=อี[Xวาย]อี[X]อี[วาย].{\displaystyle {\begin{aligned}\operatorname {cov} (X,Y)&=\operatorname {E} \left[\left(X-\operatorname {E} \left[X\right]\right)\left(Y-\operatorname {E} \left[Y\right]\right)\right]\\&=\operatorname {E} \left[XY-X\operatorname {E} \left[Y\right]-\operatorname {E} \left[X\right]Y+\operatorname {E} \left[X\right]\operatorname {E} \left[Y\right]\right]\\&=\operatorname {E} \left[XY\right]-\operatorname {E} \left[X\right]\operatorname {E} \left[Y\right]-\operatorname {E} \left[X\right]\operatorname {E} \left[Y\right]+\operatorname {E} \left[X\right]\operatorname {E} \left[Y\right]\\&=\operatorname {E} \left[XY\right]-\operatorname {E} \left[X\right]\operatorname {E} \left[Y\right].\end{aligned}}} เอกลักษณ์นี้มีประโยชน์สำหรับการพิสูจน์ทางคณิตศาสตร์ อย่างไรก็ตาม จากมุมมองของการคำนวณเชิงตัวเลข มันอาจเกิดการหักล้างกันอย่างรุนแรงได้ (ดูส่วนเกี่ยวกับการคำนวณเชิงตัวเลขด้านล่าง)

หน่วยวัดของความแปรปรวนร่วมโควิด(X,วาย){\displaystyle \operatorname {cov} (X,Y)}คือสิ่งเหล่านั้นของX{\displaystyle X}ครั้งของเวลาของวาย{\displaystyle Y}ในทางตรงกันข้ามค่าสัมประสิทธิ์สหสัมพันธ์ซึ่งขึ้นอยู่กับค่าความแปรปรวนร่วม เป็น มาตรวัดความสัมพันธ์เชิงเส้น ที่ไม่มีมิติ (อันที่จริง ค่าสัมประสิทธิ์สหสัมพันธ์สามารถเข้าใจได้ง่ายๆ ว่าเป็นค่าความแปรปรวนร่วมที่ถูกทำให้เป็นมาตรฐานแล้ว)

ตัวแปรสุ่มเชิงซ้อน

ความแปรปรวนร่วมระหว่างตัวแปรสุ่มเชิงซ้อน สองตัว,{\displaystyle Z,W}ถูกกำหนดเป็น[ 6 ] : 119โควิด(,)=อี[(อี[])(อี[])¯]=อี[¯]อี[]อี[¯]{\displaystyle \operatorname {cov} (Z,W)=\operatorname {E} \left[(Z-\operatorname {E} [Z]){\overline {(W-\operatorname {E} [W])}}\right]=\operatorname {E} \left[Z{\overline {W}}\right]-\operatorname {E} [Z]\operatorname {E} \left[{\overline {W}}\right]}

โปรดสังเกตการผันเชิงซ้อนของตัวประกอบที่สองในคำนิยาม

สามารถกำหนดความแปรปรวนร่วมเทียมที่เกี่ยวข้อง ได้เช่นกัน

ตัวแปรสุ่มแบบไม่ต่อเนื่อง

ถ้าคู่ตัวแปรสุ่ม (จริง)(X,วาย){\displaystyle (X,Y)}สามารถรับเอาค่านิยมเหล่านั้นได้(xฉัน,yฉัน){\displaystyle (x_{i},y_{i})}สำหรับฉัน=1,,n{\displaystyle i=1,\ldots ,n}โดยมีความน่าจะเป็นเท่ากันพีฉัน=1/n{\displaystyle p_{i}=1/n}ดังนั้น ค่าความแปรปรวนร่วมจึงสามารถเขียนได้ในรูปของค่าเฉลี่ยได้เช่นกันอี[X]{\displaystyle \operatorname {E} [X]}และอี[วาย]{\displaystyle \operatorname {E} [Y]}เช่น โควิด(X,วาย)=1nฉัน=1n(xฉันอี(X))(yฉันอี(วาย)).{\displaystyle \operatorname {cov} (X,Y)={\frac {1}{n}}\sum _{i=1}^{n}(x_{i}-E(X))(y_{i}-E(Y)).}

นอกจากนี้ยังสามารถแสดงได้อย่างเทียบเท่าโดยไม่ต้องอ้างอิงถึงวิธีการโดยตรง ดังนี้[ 7 ]โควิด(X,วาย)=1n2ฉัน=1nเจ=1n12(xฉันxเจ)(yฉันyเจ)=1n2ฉันเจ>ฉัน(xฉันxเจ)(yฉันyเจ).{\displaystyle \operatorname {cov} (X,Y)={\frac {1}{n^{2}}}\sum _{i=1}^{n}\sum _{j=1}^{n}{\frac {1}{2}}(x_{i}-x_{j})(y_{i}-y_{j})={\frac {1}{n^{2}}}\sum _{i}\sum _{j>i}(x_{i}-x_{j})(y_{i}-y_{j}).}

โดยทั่วไปแล้ว หากมีn{\displaystyle n}ความเป็นไปได้ของการเกิดขึ้น(X,วาย){\displaystyle (X,Y)}กล่าวคือ(xฉัน,yฉัน){\displaystyle (x_{i},y_{i})}แต่มีโอกาสเกิดขึ้นไม่เท่ากันพีฉัน{\displaystyle p_{i}}สำหรับฉัน=1,,n{\displaystyle i=1,\ldots ,n}ดังนั้นค่าความแปรปรวนร่วมคือ โควิด(X,วาย)=ฉัน=1nพีฉัน(xฉันอี(X))(yฉันอี(วาย)).{\displaystyle \operatorname {cov} (X,Y)=\sum _{i=1}^{n}p_{i}(x_{i}-E(X))(y_{i}-E(Y)).}

ในกรณีที่ตัวแปรสุ่มสองตัวแยกจากกันX{\displaystyle X}และวาย{\displaystyle Y}มีการกระจายความน่าจะเป็นร่วมกัน ซึ่งแสดงด้วยองค์ประกอบต่างๆพีฉัน,เจ{\displaystyle p_{i,j}}ซึ่งสอดคล้องกับความน่าจะเป็นร่วมของพี(X=xฉัน,วาย=yเจ){\displaystyle P(X=x_{i},Y=y_{j})}ค่าความแปรปรวนร่วมจะคำนวณโดยใช้ผลรวมสองชั้นเหนือดัชนีของเมทริกซ์:

โควิด(X,วาย)=ฉัน=1nเจ=1nพีฉัน,เจ(xฉันอี[X])(yเจอี[วาย]).{\displaystyle \operatorname {cov} (X,Y)=\sum _{i=1}^{n}\sum _{j=1}^{n}p_{i,j}(x_{i}-E[X])(y_{j}-E[Y]).}

ตัวอย่าง

พิจารณาตัวแปรสุ่มอิสระสามตัวเอ,บี,ซี{\displaystyle A,B,C}และค่าคงที่สองค่าq,{\displaystyle q,r}. X=qเอ+บีวาย=เอ+ซีโควิด(X,วาย)=qวาร์(เอ){\displaystyle {\begin{aligned}X&=qA+B\\Y&=rA+C\\\operatorname {cov} (X,Y)&=qr\operatorname {var} (A)\end{aligned}}} ในกรณีพิเศษq=1{\displaystyle q=1}และ=1{\displaystyle r=1}ความแปรปรวนร่วมระหว่างX{\displaystyle X}และวาย{\displaystyle Y}เป็นเพียงความแปรปรวนของเอ{\displaystyle A}และชื่อ "ความแปรปรวนร่วม" นั้นเหมาะสมอย่างยิ่ง

การตีความเชิงเรขาคณิตของตัวอย่างความแปรปรวนร่วมแต่ละทรงสี่เหลี่ยมลูกบาศก์คือกรอบล้อมรอบจุด( x , y , f ( x , y )) ที่ วางตัวตามแกน และค่าเฉลี่ย ของ XและY (จุดสีม่วงแดง) ความแปรปรวนร่วมคือผลรวมของปริมาตรของทรงสี่เหลี่ยมลูกบาศก์ในควadrant ที่ 1 และ 3 (สีแดง) และในควadrant ที่ 2 และ 4 (สีน้ำเงิน)

สมมติว่าX{\displaystyle X}และวาย{\displaystyle Y}มีฟังก์ชันมวลความน่าจะเป็นร่วม ดังต่อไปนี้ [ 8 ]ซึ่งเซลล์กลางทั้งหกเซลล์ให้ความน่าจะเป็นร่วมแบบไม่ต่อเนื่องเอฟ(x,y){\displaystyle f(x,y)}จากสถานการณ์สมมติทั้งหกประการ(x,y)เอส={(5,8),(6,8),(7,8),(5,9),(6,9),(7,9)}{\displaystyle (x,y)\in S=\left\{(5,8),(6,8),(7,8),(5,9),(6,9),(7,9)\right\}}:

เอฟ(x,y){\displaystyle f(x,y)}xเอฟวาย(y){\displaystyle f_{Y}(y)}
567
y800.40.10.5
90.300.20.5
เอฟX(x){\displaystyle f_{X}(x)}0.30.40.31

X{\displaystyle X}สามารถมีค่าได้สามค่า (5, 6 และ 7) ในขณะที่วาย{\displaystyle Y}สามารถรับได้สอง (8 และ 9) ค่าเฉลี่ยของพวกเขาคือμX=5(0.3)+6(0.4)+7(0.1+0.2)=6{\displaystyle \mu _{X}=5(0.3)+6(0.4)+7(0.1+0.2)=6}และμวาย=8(0.4+0.1)+9(0.3+0.2)=8.5{\displaystyle \mu _{Y}=8(0.4+0.1)+9(0.3+0.2)=8.5}. แล้ว, โควิด(X,วาย)=σXวาย=(x,y)เอสเอฟ(x,y)(xμX)(yμวาย)=(0)(56)(88.5)+(0.4)(66)(88.5)+(0.1)(76)(88.5)+(0.3)(56)(98.5)+(0)(66)(98.5)+(0.2)(76)(98.5)=0.1.{\displaystyle {\begin{aligned}\operatorname {cov} (X,Y)={}&\sigma _{XY}=\sum _{(x,y)\in S}f(x,y)\left(x-\mu _{X}\right)\left(y-\mu _{Y}\right)\\[4pt]={}&(0)(5-6)(8-8.5)+(0.4)(6-6)(8-8.5)+(0.1)(7-6)(8-8.5)+{}\\[4pt]&(0.3)(5-6)(9-8.5)+(0)(6-6)(9-8.5)+(0.2)(7-6)(9-8.5)\\[4pt]={}&{-0.1}\;.\end{aligned}}}

คุณสมบัติ

ความแปรปรวนร่วมกับตัวมันเอง

ความแปรปรวนเป็นกรณีพิเศษของความแปรปรวนร่วมซึ่งตัวแปรทั้งสองเหมือนกัน: [ 6 ] : 121โควิด(X,X)=วาร์(X)σ2(X)σX2.{\displaystyle \operatorname {cov} (X,X)=\operatorname {var} (X)\equiv \sigma ^{2}(X)\equiv \sigma _{X}^{2}.}

ความแปรปรวนร่วมของผลรวมเชิงเส้น

ถ้าX{\displaystyle X},วาย{\displaystyle Y},{\displaystyle W}, และวี{\displaystyle V}เป็นตัวแปรสุ่มค่าจริง และเอ,,,{\displaystyle a,b,c,d}ถ้า เป็นค่าคงที่ที่มีค่าเป็นจำนวนจริง ข้อเท็จจริงต่อไปนี้จึงเป็นผลสืบเนื่องมาจากนิยามของความแปรปรวนร่วม: โควิด(X,เอ)=0โควิด(X,X)=วาร์(X)โควิด(X,วาย)=โควิด(วาย,X)โควิด(เอX,วาย)=เอโควิด(X,วาย)โควิด(X+เอ,วาย+)=โควิด(X,วาย)โควิด(เอX+วาย,+วี)=เอโควิด(X,)+เอโควิด(X,วี)+โควิด(วาย,)+โควิด(วาย,วี){\displaystyle {\begin{aligned}\operatorname {cov} (X,a)&=0\\\operatorname {cov} (X,X)&=\operatorname {var} (X)\\\operatorname {cov} (X,Y)&=\operatorname {cov} (Y,X)\\\operatorname {cov} (aX,bY)&=ab\,\operatorname {cov} (X,Y)\\\operatorname {cov} (X+a,Y+b)&=\operatorname {cov} (X,Y)\\\operatorname {cov} (aX+bY,cW+dV)&=ac\,\operatorname {cov} (X,W)+ad\,\operatorname {cov} (X,V)+bc\,\operatorname {cov} (Y,W)+bd\,\operatorname {cov} (Y,V)\end{aligned}}}

สำหรับลำดับX1,,Xn{\displaystyle X_{1},\ldots ,X_{n}}ของตัวแปรสุ่มและค่าคงที่ที่เป็นจำนวนจริงเอ1,,เอn{\displaystyle a_{1},\ldots ,a_{n}}เรามี วาร์(ฉัน=1nเอฉันXฉัน)=ฉัน=1nเอฉัน2วาร์(Xฉัน)+2ฉัน,เจ:ฉัน<เจเอฉันเอเจโควิด(Xฉัน,Xเจ)=ฉัน,เจเอฉันเอเจโควิด(Xฉัน,Xเจ){\displaystyle \operatorname {var} \left(\sum _{i=1}^{n}a_{i}X_{i}\right)=\sum _{i=1}^{n}a_{i}^{2}\operatorname {var} (X_{i})+2\sum _{i,j\,:\,i<j}a_{i}a_{j}\operatorname {cov} (X_{i},X_{j})=\sum _{i,j}{a_{i}a_{j}\operatorname {cov} (X_{i},X_{j})}}

เอกลักษณ์ความแปรปรวนร่วมของ Hoeffding

สูตรที่มีประโยชน์ในการคำนวณค่าความแปรปรวนร่วมระหว่างตัวแปรสุ่มสองตัวX,วาย{\displaystyle X,Y} คือเอกลักษณ์ความแปรปรวนร่วมของ Hoeffding: [ 9 ]โควิด(X,วาย)=อาร์อาร์(เอฟ(X,วาย)(x,y)เอฟX(x)เอฟวาย(y))xy{\displaystyle \operatorname {cov} (X,Y)=\int _{\mathbb {R} }\int _{\mathbb {R} }\left(F_{(X,Y)}(x,y)-F_{X}(x)F_{Y}(y)\right)\,dx\,dy} ที่ไหนเอฟ(X,วาย)(x,y){\displaystyle F_{(X,Y)}(x,y)}คือฟังก์ชันการกระจายสะสมร่วมของเวกเตอร์สุ่ม(X,วาย){\displaystyle (X,Y)}และเอฟX(x),เอฟวาย(y){\displaystyle F_{X}(x),F_{Y}(y)}คือกลุ่มชายขอบ

ความไม่สัมพันธ์กันและความเป็นอิสระ

ตัวแปรสุ่มที่มีเมทริกซ์ความแปรปรวนร่วมเป็นศูนย์เรียกว่าไม่มีความสัมพันธ์กัน[ 6 ] : 121ในทำนองเดียวกัน ส่วนประกอบของเวกเตอร์สุ่มที่มีเมทริกซ์ความแปรปรวนร่วมเป็นศูนย์ในทุกรายการนอกแนวทแยงหลักก็เรียกว่าไม่มีความสัมพันธ์กันเช่นกัน

ถ้าX{\displaystyle X}และวาย{\displaystyle Y}หากตัวแปรสุ่มอิสระกันค่าความแปรปรวนร่วมจะเป็นศูนย์[ 6 ] : 123 [ 10 ]ซึ่งเป็นผลมาจากความเป็นอิสระ อี[Xวาย]=อี[X]อี[วาย].{\displaystyle \operatorname {E} [XY]=\operatorname {E} [X]\cdot \operatorname {E} [Y].}

อย่างไรก็ตาม ในทางกลับกันนั้นโดยทั่วไปแล้วไม่เป็นเช่นนั้น ตัวอย่างเช่น สมมติว่าX{\displaystyle X}มีการกระจายอย่างสม่ำเสมอใน[1,1]{\displaystyle [-1,1]}และปล่อยให้วาย=X2{\displaystyle Y=X^{2}}ชัดเจนX{\displaystyle X}และวาย{\displaystyle Y}ไม่เป็นอิสระ แต่ โควิด(X,วาย)=โควิด(X,X2)=อี[XX2]อี[X]อี[X2]=อี[X3]อี[X]อี[X2]=00อี[X2]=0.{\displaystyle {\begin{aligned}\operatorname {cov} (X,Y)&=\operatorname {cov} \left(X,X^{2}\right)\\&=\operatorname {E} \left[X\cdot X^{2}\right]-\operatorname {E} [X]\cdot \operatorname {E} \left[X^{2}\right]\\&=\operatorname {E} \left[X^{3}\right]-\operatorname {E} [X]\operatorname {E} \left[X^{2}\right]\\&=0-0\cdot \operatorname {E} [X^{2}]\\&=0.\end{aligned}}}

ในกรณีนี้ ความสัมพันธ์ระหว่างวาย{\displaystyle Y}และX{\displaystyle X}ความสัมพันธ์และค่าความแปรปรวนร่วมเป็นการวัดการพึ่งพาเชิงเส้นระหว่างตัวแปรสุ่มสองตัวแบบไม่เป็นเชิงเส้น ตัวอย่างนี้แสดงให้เห็นว่าหากตัวแปรสุ่มสองตัวไม่มีความสัมพันธ์กัน โดยทั่วไปแล้วไม่ได้หมายความว่าตัวแปรเหล่านั้นเป็นอิสระต่อกัน อย่างไรก็ตาม หากตัวแปรสองตัวมีการแจกแจงแบบปกติร่วมกัน (แต่ไม่ใช่หากตัวแปรแต่ละตัวมีการแจกแจงแบบปกติ เพียงอย่างเดียว ) การไม่มีความสัมพันธ์กันจะหมายถึงความเป็นอิสระ[ 11 ]

X{\displaystyle X}และวาย{\displaystyle Y}ตัวแปรที่มีค่าความแปรปรวนร่วมเป็นบวกเรียกว่ามีความสัมพันธ์เชิงบวก ซึ่งหมายความว่า ถ้าX>อี[X]{\displaystyle X>E[X]}แล้วก็มีแนวโน้มว่าวาย>อี[วาย]{\displaystyle Y>E[Y]}ในทางกลับกันX{\displaystyle X}และวาย{\displaystyle Y}ค่าความแปรปรวนร่วมที่เป็นลบจะมีความสัมพันธ์กันในเชิงลบ และถ้าX>อี[X]{\displaystyle X>E[X]}แล้วก็มีแนวโน้มว่าวาย<อี[วาย]{\displaystyle Y<E[Y]}.

ความสัมพันธ์กับผลิตภัณฑ์ภายใน

คุณสมบัติหลายประการของความแปรปรวนร่วมสามารถแยกออกมาได้อย่างงดงามโดยการสังเกตว่ามันมีคุณสมบัติคล้ายคลึงกับคุณสมบัติของผลคูณภายใน :

  1. ไบลิเนียร์ : สำหรับค่าคงที่เอ{\displaystyle a}และ{\displaystyle b}และตัวแปรสุ่มX,วาย,,{\displaystyle X,Y,Z,}โควิด(เอX+วาย,)=เอโควิด(X,)+โควิด(วาย,){\displaystyle \operatorname {cov} (aX+bY,Z)=a\operatorname {cov} (X,Z)+b\operatorname {cov} (Y,Z)}
  2. สมมาตร:โควิด(X,วาย)=โควิด(วาย,X){\displaystyle \operatorname {cov} (X,Y)=\operatorname {cov} (Y,X)}
  3. บวกกึ่งแน่นอน :σ2(X)=โควิด(X,X)0{\displaystyle \sigma ^{2}(X)=\operatorname {cov} (X,X)\geq 0}สำหรับตัวแปรสุ่มทั้งหมดX{\displaystyle X}, และโควิด(X,X)=0{\displaystyle \operatorname {cov} (X,X)=0}หมายความว่าX{\displaystyle X}มีค่าคงที่เกือบแน่นอน

In fact these properties imply that the covariance defines an inner product over the quotient vector space obtained by taking the subspace of random variables with finite second moment and identifying any two that differ by a constant. (This identification turns the positive semi-definiteness above into positive definiteness.) That quotient vector space is isomorphic to the subspace of random variables with finite second moment and mean zero; on that subspace, the covariance is exactly the L2 inner product of real-valued functions on the sample space.

As a result, for random variables with finite variance, the inequality |cov(X,Y)|σ2(X)σ2(Y){\displaystyle \left|\operatorname {cov} (X,Y)\right|\leq {\sqrt {\sigma ^{2}(X)\sigma ^{2}(Y)}}} is a special case of the Cauchy–Schwarz inequality.

For convenience, here is an explicit proof, which uses only the inner product properties above.

If σ2(Y)=0{\displaystyle \sigma ^{2}(Y)=0}, then it holds trivially. Otherwise, define the random variable Z=Xcov(X,Y)σ2(Y)Y.{\displaystyle Z=X-{\frac {\operatorname {cov} (X,Y)}{\sigma ^{2}(Y)}}Y.}

Then we have 0σ2(Z)=cov(Xcov(X,Y)σ2(Y)Y,Xcov(X,Y)σ2(Y)Y)=σ2(X)(cov(X,Y))2σ2(Y)(cov(X,Y))2σ2(X)σ2(Y)|cov(X,Y)|σ2(X)σ2(Y){\displaystyle {\begin{aligned}0\leq \sigma ^{2}(Z)&=\operatorname {cov} \left(X-{\frac {\operatorname {cov} (X,Y)}{\sigma ^{2}(Y)}}Y,\;X-{\frac {\operatorname {cov} (X,Y)}{\sigma ^{2}(Y)}}Y\right)\\[12pt]&=\sigma ^{2}(X)-{\frac {(\operatorname {cov} (X,Y))^{2}}{\sigma ^{2}(Y)}}\\\implies (\operatorname {cov} (X,Y))^{2}&\leq \sigma ^{2}(X)\sigma ^{2}(Y)\\\left|\operatorname {cov} (X,Y)\right|&\leq {\sqrt {\sigma ^{2}(X)\sigma ^{2}(Y)}}\end{aligned}}}

Calculating the sample covariance

The sample covariances among K{\displaystyle K} variables based on N{\displaystyle N} observations of each, drawn from an otherwise unobserved population, are given by the K×K{\displaystyle K\times K}matrixq¯=[qjk]{\displaystyle \textstyle {\overline {\mathbf {q} }}=\left[q_{jk}\right]} with the entries

qjk=1N1i=1N(XijX¯j)(XikX¯k),{\displaystyle q_{jk}={\frac {1}{N-1}}\sum _{i=1}^{N}\left(X_{ij}-{\bar {X}}_{j}\right)\left(X_{ik}-{\bar {X}}_{k}\right),}

which is an estimate of the covariance between variable j{\displaystyle j} and variable k{\displaystyle k}.

The sample mean and the sample covariance matrix are unbiased estimates of the mean and the covariance matrix of the random vectorX{\displaystyle \textstyle \mathbf {X} }, a vector whose jth element (j=1,,K){\displaystyle (j=1,\,\ldots ,\,K)} is one of the random variables. The reason the sample covariance matrix has N1{\displaystyle \textstyle N-1} in the denominator rather than N{\displaystyle \textstyle N} is essentially that the population mean E(X){\displaystyle \operatorname {E} (\mathbf {X} )} is not known and is replaced by the sample mean X¯{\displaystyle \mathbf {\bar {X}} }. If the population mean E(X){\displaystyle \operatorname {E} (\mathbf {X} )} is known, the analogous unbiased estimate is given by

qjk=1Ni=1N(XijE(Xj))(XikE(Xk)){\displaystyle q_{jk}={\frac {1}{N}}\sum _{i=1}^{N}\left(X_{ij}-\operatorname {E} \left(X_{j}\right)\right)\left(X_{ik}-\operatorname {E} \left(X_{k}\right)\right)}.

Generalizations

Auto-covariance matrix of real random vectors

For a vector X=[X1X2Xm]T{\displaystyle \mathbf {X} ={\begin{bmatrix}X_{1}&X_{2}&\dots &X_{m}\end{bmatrix}}^{\mathrm {T} }} of m{\displaystyle m} jointly distributed random variables with finite second moments, its auto-covariance matrix (also known as the variance–covariance matrix or simply the covariance matrix) KXX{\displaystyle \operatorname {K} _{\mathbf {X} \mathbf {X} }} (also denoted by Σ(X){\displaystyle \Sigma (\mathbf {X} )} or cov(X,X){\displaystyle \operatorname {cov} (\mathbf {X} ,\mathbf {X} )}) is defined as[12]:335KXX=cov(X,X)=E[(XE[X])(XE[X])T]=E[XXT]E[X]E[X]T.{\displaystyle {\begin{aligned}\operatorname {K} _{\mathbf {XX} }=\operatorname {cov} (\mathbf {X} ,\mathbf {X} )&=\operatorname {E} \left[(\mathbf {X} -\operatorname {E} [\mathbf {X} ])(\mathbf {X} -\operatorname {E} [\mathbf {X} ])^{\mathrm {T} }\right]\\&=\operatorname {E} \left[\mathbf {XX} ^{\mathrm {T} }\right]-\operatorname {E} [\mathbf {X} ]\operatorname {E} [\mathbf {X} ]^{\mathrm {T} }.\end{aligned}}}

Let X{\displaystyle \mathbf {X} } be a random vector with covariance matrix Σ, and let A be a matrix that can act on X{\displaystyle \mathbf {X} } on the left. The covariance matrix of the matrix-vector product A X is: cov(AX,AX)=E[AX(AX)T]E[AX]E[(AX)T]=E[AXXTAT]E[AX]E[XTAT]=AE[XXT]ATAE[X]E[XT]AT=A(E[XXT]E[X]E[XT])AT=AΣAT.{\displaystyle {\begin{aligned}\operatorname {cov} (\mathbf {AX} ,\mathbf {AX} )&=\operatorname {E} \left[\mathbf {AX(A} \mathbf {X)} ^{\mathrm {T} }\right]-\operatorname {E} [\mathbf {AX} ]\operatorname {E} \left[(\mathbf {A} \mathbf {X} )^{\mathrm {T} }\right]\\&=\operatorname {E} \left[\mathbf {AXX} ^{\mathrm {T} }\mathbf {A} ^{\mathrm {T} }\right]-\operatorname {E} [\mathbf {AX} ]\operatorname {E} \left[\mathbf {X} ^{\mathrm {T} }\mathbf {A} ^{\mathrm {T} }\right]\\&=\mathbf {A} \operatorname {E} \left[\mathbf {XX} ^{\mathrm {T} }\right]\mathbf {A} ^{\mathrm {T} }-\mathbf {A} \operatorname {E} [\mathbf {X} ]\operatorname {E} \left[\mathbf {X} ^{\mathrm {T} }\right]\mathbf {A} ^{\mathrm {T} }\\&=\mathbf {A} \left(\operatorname {E} \left[\mathbf {XX} ^{\mathrm {T} }\right]-\operatorname {E} [\mathbf {X} ]\operatorname {E} \left[\mathbf {X} ^{\mathrm {T} }\right]\right)\mathbf {A} ^{\mathrm {T} }\\&=\mathbf {A} \Sigma \mathbf {A} ^{\mathrm {T} }.\end{aligned}}}

This is a direct result of the linearity of expectation and is useful when applying a linear transformation, such as a whitening transformation, to a vector.

Cross-covariance matrix of real random vectors

For real random vectorsXRm{\displaystyle \mathbf {X} \in \mathbb {R} ^{m}} and YRn{\displaystyle \mathbf {Y} \in \mathbb {R} ^{n}}, the m×n{\displaystyle m\times n} cross-covariance matrix is equal to[12]:336

where YT{\displaystyle \mathbf {Y} ^{\mathrm {T} }} is the transpose of the vector (or matrix) Y{\displaystyle \mathbf {Y} }.

The (i,j){\displaystyle (i,j)}-th element of this matrix is equal to the covariance cov(Xi,Yj){\displaystyle \operatorname {cov} (X_{i},Y_{j})} between the i-th scalar component of X{\displaystyle \mathbf {X} } and the j-th scalar component of Y{\displaystyle \mathbf {Y} }. In particular, cov(Y,X){\displaystyle \operatorname {cov} (\mathbf {Y} ,\mathbf {X} )} is the transpose of cov(X,Y){\displaystyle \operatorname {cov} (\mathbf {X} ,\mathbf {Y} )}.

Cross-covariance sesquilinear form of random vectors in a real or complex Hilbert space

More generally let H1=(H1,,1){\displaystyle H_{1}=(H_{1},\langle \,,\rangle _{1})} and H2=(H2,,2){\displaystyle H_{2}=(H_{2},\langle \,,\rangle _{2})}, be Hilbert spaces over R{\displaystyle \mathbb {R} } or C{\displaystyle \mathbb {C} } with ,{\displaystyle \langle \,,\rangle } anti linear in the first variable, and let X,Y{\displaystyle \mathbf {X} ,\mathbf {Y} } be H1{\displaystyle H_{1}} resp. H2{\displaystyle H_{2}} valued random variables. Then the covariance of X{\displaystyle \mathbf {X} } and Y{\displaystyle \mathbf {Y} } is the sesquilinear form on H1×H2{\displaystyle H_{1}\times H_{2}} (anti linear in the first variable) given by KX,Y(h1,h2)=cov(X,Y)(h1,h2)=E[h1,(XE[X])1(YE[Y]),h22]=E[h1,X1Y,h22]E[h,X1]E[Y,h22]=h1,E[(XE[X])(YE[Y])]h21=h1,(E[XY]E[X]E[Y])h21{\displaystyle {\begin{aligned}\operatorname {K} _{X,Y}(h_{1},h_{2})=\operatorname {cov} (\mathbf {X} ,\mathbf {Y} )(h_{1},h_{2})&=\operatorname {E} \left[\langle h_{1},(\mathbf {X} -\operatorname {E} [\mathbf {X} ])\rangle _{1}\langle (\mathbf {Y} -\operatorname {E} [\mathbf {Y} ]),h_{2}\rangle _{2}\right]\\&=\operatorname {E} [\langle h_{1},\mathbf {X} \rangle _{1}\langle \mathbf {Y} ,h_{2}\rangle _{2}]-\operatorname {E} [\langle h,\mathbf {X} \rangle _{1}]\operatorname {E} [\langle \mathbf {Y} ,h_{2}\rangle _{2}]\\&=\langle h_{1},\operatorname {E} \left[(\mathbf {X} -\operatorname {E} [\mathbf {X} ])(\mathbf {Y} -\operatorname {E} [\mathbf {Y} ])^{\dagger }\right]h_{2}\rangle _{1}\\&=\langle h_{1},\left(\operatorname {E} [\mathbf {X} \mathbf {Y} ^{\dagger }]-\operatorname {E} [\mathbf {X} ]\operatorname {E} [\mathbf {Y} ]^{\dagger }\right)h_{2}\rangle _{1}\\\end{aligned}}}

Numerical computation

When E[XY]E[X]E[Y]{\displaystyle \operatorname {E} [XY]\approx \operatorname {E} [X]\operatorname {E} [Y]}, the equation cov(X,Y)=E[XY]E[X]E[Y]{\displaystyle \operatorname {cov} (X,Y)=\operatorname {E} \left[XY\right]-\operatorname {E} \left[X\right]\operatorname {E} \left[Y\right]} is prone to catastrophic cancellation if E[XY]{\displaystyle \operatorname {E} \left[XY\right]} and E[X]E[Y]{\displaystyle \operatorname {E} \left[X\right]\operatorname {E} \left[Y\right]} are not computed exactly and thus should be avoided in computer programs when the data has not been centered before.[13]Numerically stable algorithms should be preferred in this case.[14]

Comments

The covariance is sometimes called a measure of "linear dependence" between the two random variables. That does not mean the same thing as in the context of linear algebra (see linear dependence). When the covariance is normalized, one obtains the Pearson correlation coefficient, which gives the goodness of the fit for the best possible linear function describing the relation between the variables. In this sense covariance is a linear gauge of dependence.

Applications

Genetics and molecular biology

Covariance is an important measure in biology. Certain sequences of DNA are conserved more than others among species, and thus to study secondary and tertiary structures of proteins, or of RNA structures, sequences are compared in closely related species. If sequence changes are found or no changes at all are found in noncoding RNA (such as microRNA), sequences are found to be necessary for common structural motifs, such as an RNA loop. In genetics, covariance serves a basis for computation of Genetic Relationship Matrix (GRM) (aka kinship matrix), enabling inference on population structure from sample with no known close relatives as well as inference on estimation of heritability of complex traits.

ในทฤษฎีวิวัฒนาการและการคัดเลือกโดยธรรมชาติ สมการของ ไพรซ์อธิบายว่าลักษณะทางพันธุกรรมเปลี่ยนแปลงความถี่อย่างไรเมื่อเวลาผ่านไป สมการนี้ใช้ความแปรปรวนร่วมระหว่างลักษณะและความเหมาะสมเพื่อให้คำอธิบายทางคณิตศาสตร์ของวิวัฒนาการและการคัดเลือกโดยธรรมชาติ สมการนี้ให้วิธีการทำความเข้าใจผลกระทบของการถ่ายทอดยีนและการคัดเลือกโดยธรรมชาติที่มีต่อสัดส่วนของยีนในแต่ละรุ่นใหม่ของประชากร[ 15 ] [ 16 ]

เศรษฐศาสตร์การเงิน

ค่าความแปรปรวนร่วมมีบทบาทสำคัญในเศรษฐศาสตร์การเงินโดยเฉพาะอย่างยิ่งในทฤษฎีการจัดพอร์ตการลงทุนสมัยใหม่และในแบบจำลองการกำหนดราคาหลักทรัพย์ (CAPM ) ค่าความแปรปรวนร่วมระหว่างผลตอบแทนของสินทรัพย์ต่างๆ ถูกนำมาใช้เพื่อกำหนดสัดส่วนการถือครองสินทรัพย์ต่างๆ ที่นักลงทุนควร (ในการวิเคราะห์เชิงบรรทัดฐาน ) หรือที่คาดการณ์ว่าจะ (ในการวิเคราะห์เชิงบวก ) เลือกที่จะถือครองในบริบทของการกระจายความเสี่ยง ภายใต้ สมมติฐานบางประการ

การบูรณาการข้อมูลอุตุนิยมวิทยาและสมุทรศาสตร์

เมทริกซ์ความแปรปรวนร่วมมีความสำคัญในการประมาณเงื่อนไขเริ่มต้นที่จำเป็นสำหรับการทำงานของแบบจำลองพยากรณ์อากาศ ซึ่งเป็นกระบวนการที่เรียกว่าการบูรณาการข้อมูล โดยทั่วไปแล้ว "เมทริกซ์ความแปรปรวนร่วมของข้อผิดพลาดในการพยากรณ์" จะถูกสร้างขึ้นระหว่างการรบกวนรอบสถานะเฉลี่ย (ไม่ว่าจะเป็นค่าเฉลี่ยทางภูมิอากาศหรือค่าเฉลี่ยแบบกลุ่ม) ส่วน "เมทริกซ์ความแปรปรวนร่วมของข้อผิดพลาดในการสังเกต" จะถูกสร้างขึ้นเพื่อแสดงขนาดของข้อผิดพลาดในการสังเกตที่รวมกัน (บนแนวทแยง) และข้อผิดพลาดที่สัมพันธ์กันระหว่างการวัด (นอกแนวทแยง) นี่เป็นตัวอย่างของการประยุกต์ใช้อย่างแพร่หลายในการกรองแบบ Kalman และ การประมาณสถานะทั่วไปสำหรับระบบที่เปลี่ยนแปลงตามเวลา

อุตุนิยมวิทยาขนาดเล็ก

เทคนิคEddy Covarianceเป็นเทคนิคการวัดทางบรรยากาศที่สำคัญ โดยใช้ค่าความแปรปรวนร่วมระหว่างค่าเบี่ยงเบนทันทีของความเร็วลมในแนวดิ่งจากค่าเฉลี่ย และค่าเบี่ยงเบนทันทีของความเข้มข้นของก๊าซ เป็นพื้นฐานในการคำนวณฟลักซ์ความปั่นป่วนในแนวดิ่ง

การประมวลผลสัญญาณ

เมทริกซ์ความแปรปรวนร่วมใช้เพื่อจับความแปรผันเชิงสเปกตรัมของสัญญาณ[ 17 ]

ความสัมพันธ์

ค่าสัมประสิทธิ์สหสัมพันธ์แบบเพียร์สันระหว่างตัวแปรสุ่มสองตัวX{\displaystyle X}และวาย{\displaystyle Y}ถูกกำหนดให้เป็น ρX,วาย=โควิด(X,วาย)σXσวาย{\displaystyle \rho _{X,Y}={\frac {\operatorname {cov} (X,Y)}{\sigma _{X}\sigma _{Y}}}}

ที่ไหน

ตัวส่วนสามารถเขียนได้อีกแบบว่าวาร์(X)วาร์(วาย){\displaystyle {\sqrt {\operatorname {var} (X)\operatorname {var} (Y)}}}ซึ่งก็คือค่าเฉลี่ยเรขาคณิตของค่าความแปรปรวน

ดังนั้นเราจึงเห็นว่าสัมประสิทธิ์สหสัมพันธ์เป็นรูปแบบมาตรฐานของความแปรปรวนร่วม โดยจะมีค่าอยู่ระหว่าง เสมอ1{\displaystyle -1}และ1{\displaystyle 1}และไม่มีหน่วย (ต่างจากค่าความแปรปรวนร่วม)

ค่าสัมประสิทธิ์สหสัมพันธ์มักใช้สัญลักษณ์rและมักถูกรายงานในงานวิจัยทางวิทยาศาสตร์

การวิเคราะห์ส่วนประกอบหลัก

เมทริกซ์ความแปรปรวนร่วมถูกนำมาใช้ในการวิเคราะห์องค์ประกอบหลักเพื่อลดมิติของคุณลักษณะในการประมวลผลข้อมูลเบื้องต้น องค์ประกอบหลักคือมิติที่อธิบายความแปรปรวนส่วนใหญ่ในข้อมูล การประยุกต์ใช้ที่รู้จักกันดีคือในด้านสติปัญญา โดยสร้างปัจจัย gขึ้นมา อีกตัวอย่างหนึ่งคือด้านบุคลิกภาพ โดยแบบจำลองต่างๆ เช่นแบบจำลองห้าปัจจัยได้มาจากการวิเคราะห์องค์ประกอบหลัก

ดูเพิ่มเติม

สรุปเนื้อหา

ข้อมูลสำคัญจากบทความ

ข้อมูลสำคัญเกี่ยวกับ ความแปรปรวนร่วม

ใน ทฤษฎีความน่าจะเป็น และ สถิติ ความแปรปรวน ร่วม เป็นการวัด ความแปรปรวน ร่วม ของ ตัวแปรสุ่ม สอง ตัว [ 1 ] เครื่องหมาย ของความแปรปรวน ร่วม แสดงแนวโน้มใน ความสัมพันธ์เชิงเส้น...

คำนิยาม

สำหรับ ตัวแปรสุ่ม ค่าจริง สองตัว ที่มีการแจกแจงร่วมกัน X {\displaystyle X} และ วาย {\displaystyle Y} ด้วย โมเมนต์ที่สอง ที่จำกัด ความแปรปรวนร่วมจะถูกกำหนดเป็น ค่าที่คาดหวัง (หรือค่าเฉลี่ย) ของผลคูณของค่าเบี่ยงเบนจากค่าที่คาดหวังของแต่ละบุคคล: [ 5 ] [ 6 ] : 119

ตัวแปรสุ่มเชิงซ้อน

ความแปรปรวนร่วมระหว่าง ตัวแปรสุ่มเชิงซ้อน สองตัว ซ , ว {\displaystyle Z,W} ถูกกำหนดเป็น [ 6 ] : 119 โควิด ⁡ ( ซ , ว ) = อี ⁡ [ ( ซ − อี ⁡ [ ซ ] ) ( ว − อี ⁡ [ ว ] ) ¯ ] = อี ⁡ [ ซ ว ¯ ] − อี ⁡ [ ซ ] อี ⁡ [ ว ¯ ] {\displaystyle \operatorname {cov}...

ตัวแปรสุ่มแบบไม่ต่อเนื่อง

ถ้าคู่ตัวแปรสุ่ม (จริง) ( X , วาย ) {\displaystyle (X,Y)} สามารถรับเอาค่านิยมเหล่านั้นได้ ( x ฉัน , y ฉัน ) {\displaystyle (x_{i},y_{i})} สำหรับ ฉัน = 1 , … , n {\displaystyle i=1,\ldots ,n} โดยมีความน่าจะเป็นเท่ากัน พี ฉัน = 1 / n {\displaystyle p_{i}=1/n}...