<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_UNCONFIRMED "
title="UNCONFIRMED - LINEST() wrong order of arguments (X and Y ranges are switched). Calc UI"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=139862">139862</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>LINEST() wrong order of arguments (X and Y ranges are switched). Calc UI
</td>
</tr>
<tr>
<th>Product</th>
<td>LibreOffice
</td>
</tr>
<tr>
<th>Version</th>
<td>7.0.4.2 release
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux (All)
</td>
</tr>
<tr>
<th>Status</th>
<td>UNCONFIRMED
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>Calc
</td>
</tr>
<tr>
<th>Assignee</th>
<td>libreoffice-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>jmsmarti@gmail.com
</td>
</tr></table>
<p>
<div>
<pre>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</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>