public class VarSAggregator<V extends java.lang.Number> extends VarPAggregator<V>
This class implements the SQL Standard VAR_SAMP() aggregator, computing the variance over a sample. It uses the IBM formula described here:
[ sum(xi2) - sum(xi)2/n ]/(n-1) where n is the number of items in the population x1 ... xn are the items in the population
VarPAggregator.Sums
Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID |
count, sums
Constructor and Description |
---|
VarSAggregator() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.Double |
computeVar() |
accumulate, init, merge, readExternal, terminate, writeExternal
private static final long serialVersionUID
protected java.lang.Double computeVar()
computeVar
in class VarPAggregator<V extends java.lang.Number>
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.