The last post in that thread is Brian Goetz saying

"The Knuth section you cite also offers a means to calculate variance more 
effectively in a single pass using a recurrence relation based on Kahan 
summation. So I think the winning move is to provide a better 
implementation of sumsq than either of the naive implementations above, one 
that uses real numerics fu."

The current (final?) DoubleSummaryStatistics does have Kahan summation for 
non-squared sum, but there is no sumsq implementation at all. Goetz's 
winning move wasn't implemented.

On Tuesday, March 18, 2014 2:08:18 AM UTC-5, jddarcy wrote:
>
> Short answer: supporting some kind of variance calculation was considered 
> and discussed by the Lambda expert group:
>
>     
> http://mail.openjdk.java.net/pipermail/lambda-libs-spec-experts/2013-March/001523.html
>
> but since the well-known the formula you cite as-is fails catastrophically 
> for floating-point numbers and the numerical remedies for roundoff problems 
> are expensive enough that you don't want to do them all the time.
>
> -Joe
>
>
> On Mon, Mar 17, 2014 at 10:55 PM, clay <clayt...@gmail.com 
> <javascript:>>wrote:
>
>> Why does jdk 8 java.util.DoubleSummaryStatistics not track variance or 
>> standard deviation?
>>
>> It provides mean, min, max, count, sum... But no variance? That's the 
>> other major statistic that can be calculated trivially by Var(X) = E[X^2] - 
>> (E[X])^2
>>
>> Java 8 hits final release today, right?
>>  
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Java Posse" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to javaposse+...@googlegroups.com <javascript:>.
>> To post to this group, send email to java...@googlegroups.com<javascript:>
>> .
>> Visit this group at http://groups.google.com/group/javaposse.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups "Java 
Posse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to javaposse+unsubscr...@googlegroups.com.
To post to this group, send email to javaposse@googlegroups.com.
Visit this group at http://groups.google.com/group/javaposse.
For more options, visit https://groups.google.com/d/optout.

Reply via email to