250 likes | 504 Views
Correlation and Covariance. R. F. Riesenfeld ( Based on web slides by James H. Steiger ). Goals. Introduce concepts of Covariance Correlation Develop computational formulas. Covariance. Variables may change in relation to each other
E N D
Correlation and Covariance R. F. Riesenfeld (Based on web slides by James H. Steiger)
Goals • Introduce concepts of • Covariance • Correlation • Develop computational formulas CS5961 Comp Stat
Covariance • Variables may change in relation to each other • Covariancemeasures how much the movement in one variable predicts the movement in a corresponding variable CS5961 Comp Stat
Smoking and Lung Capacity Example: investigate relationship between cigarette smokingand lung capacity Data: sample group response data on smoking habits, andmeasured lung capacities, respectively CS5961 Comp Stat
Smoking v Lung Capacity Data CS5961 Comp Stat
Smoking v Lung Capacity • Observe that as smoking exposure goes up, corresponding lung capacity goes down • Variables covaryinversely • Covarianceand Correlation quantify relationship CS5961 Comp Stat
Covariance • Variables that covaryinversely, 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 deviationmeasures extent to which variables covary, the degree of linkage between them CS5961 Comp Stat
The Sample Covariance • Similarto variance, for theoretical reasons, average is typically computed using (N -1), notN. Thus, CS5961 Comp Stat
Calculating Covariance CS5961 Comp Stat
Calculating Covariance CS5961 Comp Stat
Evaluation yields, CS5961 Comp Stat
Covariance under Affine Transformation CS5961 Comp Stat
(Pearson) Correlation Coefficient rxy • Like covariance, but uses Z-values instead of deviations. Hence, invariant under linear transformation of the raw data. CS5961 Comp Stat
Alternative (common) Expression CS5961 Comp Stat
Computational Formula 1 CS5961 Comp Stat
Computational Formula 2 CS5961 Comp Stat
Table for Calculating rxy CS5961 Comp Stat
Computingrxyfrom Table CS5961 Comp Stat
Computing Correlation CS5961 Comp Stat
Conclusion rxy= -0.96 implies almost certainty smoker will have diminish lung capacity Greater smoking exposure implies greater likelihood of lung damage CS5961 Comp Stat
End Covariance & Correlation Notes CS5961 Comp Stat