/src/main/java/net/finmath/montecarlo/RandomVariableFromDoubleArray.java
if ( size ( ) == 0 ) { return Double.NaN; }
} @Override public double getVariance() { if(isDeterministic() || size() == 1) { return 0.0; } <extra_id_0> final double average = getAverage(); double sum = 0.0; double errorOfSum = 0.0; for(int i=0; i<realizations.length; i++) { final double value = (realizations[i] - average)*(realizations[i] - average) - errorOfSum; final double newSum = sum + value;