MT LESSON 8

📚 MT-LESSON-8.pdf

Brief overview

This document details statistical methods for measuring the association between variables. Understanding correlation is essential for identifying relationships and making inferences in data analysis.

Key points

  • Introduction to correlation coefficients and the characteristics of relationships.
  • Spearman rank-order correlation and its application.
  • Point biserial and phi coefficients for dichotomous variables.
  • Utilizing scatterplots for visualization and assumption checking.
  • Reporting correlation results in APA format.

1. Introduction to correlation

1.1 Correlation: measuring association

  • Correlation: a statistical technique measuring the strength and direction of a linear association between two variables.
  • It quantifies how strongly two variables are related.
  • Variables are studied as they naturally exist, without manipulation.
  • An example is examining the relationship between a student's grades and their economic status.

📝 Example: The relationship between daily allowance (X) and Grade Point Average (Y).

1.2 Types of correlation coefficients

Correlation coefficients vary based on the type of data scales used for the variables.

Correlation Coefficient TypeVariable Scales
Pearson Product MomentBoth interval or ratio
Spearman Rank-OrderBoth ordinal
PhiBoth naturally dichotomous
Point BiserialOne dichotomous, one interval or ratio

1.3 Direction of relationships

The sign of the correlation coefficient indicates the direction of the relationship.

  • Positive relationship: Both variables increase or decrease together. This is also known as direct correlation.
  • Negative relationship: As one variable increases, the other decreases. This is also known as an inverse relationship.

📝 Example: As study hours increase (X), exam scores increase (Y) - positive. As hours spent on social media increase (X), exam scores decrease (Y) - negative.

1.4 Magnitude of correlation

Correlation coefficients range from +1 to -1.

  • A coefficient of +1 indicates a perfect positive linear relationship.
  • A coefficient of -1 indicates a perfect negative linear relationship.
  • A coefficient of 0 indicates no linear relationship.
Correlation CoefficientDescriptive Meaning
Exactly +1Perfect uphill (positive) linear relationship
+0.70 to +0.99Strong uphill (positive) linear relationship
+0.50 to +0.69Moderate uphill (positive) linear relationship
+0.30 to +0.49Weak uphill (positive) linear relationship
0No linear relationship
-0.30 to -0.49Weak downhill (negative) linear relationship
-0.50 to -0.69Moderate downhill (negative) linear relationship
-0.70 to -0.99Strong downhill (negative) linear relationship
Exactly -1Perfect downhill (negative) linear relationship

🔑 Important: Values greater than 1 or less than -1 indicate a calculation error.

1.5 Pearson product-moment correlation (r)

  • Pearson product-moment correlation (r): A common index for the relationship between two variables measured on interval or ratio scales.
  • Its value ranges from +1 to -1.

The formula for Pearson's r is: r=n∑xy−(∑x)(∑y)[n∑x2−(∑x)2][n∑y2−(∑y)2]r = \frac{n \sum xy - (\sum x)(\sum y)}{\sqrt{[n \sum x^2 - (\sum x)^2][n \sum y^2 - (\sum y)^2]}}

Where:

  • rr = Pearson correlation coefficient
  • nn = sample size
  • ∑xy\sum xy = sum of the product of x and y
  • (∑x)(∑y)(\sum x)(\sum y) = product of the sum of x and sum of y
  • ∑x2\sum x^2 = sum of the squares of x
  • ∑y2\sum y^2 = sum of the squares of y

1.5.1 Manual computation steps

  1. Count the number of observations (nn).
  2. Calculate the sum of xx (∑x\sum x).
  3. Square each xx value (x2x^2) and compute the sum of squares (∑x2\sum x^2).
  4. Calculate the sum of yy (∑y\sum y).
  5. Square each yy value (y2y^2) and compute the sum of squares (∑y2\sum y^2).
  6. Calculate the product of xx and yy (xyxy) for each pair and compute the sum of products (∑xy\sum xy).
  7. Apply the formula for rr.

📝 Example: Calculating rr for daily allowance (x) and GPA (y) yields r=0.90r = 0.90, indicating a strong positive linear relationship.

1.5.2 Pearson correlation in MS Excel

  • Excel's =PEARSON(array1, array2) function directly calculates the correlation coefficient.
  • To determine statistical significance, you can convert rr to a tt-statistic and then find the pp-value.

The formula to convert rr to a tt-statistic is: t=rn−21−r2t = \frac{r\sqrt{n-2}}{\sqrt{1-r^2}}

