## ← 40-18 Compute_Correlation

• 2 Followers
• 13 Lines

40-18 Compute_Correlation

### Get Embed Code x Embed video Use the following code to embed this video. See our usage guide for more details on embedding. Paste this in your document somewhere (closest to the closing body tag is preferable): ```<script type="text/javascript" src='https://amara.org/embedder-iframe'></script> ``` Paste this inside your HTML body, where you want to include the widget: ```<div class="amara-embed" data-url="http://www.youtube.com/watch?v=-Dgd6HR2gXU" data-team="udacity"></div> ``` 3 Languages

Showing Revision 2 created 11/02/2015 by Udacity Robot.

1. For last year's weight, or the x axis, your mean estimate was 81.2.
2. I'm very flattered to report for this year on average after outlier removal
3. you believe my weight went down.
4. The standard deviation for x was 10.6, and the same for y is 9.34.
5. Finally, I'll give you the mean of the following mixed product,
6. the difference from the original axis and the x bar, the mean,
7. times the same for y.
8. This looks an awful lot like a variance, but it's between two different variables.
9. We call this a covariance or "cov" between two variables x and y.
10. In our example, the numerical value for the covariance is 75.36.
11. Using the covariance it is amazingly easy now to calculate the correlation r.
12. We just divide it by the two standard deviations for x and y.
13. Please give me that number.