I played around and found even more strange results: a *correlation coefficient* of -1.64, this is *VERY ERRONEOUS* and should definitely be corrected. Calc fails really badly.

There is a good comment on Wikipedia, see http://en.wikipedia.org/wiki/Correlation explaining why *some formulas are notorious for [their] numerical instability*.

The formula I would recommend is the standard calculation:
rxy = SUM [(Xi - Xmean) * (Yi -Y mean)] / [(n-1)*Sx*Sy]

To increase the accuracy even further, one can:
- [sort Xi and Yi, when calculating the means -- see my previous posts]
- calculate first the values: (Xi - Xmean) * (Yi -Y mean)
- sort this values (as their absolute value) in ascending order
- calculate the sum
- calculate r

Kind regards,

Leonard Mada


P.S. appended Test Case

Attachment: Calc-Test-Sheet-CORREL.ods
Description: application/vnd.oasis.opendocument.spreadsheet

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to