The pp-value can be found using the =TDIST(x, deg_freedom, tails) function in Excel.

  • x: the calculated tt-statistic.
  • deg_freedom: degrees of freedom (n−2n-2).
  • tails: 1 for one-tailed, 2 for two-tailed analysis.

🔑 Important: Use the absolute value of rr in the tt-statistic formula if rr is negative to avoid errors.

1.6 Pearson correlation in SPSS

SPSS provides a straightforward procedure for bivariate Pearson correlations.

1.6.1 Assumptions for Pearson correlation

  • Interval or ratio variables: Both variables must be continuous.
  • Linear relationship: A scatterplot should visually confirm a linear trend between variables.
  • No significant outliers: Extreme data points can distort results. SPSS can help detect and manage outliers.
  • Approximately normal distribution: Variables should be roughly normally distributed for statistical significance testing.

🔑 Important: Failure to meet these assumptions can invalidate correlation results. SPSS offers tools to test these assumptions, including Shapiro-Wilk tests for normality and boxplots for outliers.

1.6.2 Running a Pearson correlation in SPSS

  1. Navigate to Analyze > Correlate > Bivariate.
  2. Select the variables to be analyzed and move them to the Variables field.
  3. Ensure Pearson is selected under Correlation Coefficients.
  4. Choose Two-tailed or One-tailed for the test of significance.
  5. Optionally, check Flag significant correlations to mark significance levels in the output.
  6. Click Options to specify additional statistics or handle missing values (e.g., pairwise or listwise exclusion).

The output will include a Correlations table showing the correlation coefficient (rr), pp-value, and sample size (nn) for each pair of variables.

🔑 Important: Always interpret the pp-value in conjunction with the correlation coefficient (rr) to understand both the statistical significance and the strength/direction of the relationship. 🔑 Important: Correlation indicates association, not causation. A significant correlation between two variables does not mean one causes the other.

2. Spearman rank-order correlation

2.1 Introduction to Spearman correlation

Spearman's rank-order correlation coefficient, denoted as rsr_s, measures the strength and direction of association between two variables. It is a nonparametric test.

  • Use cases:

    • Ordinal variables.
    • Continuous data that fails Pearson correlation assumptions.
  • Formula: rs=1−6∑D2n(n2−1)r_s = 1 - \frac{6 \sum D^2}{n(n^2 - 1)}

    • rsr_s: The correlation coefficient.
    • ∑D2\sum D^2: Sum of squared differences between ranks of x and y.
    • nn: Number of observations.

2.2 Computing Spearman's rho by hand

Calculating Spearman's rho involves ranking data and then applying the formula.

  • Steps:
    1. Rank data for the first variable (x) from highest to lowest.
    2. Rank data for the second variable (y) from highest to lowest.
    3. Compute the difference (DD) between the ranks for each pair.
    4. Square each difference (D2D^2).
    5. Sum the squared differences (∑D2\sum D^2).
    6. Determine the number of observations (nn).
    7. Apply the Spearman correlation formula.

Example Calculation: For 10 students, ranks for English (x) and Maths (y) showed ∑D2=88\sum D^2 = 88.

rs=1−6×8810(102−1)=1−528990=1−0.53=0.47r_s = 1 - \frac{6 \times 88}{10(10^2 - 1)} = 1 - \frac{528}{990} = 1 - 0.53 = 0.47 This indicates a weak positive linear relationship.

2.3 Spearman correlation in Excel

Excel does not have a direct function for Spearman's rho. However, you can compute it using existing functions.

  • Procedure:
    1. Rank Data: Use the RANK.AVG function for each variable to assign ranks. For example, to rank data in cell B2 within the range B2:B11 with no ties broken: =RANK.AVG(B2,$B$2:$B$11,0). Ensure you use absolute cell references (USD) for the range.
    2. Calculate Correlation: Use the CORREL function on the ranked data. For instance, if ranks for variable 1 are in D2:D11 and for variable 2 in E2:E11, use =CORREL(D2:D11, E2:E11).

Example Result: Using physical activity and blood pressure data, Excel's CORREL function on ranks yielded -0.7576. This suggests a strong negative correlation.

2.4 Assumptions for Spearman correlation

For valid results, Spearman's correlation requires data to meet specific assumptions.

  • Variable Measurement:

    • Variables should be ordinal, interval, or ratio scale.
    • Examples: Likert scales (ordinal), revision time in hours (interval/ratio).
  • Paired Observations:

    • Data must consist of paired observations.
    • Each pair represents scores for the same participant on both variables.
  • Monotonic Relationship:

    • A monotonic relationship exists when variables consistently increase or decrease together.
    • Visually check this using a scatterplot in software like SPSS.

