Class VarSAggregator<V extends java.lang.Number>

  • All Implemented Interfaces:
    java.io.Externalizable, java.io.Serializable, Aggregator<V,​java.lang.Double,​VarPAggregator<V>>
    Direct Known Subclasses:
    StdDevSAggregator

    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
     
    See Also:
    Serialized Form
    • Constructor Detail

      • VarSAggregator

        public VarSAggregator()
    • Method Detail

      • computeVar

        protected java.lang.Double computeVar()
        Overrides:
        computeVar in class VarPAggregator<V extends java.lang.Number>