Re: [Math] StatUtils.variance

2013-08-29 Thread Gilles
Hello. On Thu, 29 Aug 2013 16:45:10 -0400, enzhong...@pnc.com wrote: It seems that the method StatUtils.variance()uses (n-1) as the divisor, not n. The method's documentation mentions it, as well as an alternative that may better suit you. [...] Regards, Gilles -

[Math] StatUtils.variance

2013-08-29 Thread enzhong . fu
It seems that the method StatUtils.variance()uses (n-1) as the divisor, not n. I got the following results, StatUtils.variance(new double[]{-1,0,1}) = 1.0 StatUtils.variance(new double[]{-2,-1,0,1,2}) = 2.5 It should use n as divisor and the result should be 2/3 and 2.0, right? This is Apache C