bos/statistics — Issue #18: Int overflow(?) in wilcoxonMatchedPairCriticalValue 
Author: Shimuuar
Created: 2011-12-09 21:09:23+00:00
State: open

There is a bug in calculation of critical value for Wilcoxon-T test.

λ wilcoxonMatchedPairCriticalValue 35 0.05
Just 213
λ wilcoxonMatchedPairCriticalValue 36 0.05
Just 2147483647 -- Which equal to Just (2^31-1)

It looks like at some point integer overflow occurs.

Also it cannot handle samples larger than 1023 at all since it uses 2**sampleSize in calculation of critical value which overflows to +∞ for sampleSize > 1023

Test probably should fall back to normal approximation at some point.