[Libreoffice-bugs] [Bug 139862] New: LINEST() wrong order of arguments (X and Y ranges are switched). Calc UI

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sat Jan 23 15:36:33 UTC 2021


https://bugs.documentfoundation.org/show_bug.cgi?id=139862

            Bug ID: 139862
           Summary: LINEST() wrong order of arguments (X and Y ranges are
                    switched). Calc UI
           Product: LibreOffice
           Version: 7.0.4.2 release
          Hardware: All
                OS: Linux (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Calc
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: jmsmarti at gmail.com

Description:
It seems that the order of arguments in LINEST() help page is mistaken. The
function calculates correctly everithing ONLY if you switch X and Y ranges.

This happens when the function is entered as an array (Ctrl+Shift+Enter) and
also when the menu option "Data/Statistics/Regression" parameter window is
used.

It came to my attention because I had a plot with a trend line showing the
coefficients and the R2, and used the LINEST() function to copy the numeric
values: they were different from those calculated when addind a trend line to a
plot. But both results were equal if I switched the position of the parameters
X and Y respective to their description of the function in its Help page.

My suggestion: 1. Redact the Help page; 2. Change the labels in the parameters
pop-up window of the menu entry "Data/Statistics/Regression". All calculations
are OK, so these two changes will be enough.

Steps to Reproduce:
1. Create two columns of data to serve as independent and dependent variables
2. Create a scatter plot. Add a trend line, y=mx + b
3. Calculate the regression using function LINEST() entering arguments as
indicated in its Hlp page
4. Compare the results
5. Calculate regression with LINEST() but switching the X and Y ranges
6. Compare with both previous.

Actual Results:
In step 4: coefficients and R2 do not match
In step 6: coefficients and R2 of the second LINEST match those of trend line
in plot

Expected Results:
In step 4: coefficients and R2 SHOULD match.


Reproducible: Always


User Profile Reset: No



Additional Info:
[Information automatically included from LibreOffice]
Locale: en-US
Module: SpreadsheetDocument
[Information guessed from browser]
OS: Linux (All)
OS is 64bit: yes

Version: 7.0.4.2
Build ID: 00(Build:2)
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: kf5
Locale: en-US (pt_PT.UTF-8); UI: en-US
Ubuntu package version: 1:7.0.4~rc2-0ubuntu0.18.04.2
Calc: threaded

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210123/618a6782/attachment-0001.htm>


More information about the Libreoffice-bugs mailing list