Skip to contents

Refuses data whose means are not zero: use the shortcut form instead.

Usage

CovZMean(x, y)

Arguments

x, y

equal-length zero-mean data vectors.

Value

list(cov).

References

Morin, D. J. (2016). Probability: For the Enthusiastic Beginner. Createspace. Eq (6.8).

Examples

CovZMean(c(-1, 0, 1), c(-2, 0, 2))$cov
#> [1] 1.333333