[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #54557] [octave forge] (statistics) Unit tests
From: |
Rafael Laboissiere |
Subject: |
[Octave-bug-tracker] [bug #54557] [octave forge] (statistics) Unit tests in t_test.m fail randomly |
Date: |
Thu, 23 Aug 2018 02:59:55 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.75 Safari/537.36 |
URL:
<http://savannah.gnu.org/bugs/?54557>
Summary: [octave forge] (statistics) Unit tests in t_test.m
fail randomly
Project: GNU Octave
Submitted by: rlaboiss
Submitted on: Thu 23 Aug 2018 06:59:54 AM UTC
Category: Octave Forge Package
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: other
Operating System: Any
_______________________________________________________
Details:
All unit tests in file install-conditionally/tests/t_test.m of the statistics
package (version 1.4.0) fail randomly. Here is an example of how the bug can
be triggered:
octave:1> pkg load statistics
octave:2> while test("t_test", "verbose") ; endwhile
[...]
***** test
x = rand (10,1); n = length (x);
u0 = 0.5;
pval = t_test (x, u0, "<");
tval = tinv (pval, n-1);
unew = tval * std(x)/sqrt(n) + u0;
assert (mean (x), unew, 1000*eps);
!!!!! test failed
ASSERT errors for: assert (mean (x),unew,1000 * eps)
Location | Observed | Expected | Reason
() 0.49993 0.49993 Abs err 1.2859e-06 exceeds tol
2.2204e-13 by 1e-06
Increasing the tolerance seems to fix the problem. A trivial patch is attached
to this bug report.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Thu 23 Aug 2018 06:59:54 AM UTC Name: t_test-increase-tol.patch Size:
989B By: rlaboiss
<http://savannah.gnu.org/bugs/download.php?file_id=44830>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?54557>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #54557] [octave forge] (statistics) Unit tests in t_test.m fail randomly,
Rafael Laboissiere <=