double function ( ) { checkState ( count ( ) != 0 ) ; return sumOfProductsOfDeltas / count ( ) ; }
returns the population covariance of the values . the count must be non-zero . this is guaranteed to return zero if the dataset contains a single pair of finite values . it 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 double #positive_infinity , double #negative_infinity , or double #nan then the result is double #nan . concode_field_sep StatsAccumulator yStats concode_elem_sep double sumOfProductsOfDeltas concode_elem_sep StatsAccumulator xStats concode_field_sep void add concode_elem_sep Stats yStats concode_elem_sep void addAll concode_elem_sep double sampleCovariance concode_elem_sep double ensurePositive concode_elem_sep double ensureInUnitRange concode_elem_sep long count concode_elem_sep double pearsonsCorrelationCoefficient concode_elem_sep LinearTransformation leastSquaresFit concode_elem_sep Stats xStats concode_elem_sep PairedStats snapshot