1/59
Looks like no tags are added yet.
When do you use correlation?
When asking about the relationship between two variables, with a pair of measures (X and Y) from each participant, rather than comparing group means. Typically used in surveys where each variable has multiple values.
What two key questions does correlation address?
What is the relationship between two variables? Does one variable vary in a systematic and predictable way with the other variable?
Scatterplot
A two-dimensional graph displaying each pair of observations (e.g., each participant's perceived crime and actual crime scores). It lets you see what the relationship between the variables looks like.
Why draw a scatterplot if you can calculate Pearson's r?
To check the relationship is linear (appropriate for a correlational test) and to look for outliers.
Positive correlation
As one variable increases, the other also increases (higher scores on one go with higher scores on the other).
Negative correlation
As one variable increases, the other decreases.
No correlation
No systematic relationship between the variables; r is around 0 and the scatterplot shows no pattern.
Strength of a correlation
How closely tied two variables are. The less scattered the points are from a straight line, the stronger the correlation. Indicated by the value of r.
How does correlation enable prediction?
Once we know the correlation between two variables, we can predict a person's score on one variable from their score on the other. The stronger the relationship, the more accurate the prediction.
Correlation coefficient
A statistic that measures the relationship between two variables.
Pearson's r
The Pearson product-moment correlation coefficient. The most commonly used correlation coefficient; it describes the strength and direction of the linear relationship between two variables.
What is the range of Pearson's r?
-1.00 to +1.00
What does r = +1 mean?
A perfect positive correlation. The value of one variable can be predicted precisely from the other.
What does r = -1 mean?
A perfect negative correlation. The value of one variable can be predicted precisely from the other.
What does r = 0 mean?
No relationship between the variables at all.
Formula for Pearson's r
r = Σ(X − X̄)(Y − Ȳ) / √[Σ(X − X̄)² × Σ(Y − Ȳ)²]
In the Pearson's r formula, what does the numerator represent?
Covariance: how much X and Y vary together.
In the Pearson's r formula, what does the denominator represent?
How much the variables vary apart (separately).
Null hypothesis (H0) for a correlation
There is no correlation between the two variables. H0: r = 0
Alternative hypothesis (H1) for a correlation
There is a correlation between the two variables. H1: r ≠ 0
Example H0 and H1 (perceived and actual crime)
H0: There is no correlation between perceived crime and actual crime. H1: There is a correlation between perceived crime and actual crime.
What are the steps in testing a correlation?
1) Establish H0 and H1. 2) Plot the data on a scatterplot. 3) Calculate r, df and p. 4) Compare p to alpha (usually .05) and reject or retain H0.
Degrees of freedom for Pearson's r
df = N − 2
Decision rule for a correlation
If p is smaller than alpha (usually .05), reject H0 and conclude there is a significant correlation. If p is larger than alpha, retain H0 and conclude there is no correlation.
What does it mean if you retain H0 in a correlation analysis?
There is no relationship between the variables (the data are drawn from a population in which there is no relationship).
What does it mean if you reject H0 in a correlation analysis?
There is sufficiently strong evidence of a relationship between the variables.
What must you include when writing up a correlation?
The symbol r, the degrees of freedom, the r value and the p value. Example: There was a strong, significant positive correlation between perceived crime and actual crime (r(6) = .79, p = .015).
What are the three elements of a correlation?
Direction, strength and significance.
Direction (of a correlation)
Whether the correlation is positive or negative: as one variable increases, what happens to the other?
Strength guidelines for r
± .00 to .29 = zero to small; ± .30 to .49 = medium; ± .50 to 1.00 = large. These guidelines are very general and should not be taken too seriously.
Significance (of a correlation)
Whether r is significantly different from 0, i.e., whether p is smaller than .05 (the chance of finding this pattern just due to random processes is less than 5%).
r² (r squared)
The amount of variance shared by the two variables. Example: r = .3 gives r² = .09, or 9%.
Why do we make a judgment about the strength of r?
With low values of r, variation in one variable is associated with only a very limited amount of the variance in the other variable.
Shoe size and weight example
If the correlation is less than .3, then more than 90% (actually 91%) of someone's weight is associated with things other than their shoe size.
t-test vs correlation (what each tests)
A t-test tests whether the difference between the means of two samples may be due to chance. A correlation tests whether the linear relationship between two variables may be due to chance.
Pets and friends example in jamovi (result and conclusion)
r(3) = .94, p = .016. Because p is smaller than .05, reject H0: there was a strong, significant positive correlation between the number of pets people own and the number of close friends they have.
Curvilinear relationship
A relationship where the association between the variables changes as their values change. Pearson's r is only appropriate for linear relationships, so it does not represent a curvilinear relationship well.
Outlier
A value an abnormal distance from the other values. Outliers can make a huge difference to r (e.g., one outlier can make r much smaller).
How should you decide whether to keep an outlier?
Consider whether it is a real individual or a data entry or measurement error. It is an important decision.
Restricted range
When one or both variables have low variance or a limited range of scores. This limits the ability to detect a correlation (if everyone scores the same on one variable, r = 0).
Examples of restricted range
IQ and happiness in a sample of university students; internet use and anxiety in a sample of older adults; heroin use and depression when most of the sample has never taken heroin.
Correlational fallacy
Assuming that because two variables are highly correlated, one is responsible for variation in the other. Correlation does not imply causation.
Why can't a correlation between alcohol use and aggressiveness show that alcohol causes aggressiveness?
Correlation does not imply causation: the direction could be reversed (aggressive people may drink more), or a third variable could be responsible for both.
Which test: one continuous IV and a continuous DV?
Pearson's r correlation (from the decision flowchart).
Which test is the nonparametric alternative to Pearson's r?
Kendall's tau (from the nonparametric column of the decision flowchart). The jamovi correlation dialog also offers Spearman and Kendall's tau-b.
Examples of research questions suited to correlation (lecture examples)
Is attitude related to swimming performance? Is intelligence related to brain size? Does return to work after injury get slower as we get older? Does driving ability decrease with cocaine consumption? Are people with higher incomes more likely to visit the dentist? Do gender roles become more concrete with age?
Examples of using correlation for prediction (lecture examples)
Predicting how fast someone can run from their leg length; how likely someone is to develop depression from their number of close friends; how well someone will recover from surgery from their general health. A strong relationship gives accurate predictions; a weak one gives poorer predictions.
Lecture example study: perceived crime and actual crime
Perceived crime = participants' rating of crime in their neighbourhood (1 low to 10 high). Actual crime = the area's reported crime rate per 1000 people (Office of Crime Statistics and Research). The question is whether perceived level of crime is related to actual level of crime. Based on the Baldock et al. article on gender-specific associations between perceived and objective neighbourhood crime and metabolic syndrome.
Hemphill strength classification (used in the crime study)
The article classified r as small if r < 0.2, medium if 0.2 to 0.3, and large if r > 0.3. These cut-offs differ from the lecture's guideline table, and both are only rough guides.
Pets and friends example: hypotheses and data
Five people reported their number of pets and number of close friends. H0: There is no correlation between number of pets and number of friends. H1: There is a correlation between number of pets and number of friends. N = 5, so df = 3.
How do you run Pearson's r in jamovi?
Enter each variable in its own column (one row per person) and check a scatterplot first for linearity and outliers. Then use Analyses > Regression > Correlation Matrix, move both variables into the box, tick Pearson and Report significance, leave Hypothesis as Correlated (the two-tailed option, matching H1: r ≠ 0), and read r and the p-value from the output table (pets and friends: r = .943, p = .016).
MS and vitamin D example (news article)
People living further from the equator have a higher risk of multiple sclerosis (people in Tasmania are about 10 times more likely to develop MS than people in the Northern Territory). Vitamin D was suspected as the cause, so a clinical trial was started to test it. It illustrates that a pattern in correlational data still needs testing before concluding cause.
Example r values on the lecture's scatterplot series
r = 1: perfect positive; r = 0.9: high positive; r = 0.5: low positive; r = 0: no correlation; r = -0.5: low negative; r = -0.9: high negative; r = -1: perfect negative.
Example data: perceived crime and actual crime (8 participants)
(Perceived crime, actual crime per 1000) = (9, 172), (2, 112), (4, 132), (6, 163), (3, 139), (5, 170), (6, 139), (7, 157). The scatterplot shows a positive relationship: higher perceived crime goes with higher actual crime. N = 8, so df = 6, and r = .79. The lecture's write-up gives p = .015, but recomputing from these eight pairs gives p of about .019 (still below .05).
Example data: number of pets and number of close friends (5 people)
(Pets, friends) = (3, 5), (2, 3), (2, 4), (4, 7), (1, 3). N = 5, so df = 3, and r = .943, p = .016 (reject H0).
Curvilinear relationship example (lecture)
Perceived crime rises as actual crime goes up, but when actual crime gets very high perceived crime goes down again. The association changes with the values, so this curvilinear pattern would not be well represented by Pearson's r.
Scatterplot: changing the scale or the axes (lecture)
The lecture redraws the same perceived and actual crime data with a different y-axis scale and with the two variables on swapped axes. The plot looks different but shows the same pairs of scores and the same relationship.
How do you make a prediction from a scatterplot (lecture diagram)?
Draw the line through the points, find the person's score on one variable on its axis, go up (or across) to the line, then read across (or down) to the predicted score on the other variable. The closer the points are to the line, the more accurate the prediction.
Crime study: how were perceived and objective crime measured?
Perceived crime: six items from the Australian version of the Neighbourhood Environment Walkability Scale (NEWS-AU), combined into a standardised factor score (higher = higher perceived crime). Objective crime: reported crime rates per 1,000 persons for each Statistical Local Area, from the South Australian Office of Crime Statistics and Research, as violent crime, property crime and total crime.
Crime study: analysis and findings
Analyses were stratified by gender with alpha = 0.05. Differences between men and women on sample characteristics were tested with chi-square tests, independent samples t-tests and Wilcoxon-Mann-Whitney tests (for non-normally distributed data). Pearson correlations were used to assess correspondence between perceived and area-level reported crime. For men, correspondence between perceived and objective crime was limited (small to moderate). For women it was greater (moderate to large). For both men and women the strongest correlation was between perceived crime and objectively measured violent crime.