Download presentation
Presentation is loading. Please wait.
Published byGodwin Howard Modified over 9 years ago
1
Data analysis – Spearman’s Rank 1.Know what Spearman’s rank is and how to use it 2.Be able to produce a Spearman’s rank correlation graph for your results.
2
The Spearman's Rank Correlation Coefficient is used to discover the strength of a link between two sets of data.
3
This example looks at the strength of the link between the price of a convenience item (a 50cl bottle of water) and distance from the Contemporary Art Museum in El Ravel, Barcelona
4
The scatter graph shows the possibility of a negative correlation between the two variables. The Spearman's rank correlation technique should be used to see if there is indeed a correlation, and to test the strength of the relationship.
5
Spearman’s Rank correlation coefficient A correlation can easily be drawn as a scatter graph, but the most precise way to compare several pairs of data is to use a statistical test - this establishes whether the correlation is really significant or if it could have been the result of chance alone. Spearman’s Rank correlation coefficient is a technique which can be used to summarise the strength and direction (negative or positive) of a relationship between two variables. The result will always be between 1 and minus 1.
6
Example hypothesis: the further away from Upper Bath Street the fewer pedestrians there will be. DistanceNo. of pedestrians Rank DistanceRank pedestrians Difference (d) Difference (d²) 01317116256 20816214196 40615312144 60514410100 803135864 1001129.52.56.25 1201119.51.52.25 1401109.50.50.25 160199.5-0.50.25 18028624 200179.5-2.56.25 2200615-981 2400515-10100 2600415-11121 2800315-12144 300129.5-7.556.25 3200115-14196 Total1477.5
7
Method - calculating the coefficient Distance from Upper Bath Street No. of pedestrians Rank Distance Rank pedestrians Difference (d) Difference (d²) 1. Log all your data2. Rank all your data 3. Minus the second data set from the first and then square your results 4. Carry out the Spearman’s Rank correlation co-efficient, as per the formula Ranking is achieved by giving the ranking '1' to the biggest number in a column, '2' to the second biggest value and so on. The smallest value in the column will get the lowest ranking. This should be done for both sets of measurements.
8
Tied scores are given the mean (average) rank. For example, the three tied scores of 1 Euro in the example below are ranked fifth in order of price, but occupy three positions (fifth, sixth and seventh) in a ranking hierarchy of ten. The mean rank in this case is calculated as (5+6+7) ÷ 3 = 6.
9
Convenience Store Distance from CAM (m) RankPrice of 50cl bottle (€) RankDifference between the ranks (d) d² 150101.802 217591.203.5 327082.001 437571.006 542561.006 658051.203.5 771040.809 879030.6010 989021.006 1098010.858 d² =
10
Write a hypothesis and rank the data here.
11
Find the difference in the ranks (d): This is the difference between the ranks of the two values on each row of the table. The rank of the second value (price) is subtracted from the rank of the first (distance from the museum).
12
Convenience Store Distance from CAM (m) Ran k Price of 50cl bottle (€) RankDifference between the ranks (d) d² 150101.8028 217591.203.55.5 327082.0017 437571.0061 542561.0060 658051.203.51.5 771040.809-5 879030.6010-7 989021.006-4 1098010.858-7 d² =
13
Square the differences (d²) to remove negative values.
14
Convenience Store Distance from CAM (m) RankPrice of 50cl bottle (€) RankDifference between the ranks (d) d² 150101.802864 217591.203.55.530.25 327082.001749 437571.00611 542561.00600 658051.203.51.52.25 771040.809-525 879030.6010-749 989021.006-416 1098010.858-749 d² =
15
and then sum them ( d²).
16
Convenience Store Distance from CAM (m) Ran k Price of 50cl bottle (€) RankDifference between the ranks (d) d² 150101.802864 217591.203.55.530.25 327082.001749 437571.00611 542561.00600 658051.203.51.52.25 771040.809-525 879030.6010-749 989021.006-416 1098010.858-749 d² = 285.5
17
When written in mathematical notation the Spearman Rank formula looks like this :
18
Calculate the coefficient (r²) using the formula below. The answer will always be between 1.0 (a perfect positive correlation) and -1.0 (a perfect negative correlation).
19
Find the value of all the d² values by adding up all the values in the Difference² column. In our example this is 285.5. Multiplying this by 6 gives 1713.
20
The value n is the number of sites at which you took measurements. This, in our example is 10. Substituting these values into n³ - n we get 1000 - 10
21
We now have the formula: 1713 990
22
which gives; 1.73
23
a value for R² - 0.73
24
What does this R² value of -0.73 mean? The closer r is to +1 or -1, the stronger the likely correlation. A perfect positive correlation is +1 and a perfect negative correlation is -1. The R² value of -0.73 suggests a fairly strong negative relationship.
25
A further technique is now required to test the significance of the relationship.
27
Work out the 'degrees of freedom' you need to use. This is the number of pairs in your sample minus 2 (n-2). In the example it is 8 (10 - 2). Now plot your result on the table.
28
If it is below the line marked 5%, then it is possible your result was the product of chance and you must reject the hypothesis.
29
If it is above the 0.1% significance level, then we can be 99.9% confident the correlation has not occurred by chance.
30
If it is above 1%, but below 0.1%, you can say you are 99% confident.
31
If it is above 5%, but below 1%, you can say you are 95% confident (i.e. statistically there is a 5% likelihood the result occurred by chance).
32
In the example, the value 0.73 gives a significance level of slightly less than 5%. That means that the probability of the relationship you have found being a chance event is about 5 in a 100. You are 95% certain that your hypothesis is correct.
33
The fact two variables correlate cannot prove anything - only further research can actually prove that one thing affects the other. Data reliability is related to the size of the sample. The more data you collect, the more reliable your result.
34
Your IA You will now need to create a new hypothesis to include within the results section of your IA to show how 2 pieces of data might be linked. Which ones would you expect there to be a correlation with?
35
Example of student’s work…
38
Your IA I cannot help you do the Spearman’s Correlation calculations on your own data set. There are the handouts and the notes you have from today’s lesson…if you follow these closely you should be able to work it out.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.