gnu-octave / statistics

The Statistics package for GNU Octave
GNU General Public License v3.0
24 stars 22 forks source link

Random test failure in hotelling_t2test.m and hotelling_t2test2.m #92

Closed svillemot closed 1 year ago

svillemot commented 1 year ago

The BISTs in hotelling_t2test.m and hotelling_t2test2.m randomly fail, at least on some Debian architectures, see for example: https://buildd.debian.org/status/fetch.php?pkg=octave-statistics&arch=armel&ver=1.5.4-2&stamp=1682113794&raw=0 https://buildd.debian.org/status/fetch.php?pkg=octave-statistics&arch=ppc64el&ver=1.5.4-2&stamp=1682112726&raw=0

The null hypothesis is randomly rejected (i.e. h=1), because the test data are themselves random.

As a consequence, the Debian package randomly fails to build, which is considered as a bug.

How do you suggest to fix this? By setting the random seed to a given value? Increasing the sample size? Hardcoding some data?

Thanks!

pr0m1th3as commented 1 year ago

I tried increasing the sample size, but when I run many iterations of the test, it produced an error. So I changed the tests to use seeds for each random generation. Now it passes several iterations (checked 200 iterations).