MCPcopy Create free account
hub / github.com/antlr/codebuff / populationVariance

Method populationVariance

output/java_guava/1.4.16/Stats.java:233–242  ·  view source on GitHub ↗

Returns the population variance of the values. The count must be non-zero. This is guaranteed to return zero if the the dataset contains only exactly one finite value. It is not guaranteed to return zero when the dataset con

()

Source from the content-addressed store, hash-verified

231
232
233 public double populationVariance() {
234 checkState(count > 0);
235 if (isNaN(sumOfSquaresOfDeltas)) {
236 return NaN;
237 }
238 if (count == 1) {
239 return 0.0;
240 }
241 return ensureNonNegative(sumOfSquaresOfDeltas) / count();
242 }
243
244 /**
245 * Returns the

Callers 1

Calls 3

countMethod · 0.95
checkStateMethod · 0.45
ensureNonNegativeMethod · 0.45

Tested by

no test coverage detected