public class Variance<N extends Number> extends Mean<N>
Calculate the variance from a finite sample of N observations.
_samples
Constructor and Description |
---|
Variance() |
Modifier and Type | Method and Description |
---|---|
void |
accumulate(N value)
Accumulate the given value.
|
Variance<N> |
clone() |
boolean |
equals(Object obj) |
double |
getVariance()
Return the variance of the accumulated values.
|
int |
hashCode() |
String |
toString() |
getMean, getStandardError
getSamples, map
public Variance()
public double getVariance()
Double.NaN
if getSamples() == 0
.public void accumulate(N value)
Accumulator
accumulate
in interface Accumulator<N extends Number>
accumulate
in class Mean<N extends Number>
value
- the value to accumulate.NullPointerException
- if the given value
is null
.© 2007-2014 Franz Wilhelmstötter (2014-03-07 19:35)