
Last chance! 50% off unlimited learning
Sale ends in
location
and scale parameter scale
.
It also allows sampling from the truncated distribution.
[Special Generator] -- Sampling Function: Cauchy.urcauchy(n, location=0, scale=1, lb = -Inf, ub = Inf)
location
or scale
are not specified, they assume
the default values of 0
and 1
respectively. The Cauchy distribution with location $l$ and scale $s$ has
density
The generation algorithm uses fast numerical inversion. The parameters
lb
and ub
can be used to generate variates from
the Cauchy distribution truncated to the interval (lb
,ub
).
runif
and .Random.seed
about random number
generation, unuran
for the UNU.RAN class, and
rcauchy
for the Rbuilt-in generator.## Create a sample of size 1000
x <- urcauchy(n=1000)
Run the code above in your browser using DataLab