Prepare for your exams

Study with the several resources on Docsity

Earn points to download

Earn points by helping other students or get them with a premium plan

Guidelines and tips

Prepare for your exams

Study with the several resources on Docsity

Earn points to download

Earn points by helping other students or get them with a premium plan

Community

Ask the community

Ask the community for help and clear up your study doubts

University Rankings

Discover the best universities in your country according to Docsity users

Free resources

Our save-the-student-ebooks!

Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors

A set of lecture notes on covariance and correlation for cs 109, written by will monroe based on a chapter by chris piech. The notes explain the concept of covariance and correlation between two variables, their properties, and the relationship between them. The notes also discuss the difference between pearson and spearman correlation.

Typology: Study notes

2021/2022

1 / 2

Download Lecture Notes on Covariance and Correlation by Will Monroe for CS 109 and more Study notes Probability and Statistics in PDF only on Docsity! – 1 – Will Monroe CS 109 Lecture Notes #15 July 28, 2017 Covariance and Correlation Based on a chapter by Chris Piech Covariance and Correlation Consider the two plots shown below. In both images I have plotted one thousand samples drawn from an underlying joint distribution. Clearly the two distributions are different. However, the mean and variance are the same in both the x and the y dimension. What is different? Covariance is a quantitative measure of the extent to which the deviation of one variable from its mean matches the deviation of the other from its mean. It is a mathematical relationship that is defined as: Cov(X,Y ) = E[(X − E[X])(Y − E[Y ])] Themeaning of this mathematical definition may not be obvious at a first glance. If X andY are both above their respective means, or if X and Y are both below their respective means, the expression inside the outer expectation will be positive. If one is above its mean and the other is below, the term is negative. If this expression is positive on average, the two random variables will have a positive correlation. We can rewrite the above equation to get an equivalent equation: Cov(X,Y ) = E[XY ] − E[Y ]E[X] Using this equation (and the fact that the expectation of the product of two independent random variables is equal to the product of the expectations) is it easy to see that if two random variables are independent their covariance is 0. The reverse is not true in general: if the covariance of two random variables is 0, they can still be dependent!