Skip to contents

f(t) = (1 + 2 rho cos(t - mu)) / (2 pi), 0 <= t < 2 pi, |rho| <= 1/2. Density, distribution function, quantile and draws by inversion of the morie Philox uniforms (identical in the Python arm).

Usage

Cardioid(x = NULL, mu = 0, rho = 0.25, p = NULL, n = 0, seed = 0)

Arguments

x

Evaluation points.

mu

Parameter.

rho

Parameter.

p

Probabilities for the quantile function.

n

Number of random draws.

seed

Philox seed.

Value

list(pdf, logpdf, cdf, quantile, random).

References

Jeffreys, H. (1961). Theory of Probability, 3rd ed.; Mardia, K. V. & Jupp, P. E. (2000). Directional Statistics, Sec 3.5.5.

Examples

Cardioid(0.5)$cdf
#> [1] 0.1177289