views:

401

answers:

1

Can someone recommend a good statistics library for Java - it must include the ability to calculate the correlation of two data sets.

I have been trying to compute the correlation of two ArrayLists - for some reason I am getting an incorrect answer (checked in Excel) despite what seems to be sound logic.

I found one at jfree.org which provides a single class called Statistics which includes what I need for now. But if you know of others, please let me know as I'd rather use the best option from the start, rather than changing the code later.

+7  A: 

I suggest you use Apache Commons Math library. It has a correlation package.

Aziz
Just wondering, have you used this. The docs suggest that the Correlation class exists, however when I import the .jar it does not resolve and looking at the source I can't see a correlation class anywhere?
Ankur
the correlation package is added to version 2.0. Make sure your download the correct version :)
Aziz
I think you should use SVN to get version 2.0 (couldn't find download links on the website)
Aziz