Created attachment 114432 [details] l.o. archive with linear regression formula bug sample Within the attached file, when one creates the graph and request the linear regression formula for it, the print: f(x)=4,141x+11,67 R2=0,9686 is wrong. Chekc the green sections of the spreadsheet. They are correct. Thanks for your time and a great product!
I have tested the appearance of this bug on version 4.2.5 and newer of LibreOffice. Also appears on last version of OpenOffice.
Created attachment 114433 [details] Sample file modified. Hi @Gustavo, thanks for reporting. Selecting XY type for the chart, it shows the correct linear regression formula. Resolved as notabug, please if you are not agree reopen it.
Please @Gustavo, answer here, it's the place, this is an open project, no secrets, the matter is when possible solve the issues. Where there is not selected as XY, chart then uses the position for every value, in your sample, replacing D2:D5 with 1 2 3 4, you can see how the cell formulas and chart are the same. I think this was discussed some time ago, but I can't find it. Maybe actual form it's useful for some purposes, and change a behaviour that can affect what some users are doing, don't be done without a discussion. Please if you like send a new report selecting in the severity as enhancement asking for you want to be changed.