Skip to contents

near_zero is the decision abs(Cov) <= tol. A zero covariance is necessary but not sufficient for independence.

Usage

CovIndep(x, y, tol = 1e-09)

Arguments

x, y

equal-length data vectors, n >= 2.

tol

absolute tolerance on the covariance.

Value

list(cov, near_zero).

References

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

Examples

CovIndep(c(-1, 0, 1), c(1, 0, 1))$near_zero
#> [1] TRUE