I came across the formula for the Pearson Correlation but it gives values between -1 and 1. How would I modify the formula so that it gives values between 0 and 1?
Asked
Active
Viewed 2,498 times
4
-
Add 1 and divide by 2 perhaps? – Roger Rowland Jun 25 '14 at 14:12
-
Thank you Roger! I think that will work! – covfefe Jun 27 '14 at 14:38
1 Answers
4
To normalize any set of numbers to be between 0 and 1, subtract the minimum and divide by the range.
In your case the min is -1 and the range is 2, so if a value in your set is -0.5, that value becomes:
(-0.5 - (-1)) / 2
= 0.25

Neil McGuigan
- 46,580
- 12
- 123
- 152
-
Does it make a difference whether you subtract the min and divide by range as opposed to adding 1 and dividing by 2? – covfefe Jul 09 '14 at 14:31
-
2@user3004041 Well the former works in all cases, and the latter works in this specific case. – Neil McGuigan Jul 09 '14 at 15:26