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

Method sampleCovariance

output/java_guava/1.4.16/PairedStats.java:129–132  ·  view source on GitHub ↗

Returns the sample covariance of the values. The count must be greater than one. This is not guaranteed to return zero when the dataset consists of the same pair of values multiple times, due to numerical errors. Non-finite values If the dataset contains any non-finite values ({@li

()

Source from the content-addressed store, hash-verified

127
128
129 public double sampleCovariance() {
130 checkState(count() > 1);
131 return sumOfProductsOfDeltas / (count() - 1);
132 }
133
134 /**
135 * Returns the <a href="http://mathworld.wolfram.com/CorrelationCoefficient.html">Pearson's or

Callers

nothing calls this directly

Calls 2

countMethod · 0.95
checkStateMethod · 0.45

Tested by

no test coverage detected