Important: Monotonicity is key. While Spearman's correlation measures the degree of this relationship, if the relationship is clearly not monotonic, other statistical measures might be more appropriate.

2.5 Spearman correlation in SPSS

SPSS provides a straightforward way to compute Spearman's rank-order correlation.

  • Procedure:

    1. Navigate to Analyze > Correlate > Bivariate... in the SPSS menu.
    2. Transfer the two variables of interest into the Variables: box.
    3. In the Correlation Coefficients area, uncheck Pearson and check Spearman.
    4. Click OK to generate the output.
  • Output Interpretation:

    • SPSS provides a correlation matrix showing Spearman's rho (rsr_s), its significance value (p-value), and the sample size (nn).
    • A statistically significant correlation (typically p<0.05p < 0.05) suggests a genuine association.

Example Reporting: A Spearman's correlation analysis revealed a strong, positive, and statistically significant correlation between English and maths marks (rs=0.669,p=0.035r_s = 0.669, p = 0.035) 8.

Important: Spearman's correlation is robust to non-normally distributed data and is less sensitive to outliers compared to Pearson's correlation.

3. Point biserial and phi coefficient

3.1 Point biserial correlation coefficient

The point biserial correlation coefficient (rpbir_{pbi}) measures the relationship between a continuous variable and a dichotomous variable. It ranges from -1 to +1, similar to Pearson's r.

To calculate rpbir_{pbi}, the dichotomous variable is coded numerically, typically as 0 and 1. The standard Pearson correlation formula is then used.

The interpretation of rpbir_{pbi} is similar to Pearson's r.

The formula for the point biserial correlation coefficient is: rpbi=n∑xy−(∑x)(∑y)[n∑x2−(∑x)2][n∑y2−(∑y)2]r_{pbi} = \frac{n \sum xy - (\sum x)(\sum y)}{\sqrt{[n \sum x^2 - (\sum x)^2][n \sum y^2 - (\sum y)^2]}}

Where:

  • nn is the sample size.
  • ∑xy\sum xy is the sum of the products of the two variables.
  • ∑x\sum x and ∑y\sum y are the sums of each variable.
  • ∑x2\sum x^2 and ∑y2\sum y^2 are the sums of the squared values of each variable.

3.1.1 Example calculation

Consider data on gender (0=female, 1=male) and IQ score:

ParticipantGender (x)IQ (y)x2x^2y2y^2xy
A1861739686
B1871756987
C1911828191
D1971940997
E1981960498
F1991980199
G085072250
H079062410
I083068890
J086073960
K081065610
L092084840
  • n=12n = 12
  • ∑x=6\sum x = 6
  • ∑y=1064\sum y = 1064
  • ∑x2=6\sum x^2 = 6
  • ∑y2=94836\sum y^2 = 94836
  • ∑xy=558\sum xy = 558

rpbi=12−[12−2][12−2]r_{pbi} = \frac{12 - }{\sqrt{[12 - ^2][12 - ^2]}} . rpbi=6696−6384[72−36][1138032−1132096]r_{pbi} = \frac{6696 - 6384}{\sqrt{[72 - 36][1138032 - 1132096]}} rpbi=312=312462.27≈0.67r_{pbi} = \frac{312}{\sqrt{ }} = \frac{312}{462.27} \approx 0.67 36 .

A computed value of 0.67 suggests a moderate positive relationship between IQ and gender 33.

3.1.2 Using statistical software

  • Excel: The =CORREL() function can be used directly on the numerically coded dichotomous variable and the continuous variable 34.
  • SPSS: The point biserial correlation is a special case of the Pearson's product-moment correlation, calculated via the "Correlate > Bivariate" menu. 39-41

3.1.3 Assumptions for point biserial correlation

For a valid result, the following assumptions should be met:

Assumption #RequirementExample
1One variable is continuous.Revision time (hours), IQ score.
2The other variable is dichotomous.Gender (male/female), smoker (yes/no).
3No outliers in the continuous variable for each group.Use boxplots to check for outliers in males and females separately.
4Continuous variable is approximately normally distributed.Check using Shapiro-Wilk test, skewness/kurtosis, histograms, or Q-Q plots.
5Continuous variable has equal variances for each group.Test using Levene's test of equality of variances.

If assumptions #3, #4, or #5 are violated, the interpretation of the point-biserial correlation may not be valid. 36-38

3.2 Phi coefficient

The phi coefficient (ϕ\phi) measures the association between two binary (dichotomous) variables. It is used when both variables are nominal and have only two categories.

