org.apache.commons.math3.stat.descriptive
Class UnivariateStatisticAbstractTest

java.lang.Object
  extended by org.apache.commons.math3.stat.descriptive.UnivariateStatisticAbstractTest
Direct Known Subclasses:
MedianTest, PercentileTest, StorelessUnivariateStatisticAbstractTest

public abstract class UnivariateStatisticAbstractTest
extends Object

Test cases for the UnivariateStatistic class.

Version:
$Id: UnivariateStatisticAbstractTest.java 1368738 2012-08-02 22:18:08Z erans $

Field Summary
protected  double fourthMoment
           
protected  double geoMean
           
protected  double[] identicalWeightsArray
           
protected  double kurt
           
protected  double max
           
protected  double mean
           
protected  double median
           
protected  double min
           
protected  double percentile5
           
protected  double percentile95
           
protected  double product
           
protected  double secondMoment
           
protected  double skew
           
protected  double std
           
protected  double sum
           
protected  double sumLog
           
protected  double sumSq
           
protected  double[] testArray
           
protected  double[] testWeightsArray
           
protected  double thirdMoment
           
protected  double tolerance
           
protected  double[] unitWeightsArray
           
protected  double var
           
protected  double weightedMean
           
protected  double weightedProduct
           
protected  double weightedStd
           
protected  double weightedSum
           
protected  double weightedVar
           
 
Constructor Summary
UnivariateStatisticAbstractTest()
           
 
Method Summary
abstract  double expectedValue()
           
 double getTolerance()
           
abstract  UnivariateStatistic getUnivariateStatistic()
           
 void testCopy()
           
 void testEvaluateArraySegment()
           
 void testEvaluateArraySegmentWeighted()
           
 void testEvaluation()
           
 void testWeightedConsistency()
          Tests consistency of weighted statistic computation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mean

protected double mean

geoMean

protected double geoMean

var

protected double var

std

protected double std

skew

protected double skew

kurt

protected double kurt

min

protected double min

max

protected double max

median

protected double median

percentile5

protected double percentile5

percentile95

protected double percentile95

product

protected double product

sumLog

protected double sumLog

sumSq

protected double sumSq

sum

protected double sum

secondMoment

protected double secondMoment

thirdMoment

protected double thirdMoment

fourthMoment

protected double fourthMoment

weightedMean

protected double weightedMean

weightedVar

protected double weightedVar

weightedStd

protected double weightedStd

weightedProduct

protected double weightedProduct

weightedSum

protected double weightedSum

tolerance

protected double tolerance

testArray

protected double[] testArray

testWeightsArray

protected double[] testWeightsArray

identicalWeightsArray

protected double[] identicalWeightsArray

unitWeightsArray

protected double[] unitWeightsArray
Constructor Detail

UnivariateStatisticAbstractTest

public UnivariateStatisticAbstractTest()
Method Detail

getUnivariateStatistic

public abstract UnivariateStatistic getUnivariateStatistic()

expectedValue

public abstract double expectedValue()

getTolerance

public double getTolerance()

testEvaluation

public void testEvaluation()

testEvaluateArraySegment

public void testEvaluateArraySegment()

testEvaluateArraySegmentWeighted

public void testEvaluateArraySegmentWeighted()

testCopy

public void testCopy()

testWeightedConsistency

public void testWeightedConsistency()
Tests consistency of weighted statistic computation. For statistics that support weighted evaluation, this test case compares the result of direct computation on an array with repeated values with a weighted computation on the corresponding (shorter) array with each value appearing only once but with a weight value equal to its multiplicity in the repeating array.



Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.