I want to implement the Simple Regression model from the apache math library.
I implemented:
regression = new SimpleRegression();
for (int l = 0; l < xList.size(); l++) {
regression.addData(Double.parseDouble(xList.get(l).replace(',', '.')), yList.get(l));
}
regression.getIntercept();
regression.getSlope();
regression.getRSquare();
Compared to a simple google spreadsheet to check my results:
I get completely different results. Here you can also see the image:

Would I appreciate any recommendations to resolve this issue?
UPDATE
I know that statistically these data are not valuable (for example, see R^2). However, I want to find out what is wrong with the calculation, and not with some statistical properties!
I use:
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-math3</artifactId>
<version>3.0</version>
</dependency>
I appreciate every idea!