Issue 87324 - regression curve with error bars incorrect
Summary: regression curve with error bars incorrect
Status: CONFIRMED
Alias: None
Product: General
Classification: Code
Component: chart (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All All
: P3 Trivial with 3 votes (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-21 23:04 UTC by pmartineau
Modified: 2014-03-02 18:47 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: 4.1.0-dev
Developer Difficulty: ---


Attachments
Comparison of the same fit between OOo and Gnuplot (67.27 KB, application/vnd.oasis.opendocument.graphics)
2008-03-21 23:05 UTC, pmartineau
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description pmartineau 2008-03-21 23:04:15 UTC
Thanks for the new possibility to add custom error bars, this is a fantastic
improvement for the use in Sciences.
However, the current implementation of the regression curve is incorrect when
using error bars.

Usually, error bars are interpreted as the "standard deviation" of the y.
When making a regression, you should minimize Chi^2 = Sum((y-yi)^2/s^2)
where s is the "standard deviation"

Currently, the s parameter is not used. Whatever the values in the error column,
the fit is the same.

I have attached a file with simple data:
X       Y       Error
1	1	0.1
2	1.5	1
3	3.2	O.1

With OOo,      slope=1.1  intercept= -0.3
With Gnuplot,  slope=1.1  intercept= -0.102985

If you use equally weighted data in Gnuplot (A constant error of 1), you get the
same values that in OOo.
Comment 1 pmartineau 2008-03-21 23:05:30 UTC
Created attachment 52239 [details]
Comparison of the same fit between OOo and Gnuplot
Comment 2 kla 2008-03-26 11:10:20 UTC
Hi Iha,
pls have a look.
kla
Comment 3 pmartineau 2008-03-27 14:23:32 UTC
I just checked with Excel2006 and Gnumeric.
Both have the same problem than OOo-DEV300.
I still think that the gnuplot approach is the correct one, but it may be better
for compatibility reasons to either stick with the current implementation or to
add an option for the fitting "Weight data using error values"
Comment 4 stefan.baltzer 2008-10-29 14:17:15 UTC
SBA: This issue has a target set but is still in state of "Unconfirmed".
Please re-check with OOo 3.0 or younger if it is (still) valid.
Then confirm it or set an appropriate resolution.
Thank you.
Comment 5 stefan.baltzer 2008-10-29 14:24:22 UTC
SBA: This issue has a target set but is still in state of "Unconfirmed".
Please re-check with OOo 3.0 or younger if it is (still) valid.
Then confirm it or set an appropriate resolution.
Thank you.
Comment 6 pmartineau 2008-11-25 16:31:49 UTC
Yes it is still valid but it is a design issue.
The question is to know if you prefer to be "excel-compatible" even when excel
is wrong or even buggy or if you prefer to implement the best possible behavior
(For curve fitting, gnuplot is definitely better than excel).

Comment 7 Edwin Sharp 2014-03-02 18:47:14 UTC
Confirmed with
AOO410m14(Build:9760)  -  Rev. 1573062
2014-03-01_04:11:01 - Rev. 1573123
Debian