correlations: testing relationships between two metric variables lecture 18:
TRANSCRIPT
![Page 1: CORRELATIONS: TESTING RELATIONSHIPS BETWEEN TWO METRIC VARIABLES Lecture 18:](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c17391/html5/thumbnails/1.jpg)
CORRELATIONS: TESTING RELATIONSHIPS BETWEEN TWO METRIC VARIABLES
Lecture 18:
![Page 2: CORRELATIONS: TESTING RELATIONSHIPS BETWEEN TWO METRIC VARIABLES Lecture 18:](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c17391/html5/thumbnails/2.jpg)
Agenda2
Reminder about Lab 3
Brief Update on Data for Final
Correlations
![Page 3: CORRELATIONS: TESTING RELATIONSHIPS BETWEEN TWO METRIC VARIABLES Lecture 18:](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c17391/html5/thumbnails/3.jpg)
Probability Revisited3
To make a reasonable decision, we must know:
Probability Distribution What would the distribution be like if it were
only due to chance?
Decision Rule What criteria do we need in order to
determine whether an observation is just due to chance or not.
![Page 4: CORRELATIONS: TESTING RELATIONSHIPS BETWEEN TWO METRIC VARIABLES Lecture 18:](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c17391/html5/thumbnails/4.jpg)
Quick Recap of An Earlier Issue:Why N-1?
4
If we have a randomly distributed variable in a population, extreme cases (i.e., the tails) are less likely to be selected than common cases (i.e., within 1 SD of the mean). One result of this: sample variance is lower than
actual population variance. Dividing by n-1 corrects this bias when calculating sample statistics.
![Page 5: CORRELATIONS: TESTING RELATIONSHIPS BETWEEN TWO METRIC VARIABLES Lecture 18:](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c17391/html5/thumbnails/5.jpg)
Checking for simple linear relationships
5
Pearson’s correlation coefficient Measures the extent to which two metric or
interval-type variables are linearly related Statistic is Pearson r, or the linear or product-
moment correlation
Or, the correlation coefficient is the average of the cross products of the corresponding z-scores.
![Page 6: CORRELATIONS: TESTING RELATIONSHIPS BETWEEN TWO METRIC VARIABLES Lecture 18:](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c17391/html5/thumbnails/6.jpg)
Correlations6
N
iyixixy zz
Nr
11
1
Ranges from zero to 1, where 1 = perfect linear relationship between the two variables. Negative relations Positive relations
Remember: correlation ONLY measures linear relationships, not all relationships!
![Page 7: CORRELATIONS: TESTING RELATIONSHIPS BETWEEN TWO METRIC VARIABLES Lecture 18:](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c17391/html5/thumbnails/7.jpg)
Interpretation7
Recall that Correlation is a precondition for causality– but by itself it is not sufficient to show causality (why?)
Correlation is a proportional measure; does not depend on specific measurements
Correlation interpretation: Direction (+/-) Magnitude of Effect (-1 to 1); shown as r Statistical Significance (p<.05, p<.01, p<.001)
![Page 8: CORRELATIONS: TESTING RELATIONSHIPS BETWEEN TWO METRIC VARIABLES Lecture 18:](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c17391/html5/thumbnails/8.jpg)
Correlation: Null and Alt Hypotheses8
Null versus Alternative Hypothesis H0 H1, H2, etc
Test Statistics and Significance Level
Test statistic Calculated from the data Has a known probability distribution
Significance level Usually reported as a p-value
(probability that a result would occur if the null hypothesis were true).
price mpg
price 1.0000
mpg -0.4686 1.0000 0.0000
![Page 9: CORRELATIONS: TESTING RELATIONSHIPS BETWEEN TWO METRIC VARIABLES Lecture 18:](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c17391/html5/thumbnails/9.jpg)
Factors which limit Correlation coefficient
9
Homogeneity of sample groupNon-linear relationshipsCensored or limited scalesUnreliable measurement instrumentOutliers
![Page 10: CORRELATIONS: TESTING RELATIONSHIPS BETWEEN TWO METRIC VARIABLES Lecture 18:](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c17391/html5/thumbnails/10.jpg)
Homogenous Groups10
![Page 11: CORRELATIONS: TESTING RELATIONSHIPS BETWEEN TWO METRIC VARIABLES Lecture 18:](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c17391/html5/thumbnails/11.jpg)
Homogenous Groups: Adding Groups11
![Page 12: CORRELATIONS: TESTING RELATIONSHIPS BETWEEN TWO METRIC VARIABLES Lecture 18:](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c17391/html5/thumbnails/12.jpg)
Homogenous Groups: Adding More Groups
12
![Page 13: CORRELATIONS: TESTING RELATIONSHIPS BETWEEN TWO METRIC VARIABLES Lecture 18:](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c17391/html5/thumbnails/13.jpg)
Separate Groups (non-homogeneous)13
![Page 14: CORRELATIONS: TESTING RELATIONSHIPS BETWEEN TWO METRIC VARIABLES Lecture 18:](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c17391/html5/thumbnails/14.jpg)
Non-Linear Relationships14
![Page 15: CORRELATIONS: TESTING RELATIONSHIPS BETWEEN TWO METRIC VARIABLES Lecture 18:](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c17391/html5/thumbnails/15.jpg)
Censored or Limited Scales…15
![Page 16: CORRELATIONS: TESTING RELATIONSHIPS BETWEEN TWO METRIC VARIABLES Lecture 18:](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c17391/html5/thumbnails/16.jpg)
Censored or Limited Scales16
![Page 17: CORRELATIONS: TESTING RELATIONSHIPS BETWEEN TWO METRIC VARIABLES Lecture 18:](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c17391/html5/thumbnails/17.jpg)
Unreliable Instrument17
![Page 18: CORRELATIONS: TESTING RELATIONSHIPS BETWEEN TWO METRIC VARIABLES Lecture 18:](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c17391/html5/thumbnails/18.jpg)
Unreliable Instrument18
![Page 19: CORRELATIONS: TESTING RELATIONSHIPS BETWEEN TWO METRIC VARIABLES Lecture 18:](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c17391/html5/thumbnails/19.jpg)
Unreliable Instrument19
![Page 20: CORRELATIONS: TESTING RELATIONSHIPS BETWEEN TWO METRIC VARIABLES Lecture 18:](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c17391/html5/thumbnails/20.jpg)
Outliers20
![Page 21: CORRELATIONS: TESTING RELATIONSHIPS BETWEEN TWO METRIC VARIABLES Lecture 18:](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c17391/html5/thumbnails/21.jpg)
Outliers21
Outlier
![Page 22: CORRELATIONS: TESTING RELATIONSHIPS BETWEEN TWO METRIC VARIABLES Lecture 18:](https://reader035.vdocuments.mx/reader035/viewer/2022070410/56649f035503460f94c17391/html5/thumbnails/22.jpg)
22
Examples with Real Data…