Sociology 210 Lecture 22 Correlation 1122022 1 Review

  • Slides: 17
Download presentation
Sociology 210 Lecture 22: Correlation 1/12/2022 1

Sociology 210 Lecture 22: Correlation 1/12/2022 1

Review: Calculate Test Statistics is Fun Sex False True Total 15 (15. 7) 50%

Review: Calculate Test Statistics is Fun Sex False True Total 15 (15. 7) 50% 15 (14. 3) 50% 30 100% Male 8 (7. 3) 57% 6 (6. 7) 43% 14 100% Total 23 52% 21 48% 44 100% Female 1/12/2022 2

Example in Stata Option for chi Option to show -squared test expected values df,

Example in Stata Option for chi Option to show -squared test expected values df, test statistic and p-value 1/12/2022 3

Correlation • Correlation is a statistical technique used to measure and describe the relationship

Correlation • Correlation is a statistical technique used to measure and describe the relationship between two variables • Most common measure of correlation is the Pearson correlation (r) – Used with two interval/ratio variables – Used to measure degree of linear relationship between two variables 1/12/2022 4

The Direction of Relationship • Positive Correlation: when two variables move in the same

The Direction of Relationship • Positive Correlation: when two variables move in the same direction – In other words, higher values of one variable are associated with higher values of the other • Negative Correlation: when two variables tend to move in opposite directions – In other words, higher values of one variable are associated with lower values of the other 1/12/2022 5

Examples of positive and negative relationships 1/12/2022 6

Examples of positive and negative relationships 1/12/2022 6

Which scatterplot shows the strongest positive linear relationship? 1/12/2022 7

Which scatterplot shows the strongest positive linear relationship? 1/12/2022 7

The Pearson Correlation • The Pearson Correlation measures the degree and direction of a

The Pearson Correlation • The Pearson Correlation measures the degree and direction of a linear relationship between two variables 1/12/2022 8

 • To calculate the correlation we need to use something called the sum

• To calculate the correlation we need to use something called the sum of products of deviations (SP) of X and Y – This is analogous to a sum of squares (SS), only it measures covariability among two variables rather than just variation in one variable 1/12/2022 9

 • The SP is used to calculate the Pearson correlation • The correlation

• The SP is used to calculate the Pearson correlation • The correlation (r) always ranges from -1 to 1 • The sample correlation is signified by r, and the population correlation is usually signified by (rho) 1/12/2022 10

Example Verbal Scores X Math Scores Y 17 24 9 9 -9 19 23

Example Verbal Scores X Math Scores Y 17 24 9 9 -9 19 23 1 4 -2 14 22 36 1 -6 22 17 4 16 -8 15 23 25 4 -10 26 21 36 0 0 23 18 9 9 -9 21 17 1 16 -4 28 21 64 0 0 15 24 25 9 -15 SSX = 210 SSY = 68 SPXY = -63 1/12/2022 11

twoway (lfit y x) (scatter y x) r = -0. 527 1/12/2022 12

twoway (lfit y x) (scatter y x) r = -0. 527 1/12/2022 12

Importance of Linearity X and Y have a perfect non-linear relationship, but their correlation

Importance of Linearity X and Y have a perfect non-linear relationship, but their correlation is 0 because correlation only measures a linear relationship 1/12/2022 13

Hypothesis Tests with Correlations • The question for the hypothesis test is whether the

Hypothesis Tests with Correlations • The question for the hypothesis test is whether the correlation exists in the population – H 0: = 0 – H A: 0 • The idea is that even if there is no correlation in the population you still might obtain a nonzero value for a sample correlation, simply due to sampling error 1/12/2022 14

Example of how you could get a strong sample correlation from a population with

Example of how you could get a strong sample correlation from a population with a zero correlation 1/12/2022 15

Hypothesis Tests with Correlations • Table B. 6 in the back of the Gravetter

Hypothesis Tests with Correlations • Table B. 6 in the back of the Gravetter and Wallnau book gives you the critical values of r that you need to obtain to reject the null hypothesis for a given sample size • All you need to know is the sample size, the magnitude of the sample correlation (which for this test is the test statistic), and the alpha level for the test • You can use either a one- or two-tailed test – A two-tailed test asks whether the correlation is statistically different from 0 – A one-tailed test asks whether the correlation is significantly positive or negative (whichever is the hypothesized direction) – The convention is to report results from the two-tailed test 1/12/2022 16

Correlations in Stata. corr prestg 80 educ income 91 wordsum tvhours attend (obs=1557) 1/12/2022

Correlations in Stata. corr prestg 80 educ income 91 wordsum tvhours attend (obs=1557) 1/12/2022 17