Class VarSAggregator<V extends Number>

java.lang.Object
org.apache.derby.impl.sql.execute.VarPAggregator<V>
org.apache.derby.impl.sql.execute.VarSAggregator<V>
All Implemented Interfaces:
Externalizable, Serializable, Aggregator<V,Double,VarPAggregator<V>>
Direct Known Subclasses:
StdDevSAggregator

public class VarSAggregator<V extends 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
 
See Also:
  • Field Details

  • Constructor Details

    • VarSAggregator

      public VarSAggregator()
  • Method Details