public class SampleStatistic extends Object
Provides max, total, mean, count, variance, and standard deviation of continuous sequence of samples.
Calculates estimates of mean, variance, and standard deviation characteristics of a sample using a non synchronized approximation of the on-line algorithm presented in Donald Knuth's Art of Computer Programming, Volume 2, Seminumerical Algorithms, 3rd edition, page 232, Boston: Addison-Wesley. that cites a 1962 paper by B.P. Welford that can be found by following the link http://www.jstor.org/pss/1266577
This algorithm is also described in Wikipedia at http://en.wikipedia.org/w/index.php?title=Algorithms_for_calculating_variance§ion=4#On-line_algorithm
Modifier and Type | Field and Description |
---|---|
protected AtomicLong |
_count |
protected AtomicLong |
_max |
protected AtomicLong |
_total |
protected AtomicLong |
_totalVariance100 |
Constructor and Description |
---|
SampleStatistic() |
protected final AtomicLong _max
protected final AtomicLong _total
protected final AtomicLong _count
protected final AtomicLong _totalVariance100
Copyright © 1995-2015 Webtide. All Rights Reserved.