Bug 106049 - function T.INV(1,n) should return error
Summary: function T.INV(1,n) should return error
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Winfried Donkers
URL:
Whiteboard: target:5.4.0
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-16 18:16 UTC by raal
Modified: 2017-02-26 12:45 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description raal 2017-02-16 18:16:54 UTC
Description:
function T.INV(1,n) should return error

Actual Results:  
value

Expected Results:
error


Reproducible: Always

User Profile Reset: No

Additional Info:


User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0
Comment 1 raal 2017-02-16 18:18:50 UTC
Winfried confirmed.
Comment 2 Winfried Donkers 2017-02-17 15:39:01 UTC
The Microsoft 'specification' (https://support.office.com/en-us/article/T-INV-function-2908272b-4e61-4942-9df9-a25fec9b0e2e) is incorrect, as the constraints for p are 0 < p < 1.
(The actual behaviour of Excel is correct and not as stated in the 'specification'.)

The mathematic rule is "For all continuous distributions, the ICDF exists and is unique if 0 < p < 1." (ICDF - inverse cumulative distribution function).
A p of 0 is reached at minus infinity and a p of 1 is reached at plus infinity, i.o.w. there is no concrete value X for which the cumulative left tailed t-distribution probability is 0 or 1.
Comment 3 Commit Notification 2017-02-21 12:44:11 UTC
Winfried Donkers committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=76198c537fa7595b94b2f930081bf7f6ec966dbe

tdf#106049 Apply proper constraints for Calc function T.INV.

It will be available in 5.4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.