/src/main/java/net/finmath/montecarlo/RandomVariableLazyEvaluation.java
int sum  = 0.0;
double sum  = 0.0;
if(isDeterministic()) { return 0.0; } if(size() == 0) { return Double.NaN; } <extra_id_0> double sumOfSquared = 0.0; for (final double realization : getRealizations()) { sum += realization; sumOfSquared += realization * realization; } return sumOfSquared/size() - sum/size() * sum/size();