Correlation and Covariance R. F. Riesenfeld (Based on web slides by James H. Steiger) Goals Introduce concepts of Covariance Correlation Develop computational formulas R F Riesenfeld Sp 2010 CS5961 Comp Stat 2 Covariance Variables may change in relation to each
other Covariance measures how much the movement in one variable predicts the movement in a corresponding variable R F Riesenfeld Sp 2010 CS5961 Comp Stat 3 Smoking and Lung Capacity Example: investigate relationship between cigarette smoking and lung capacity Data: sample group response data on smoking habits, and measured lung capacities, respectively R F Riesenfeld Sp 2010
CS5961 Comp Stat 4 Smoking v Lung Capacity Data N Cigarettes (X ) Lung Capacity (Y ) 1 2 0 5 45 42 3 10
33 4 15 31 5 20 29 R F Riesenfeld Sp 2010 CS5961 Comp Stat 5 Smoking and Lung Capacity 6
Smoking v Lung Capacity Observe that as smoking exposure goes up, corresponding lung capacity goes down Variables covary inversely Covariance and Correlation quantify relationship R F Riesenfeld Sp 2010 CS5961 Comp Stat 7 Covariance Variables that covary inversely, like smoking and lung capacity, tend to appear on opposite sides of the group means
When smoking is above its group mean, lung capacity tends to be below its group mean. Average product of deviation measures extent to which variables covary, the degree of linkage between them R F Riesenfeld Sp 2010 CS5961 Comp Stat 8 The Sample Covariance Similar to variance, for theoretical reasons, average is typically computed using (N -1), not N . Thus, 1 N S xy Xi X
N 1 i1 R F Riesenfeld Sp 2010 CS5961 Comp Stat Y Y i 9 Calculating Covariance R F Riesenfeld Sp 2010 Cigs (X ) 0 5 10 15 20
Lung Cap (Y ) 45 42 33 31 29 X 10 Y 36 CS5961 Comp Stat 10 Calculating Covariance Cigs (X ) ( X X ) ( X X ) (Y Y ) (Y Y ) Cap (Y ) 0 -10 -90 9
45 5 10 15 20 -5 0 5 10 -30 0 -25 -70 6 -3 -5 -7
42 33 31 29 = -215 R F Riesenfeld Sp 2010 CS5961 Comp Stat 11 Covariance Calculation (2) Evaluation yields, S xy R F Riesenfeld Sp 2010 1
( 215) 53.75 4 CS5961 Comp Stat 12 Covariance under Affine Transformation Let Li aX i b and M i cYi d . Then, l i a x i , m i c y i where, u i ui u . , Evaluating, in turn, gives, N S LM 1 l i m i
N 1 i 1 R F Riesenfeld Sp 2010 CS5961 Comp Stat 13 Covariance under Affine Transf Evaluating further, S LM (2) 1 N l i m i N 1 i1 1 N
a x i c y i N 1 i1 1 N ac x i y i N 1 i1 S LM acS xy R F Riesenfeld Sp 2010 CS5961 Comp Stat 14 (Pearson) Correlation Coefficient rxy Like covariance, but uses Z-values instead of deviations. Hence, invariant under
linear transformation of the raw data. N 1 rxy zxi zyi N 1 i 1 R F Riesenfeld Sp 2010 CS5961 Comp Stat 15 Alternative (common) Expression rxy R F Riesenfeld Sp 2010 sxy sx s y
CS5961 Comp Stat 16 Computational Formula 1 1 N X iYi sxy N 1 i 1 R F Riesenfeld Sp 2010 N N X i Yi i 1
i 1 N CS5961 Comp Stat 17 Computational Formula 2 rxy N XY R F Riesenfeld Sp 2010
2 N X X 2 X Y CS5961 Comp Stat 2 NY Y 2
18 Table for Calculating rxy Cigs (X ) = Y2 Cap (Y ) 0 2025 45 25 100 225 400
X2 XY 0 0 5 10 15 20 50 R F Riesenfeld Sp 2010 CS5961 Comp Stat 19 Computing rxy from Table rxy
5(1585) 50(180) 5(750 50 ) 5(6680) 180 2 2 7925 9000 3750 2500 33400 32400 R F Riesenfeld Sp 2010 CS5961 Comp Stat 20 Computing Correlation rxy
1075 1250 1000 rxy 0.9615 R F Riesenfeld Sp 2010 CS5961 Comp Stat 21 rxy 0.96 Conclusion rxy = -0.96 implies almost certainty smoker will have diminish lung capacity Greater smoking exposure implies greater likelihood of lung damage R F Riesenfeld Sp 2010 CS5961 Comp Stat 22
End Covariance Notes & Correlation R F Riesenfeld Sp 2010 CS5961 Comp Stat 23
POLI 421, Framing Public Policies Object of attention > cognitive response When you think of a particular object, be it a political leader, a policy issue such as gun control, abortion, climate change, or whatever it may be, you think...
Each Tic-Tac-Toe square contains 1 question with 3 possible answers. If answered correctly ... slide click on the home button to return to the game board. From the . ... The location of the correct answer can be modified by...
Elimination of need for network address translation (NAT) between private and public addresses ... - Identifies that the network is directly connected and the interface is configured with an IP address and activated. L ... You will also configure the...
Lab on a Chip? Microfluidics Microfluidics: The use of microfabrication techniques from the IC industry to fabricate channels, chambers, reactors, and active components on the size scale of the width of a human hair or smaller Why use microfluidics?
Casts and Impressions Impressions Types: Patent: visible (2D) Latent: not visible to eye Plastic: 3-D, left in material Class or individual evidence Dental Impressions Bite marks = individual evidence Dental patterns used to: Identify remains Identify suspects at crime scenes...
Shakespeare's Career. Career - Poet, Playwright, Dramatist and Actor . 1584-1594—completely missing from any historical records. Believed to have left his home and traveled with a traveling drama troupe performing at carnivals and fairs all over England and Scotland
Lesley Griffiths, Minister for Communities, Wales. ... Joyce Watson AM and the Cross-party group on trafficking in the Welsh Assembly. Jenny Marra MSP and Rhoda Grant MSP. Lord Maurice Morrow MLA. Pray wisdom and boldness for those. in authority
Ready to download the document? Go ahead and hit continue!