Data is typically presented in a 2×22 \times 2 contingency table.

3.2.1 Interpretation of Phi coefficient

The interpretation of the phi coefficient is similar to Pearson's r:

RangeAssociation
-1.0 to -0.7Strong negative association
-0.7 to -0.3Weak negative association
-0.3 to +0.3Little or no association
+0.3 to +0.7Weak positive association
+0.7 to +1.0Strong positive association

3.2.2 Formula and calculation

The formula for the phi coefficient is: ϕ=ad−bcefgh\phi = \frac{ad - bc}{\sqrt{efgh}}

Where the contingency table is coded as:

Variable Y=0Variable Y=1Total
Variable X=1ACE
Variable X=0BDF
TotalGHN
  • a,b,c,da, b, c, d are the frequencies in the 2×22 \times 2 table cells.
  • e,f,g,he, f, g, h are the row and column totals used in the denominator.

Example 1: Gender and Position

Position/GenderFemaleMaleTotal
Staff20 (A)12 (C)32 (E)
Faculty13 (B)18 (D)31 (F)
Total33 (G)30 (H)63 (N)

Here, a=20,b=13,c=12,d=18a=20, b=13, c=12, d=18. e=32,f=31,g=33,h=30e=32, f=31, g=33, h=30.

ϕ=(20×18)−(12×13)32×31×33×30\phi = \frac{(20 \times 18) - (12 \times 13)}{\sqrt{32 \times 31 \times 33 \times 30}} ϕ=360−156982080=204990.99≈0.21\phi = \frac{360 - 156}{\sqrt{982080}} = \frac{204}{990.99} \approx 0.21 This indicates little or no association. 42-43

Example 2: Age and Position

Position/AgeAdultAdolescentTotal
Student30 (A)45 (B)75 (E)
Faculty 122 (C)38 (D)60 (F)
Total52 (G)83 (H)135 (N)

Here, a=30,b=45,c=22,d=38a=30, b=45, c=22, d=38. e=75,f=60,g=52,h=83e=75, f=60, g=52, h=83.

ϕ=(30×38)−(45×22)75×60×52×83\phi = \frac{(30 \times 38) - (45 \times 22)}{\sqrt{75 \times 60 \times 52 \times 83}} ϕ=1140−99019,422,000=1504,407.04≈0.03\phi = \frac{1140 - 990}{\sqrt{19,422,000}} = \frac{150}{4,407.04} \approx 0.03 This also indicates little or no association. 43-44

The phi coefficient is for two binary variables, while the point biserial coefficient is for one binary and one continuous variable.

🔑 Important: Both point biserial and phi coefficients help understand the strength and direction of relationships between variables, with specific use cases depending on the measurement scales of the variables involved 44.

4. Scatterplots and reporting correlations

4.1 Creating scatterplots in SPSS

A scatterplot is useful for several reasons. It helps determine if a relationship between two variables is linear.

It also allows for the detection of outliers. Finally, it visually presents the relationship between two continuous variables.

This is important for assumptions in statistical tests like Pearson correlation and linear regression 45.

To create a scatterplot in SPSS Statistics:

  • Navigate to Graphs > Chart Builder....
  • In the Choose from: box, select "Scatter/Dot".
  • Drag the "Simple Scatter" option into the chart preview pane.
  • Drag your independent variable to the "X-Axis?" box and your dependent variable to the "Y-Axis?" box 47.

🔑 Important: The chart preview in the Chart Builder does not show your actual data. The true plot appears only after generating the scatterplot 48.

You can adjust the scale of the axes in the Element Properties dialogue box. For example, you can set a minimum value for the Y-axis to ensure a suitable range of values is displayed for your data 49 50.

4.2 Reporting correlation results

When reporting correlations, especially in APA format, a table is standard. This table should include key statistics about the variables and the correlation itself.

Here's a breakdown of how to report Pearson correlation results:

  • M: Mean of the variable.
  • SD: Standard deviation of the variable.
  • rr: The Pearson correlation coefficient. This indicates the strength and direction of the linear relationship.
  • pp: The p-value, indicating statistical significance.
  • Decision: The statistical decision regarding the null hypothesis (e.g., Reject H₀).

📝 Example: A correlation coefficient (rr) of.789 suggests a moderate to strong positive association. A p-value of.001 (p <.001) indicates that this relationship is statistically significant at the 0.05 level (2-tailed).

🔑 Important: Always interpret the direction and strength of the correlation in the context of your research question, and clearly state the significance level 51.

© 2026 Maeve. All rights reserved. This content is protected by copyright.

See also