Docsity

Computing a Pearson r - Lecture Notes | PSYCH 317, Study notes of Psychology

Toggle sidebar
bg1
SAMLab Tip Sheet #7
Computing a Pearson r
In this Tip Sheet, you will learn how to calculate a Pearson r. To better understand the factors that affect the
sign and magnitude of r, we will calculate r using the definitional formula shown below and then we will look at
Excel’s paste functions for computing r. Input the data below and calculate the deviation scores as shown.
𝑟= 𝑥 − 𝑥 (𝑦 − 𝑦)/𝑁
𝑆𝑥𝑆𝑦
Next we are going to create the covariance, which is the numerator of our definitional equation above. The
covariance is actually just the average cross-product. To calculate the covariance, create a column of cross-
products (labeled (X – X)(Y – Y) below), sum them, and divide by N.
Note that the
descriptive
standard
deviation is
used. For help
creating
deviation
scores, see
page 6 of Tip
Sheet #2, and
for more
information on
standard
deviations, see
Tip Sheet #6.
The data (fictitious)
in this example
represent the
number of college
credits a student has
earned (X) and the
student’s score on a
metric of test
anxiety (Y)
administered before
the final exam
period.
A cross-product
is the product of
paired deviation
scores. The
average of a group
of cross-products
is the covariance.
Looking at the
formula above, you
can see that only the
numerator
(covariance) affects
the sign of r. Also,
note that because
deviation scores are
multiplied together,
those data points that
deviate greatly from
one or both of the
means can have a
large impact on the
magnitude of r.
pf3
pf4

Partial preview of the text

Download Computing a Pearson r - Lecture Notes | PSYCH 317 and more Study notes Psychology in PDF only on Docsity!

Computing a Pearson r

In this Tip Sheet, you will learn how to calculate a Pearson r. To better understand the factors that affect the sign and magnitude of r, we will calculate r using the definitional formula shown below and then we will look at Excel’s paste functions for computing r. Input the data below and calculate the deviation scores as shown.

Next we are going to create the covariance , which is the numerator of our definitional equation above. The covariance is actually just the average cross-product. To calculate the covariance, create a column of cross- products (labeled (X – X)(Y – Y) below), sum them, and divide by N.

Note that the descriptive standard deviation is used. For help creating deviation scores, see page 6 of Tip Sheet #2, and for more information on standard deviations, see Tip Sheet #6.

The data (fictitious) in this example represent the number of college credits a student has earned ( X ) and the student’s score on a metric of test anxiety ( Y ) administered before the final exam period.

A cross-product is the product of paired deviation scores. The average of a group of cross-products is the covariance.

Looking at the formula above, you can see that only the numerator (covariance) affects the sign of r. Also, note that because deviation scores are multiplied together, those data points that deviate greatly from one or both of the means can have a large impact on the magnitude of r.

The next step is to compute the Pearson r. Divide the covariance by the product of the two standard deviations. Note that the formula used to compute r is displayed in the formula bar.

Using the Paste Functions

There are two paste functions that will calculate a Pearson r for you when given only the raw data. They are CORREL and PEARSON. We will use CORREL because it uses the definitional formula to compute r. PEARSON will usually work fine; however, if you are trying to find correlations for very large numbers PEARSON may return a value containing significant rounding errors because it uses a different formula, which is often referred to as the computational or calculator formula. The use of CORREL is illustrated below.

In the image below you can see that PEARSON gives the same answer in this case.