SPEARMAN'S RANK
CORRELATION
COEFFICIENT
MIGUEL ANGELO OBOZA CONCIO
CHARLES E. SPEARMAN
• Charles E. Spearman, in full Charles Edward Spearman, (born
September 10, 1863, London, England—died September 17,
1945, London), British psychologist who theorized that a
general factor of intelligence, g, is present in varying degrees
in different human abilities.
WHEN SHOULD WE USE SPEARMAN
CORRELATION?
In a monotonic relationship, the variables tend to change
together, but not necessarily at a constant rate. The Spearman
correlation coefficient is based on the ranked values for each
variable rather than the raw data. Spearman correlation is often
used to evaluate relationships involving ordinal variables.
WHY WOULD YOU USE SPEARMAN'S
RANK?
Spearman's Rank correlation coefficient is a technique
which can be used to summaries the strength and direction
(negative or positive) of a relationship between two variables.
The result will always be between 1 and minus 1. Rank the two
data sets. The smallest value in the column will get the lowest
ranking.
WHAT IS SPEARMAN CORRELATION?
• Spearman Correlation Coefficient is also referred to as
Spearman Rank Correlation or Spearman's rho. It is typically
denoted either with the Greek letter rho (?), or . It is one of the
few cases where a Greek letter denotes a value of a sample and
not the characteristic of the general population. Like all
correlation coefficients, Spearman's rho measures the strength of
association of two variables. As such, the Spearman Correlation
Coefficient is a close sibling to Pearson's Bivariate Correlation
Coefficient, Point Biserial Correlation, and the Canonical
Correlation.
TYPICAL QUESTIONS THE SPEARMAN CORRELATION ANALYSIS ANSWERS ARE AS FOLLOWS:
• Sociology: Do people with a higher level of education have a
stronger opinion of whether or not tax reforms are needed?
• Medicine: Does the number of symptoms a patient has
indicate a higher severity of illness?
• Biology: Is mating choice influenced by body size in bird
species A?
• Business: Are consumers more satisfied with products that are
higher ranked in quality?
MONOTONICITY
Monotonicity is “less restrictive” than that of a linear
relationship. Although monotonicity is not actually a requirement
of Spearman’s correlation, it will not be meaningful to pursue
Spearman’s correlation to determine the strength and direction of
a monotonic relationship if we already know the relationship
between the two variables is not monotonic.
On the other hand if, for example, the relationship appears
linear (assessed via scatterplot) one would run a Pearson’s
correlation because this will measure the strength and direction
of any linear relationship.
Monotonicity
SPEARMAN RANKING OF THE DATA
• We must rank the data under consideration before proceeding
with the Spearman’s Rank Correlation evaluation. This is
necessary because we need to compare whether on increasing
one variable, the other follows a monotonic relation (increases
or decreases regularly) with respect to it or not.
THUS, AT EVERY LEVEL, WE NEED TO COMPARE THE
VALUES OF THE TWO VARIABLES. THE METHOD OF
RANKING ASSIGNS SUCH ‘LEVELS’ TO EACH VALUE
IN THE DATASET SO THAT WE CAN EASILY
COMPARE IT.
• Assign number 1 to n (the number of data points)
corresponding to the variable values in the order highest to
lowest.
• In the case of two or more values being identical, assign to
them the arithmetic mean of the ranks that they would have
otherwise occupied.
• example, Selling Price values given:
For
28.2, 32.8, 19.4, 22.5, 20.0, 22.5
The corresponding ranks are:
2, 1, 5, 3.5, 4, 3.5
The highest value 32.8 is given rank 1, 28.2 is given rank 2, Two
values are identical (22.5) and in this case, the arithmetic means
of ranks that they would have otherwise occupied () has to be
taken.
THE FORMULA FOR SPEARMAN RANK
CORRELATION
Where n is the number of data
points of the two variables and A ρ of +1 indicates a perfect association of
di is the difference in the ranks ranks
of the ith element of each A ρ of zero indicates no association between
random variable considered. ranks and
The Spearman correlation ρ of -1 indicates a perfect negative association
coefficient, ρ, can take values of ranks.
from +1 to -1. The closer ρ is to zero, the weaker the
association between the ranks.
SOLVED EXAMPLES FOR ON SPEARMAN
RANK CORRELATION
Question:
The following table provides data about the percentage of
students who have free university meals and their CGPA scores.
Calculate the Spearman’s Rank Correlation between the two and
interpret if there is a relationship with each other, the result with
alpha= 0.05.
State University % of students having free % of students scoring
meals above 8.5 CGPA
Pune 14.4 54
Chennai 7.2 64
Delhi 27.5 44
Kanpur 33.8 32
Ahmedapad 38.0 37
Indore 15.9 68
Guwahati 4.9 62
Solution: Let us first assign the random variables to the required
data –
X – % of students having free meals
Y – % of students scoring above 8.5 CGPA
Before proceeding with the calculation, we’ll need to assign
ranks to the data corresponding to each state university. We
construct the table for the rank as below
State = Rank = Rank d=(–)
University
LSPU
LSPU 33 44 -1
-1 11
BSU
BSU 22 66 -4
-4 16
16
U.P
U.P 55 33 22 44
PUP 6 1 5 25
PUP 6 1 5 25
UST 7 2 5 25
UST 7 2 5 25
TUP 4 7 -3 9
TUP 4 7 -3 9
LU 1 5 -4 16
LU 1 5 -4 16
Σ = 96
STEP 1: FORMULATE THE NULL AND
ALTERNATIVE HYPOTHESIS
There
• is a significant relationship between the percentage
having a free meal and percentage of student scoring above 8.5
CGPA.
: There is no significant relationship between the percentage
having a free meal and percentage of student scoring above 8.5
CGPA.
STEP 2: SET THE DESIRES LEVEL OF
SIGNIFICANCE
Alpha= 0.05
STEP 3: DETERMINE THE APPROPRIATE
TEST STATISTIC TO BE USE
SPEARMAN'S RANK CORRELATION COEFFICIENT
STEP 4: COMPUTATION
•
STEP 5: COMPUTE FOR THE DEGREE OF
FREEDOM
•
Df= (n-1)
df= (7-2)
df_= 5
1.000
STEP 6: DECISION RULE
• Since the value is less than the 𝑣𝑎𝑙𝑢𝑒, reject 𝑡ℎ𝑒 𝑎𝑙𝑡𝑒𝑟𝑛𝑎𝑡𝑖𝑣𝑒
ℎ𝑦𝑝𝑜𝑡ℎ𝑒𝑠𝑖𝑠 𝑎𝑛𝑑 accept the null hypothesis
STEP 7: CONCLUSION
Since the computed value of is greater than the tabular value,
reject the null hypothesis and accept the alternative hypothesis.
Regardless of sign at 0.05 level of significance. The research
confirms that there is no significant relationship between the
percentage having a free meal and percentage of student scoring
above 8.5 CGPA.
Such a strong negative coefficient of correlation gives away an
important implication – the universities with the highest
percentage of students consuming free meals tend to have the
least successful results (and vice-versa). Similarly, we can solve
all other questions.