Relationship between variables PDF

Title Relationship between variables
Course Psychology Statistics and Practical
Institution University of Kent
Pages 20
File Size 1.1 MB
File Type PDF
Total Downloads 44
Total Views 174

Summary

A correlation coefficient
• Quantifies how well the best fit line explains the data • Gives the direction of the relationship
• Two features • Magnitude
• Direction
• Zero indicates no relationship...


Description

SP300: Relationships between variables Dr. Lydia Kearney ([email protected]) Office hours: 12-1 Weds, 12-1 Thurs, Keynes A2.01

1 Reminders! • SP300 drop-in hours (OPTIONAL!) • Tomorrow and Monday, 12-2, see timetable • Ask questions about demo 2 assignment • Revision/questions about SP300 lecture topics • Come with your specific questions th • Demo 1/2 deadline next week – Friday 16 by noon – submission portal open • Project A begins in week 9 (see timetable) 2 Assessing relationships • So far we have focused on statistics for single variables • But most research looks at the relationships between two or more variables • E.g., do I eat more chocolate when there are Crunchie bars in the vending machine than when there are not? • Variable 1 = number of bars eaten • Variable 2 = Crunchie bars present or not • First step: think about how to display the relationship in your data

3 Variables recap • Independent/predictor variables • The variables you manipulate/predict from • Dependent/predictor variables • The variables you measure IndependentVariable Alcohol Consumption DependentVariable Cognitive Function

4

Levels of measurement recap 5 Two nominal variables: tables • A cross-tabulation is usually appropriate • You may need to collapse categories if there are too many • Each cell shows the percentage falling in each combination of the categories

6 Two nominal variables: tables (2) • Two continuous variables: if there are too many levels, you can break the data into bands (e.g. age, income)

Da y sCr u n c h i eBa r sEa t e np e rd a yun t i l e x a m 7 Two nominal variables: diagrams • You can use a compound or stacked bar chart • Again, you may need to collapse categories

8 Example of a compound bar chart

9 Example of a bad stacked bar chart

10 Continuous and nominal variable: tables • A table can be used – the mean and other descriptives for the continuous variable are usually given

11 Continuous and nominal variable: diagrams • Use a bar chart to display the means of the score variable in each category

12 Two continuous variables: diagrams • Scatter plot

13 Line of best fit    

A way to summarise the relationship Imagine drawing a line on your scatter plot data that best fits The closer your points cluster around the line, the stronger the relationship between your two variables Conversely: the more widely your points are spread around the line, the weaker the relationship

14 Line of best fit on a scatter plot

15 Line of best fit on a scatter plot (2)

16 Scatter plots and relationships • If there is a positive relationship between your variables there will be a general trend from the bottom left to the top right • Line of best fit will have a positive slope

17 Scatter plots of relationships (2) • If there is a negative relationship between your variables there will be a general trend from the top left to the bottom right • Line of best fit has negative slope

18 Quantifying the relationship: covariation between variables • We want a quantitative estimate of how two variables covary (i.e. change together) • We want a single number to illustrate this • We can use something similar to the variance formula for this

19 Covariance formula

20 Covariation between variables

Y X

21

Covariation between variables (2)

Y Ya v g Xa v g X

22 Covariation between variables (3)

Y Ya v g Xa v g   

X

23

For each data point you can calculate how it deviates from Xavg and Yavg If the deviations have the same sign then then the product of them is positive If they are of opposite sign then product is negative

Y Covariation between variables (4) When you start to add these up: If many are of the same sign, then they add up: •Many negatives sum up to a big negative •Many positives sum up to a big positive

If they are half positive/half negative then they sum up to zero Ya v g

Xa v g X

24

v g YYa Product of deviations • positives= 5 data points • Negatives = 2 data points

• Overall more positive values go into sum than negative: • 5-2=+3 • So there is some evidence for positive covariance • Keep in mind that it isn’t only the signs that matter, the magnitudes matter too Positive Relationship Example

Xa v g X

25 No relationship example

26

Y

Ya v g Product of deviations • Positives = 4 data points • Negatives = 4 data points • Overall these values cancel out when summing • Numerator = 0 • So there is little/no covariance No relationship example (2)

Xa v g X 27 Covariance and correlation • Covariance is in units measured • Covariance is not comparable across different measurement units • Does this sound familiar? • Think back to variance and standard deviation 28 Covariance and correlation (2) • Covariance used to calculate correlation • Covariance and correlation are two different numbers • Correlations have two characteristics: • Magnitude • Between 0 and 1 • 0 = no relationship • 1 = perfect relationship

• Direction • Negative vs. positive correlation • E.g. -.67, or .56 29 Positive correlation • There will be a trend from bottom left to top right • Correlation coefficient value will be positive

30 Negative correlation • There will be a trend from top left to bottom right • Correlation coefficient value will be negative

31 Correlation magnitude • Which is the bigger correlation? -.67 or .58 32 Covariance summary • A correlation coefficient • Quantifies how well the best fit line explains the data • Gives the direction of the relationship • Two features • Magnitude • Direction • Zero indicates no relationship 33...


Similar Free PDFs