Skip to contents

A is the slope of y on x, C the slope of x on y; A C = r^2 is asserted, so a sign or divisor error fails loudly.

Usage

SlopeProd(x, y)

Arguments

x, y

equal-length data vectors, n >= 2.

Value

list(r, slope_product_AC).

References

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

Examples

SlopeProd(c(2, 3, 3, 5, 7), c(1, 1, 3, 4, 6))$slope_product_AC
#> [1] 0.8888889