18.10 Rayleigh distribution
18.10.1 Probability density function
If \(\sigma \in \mathbb{R}^+\), then for \(y \in [0,\infty)\), \[ \text{Rayleigh}(y|\sigma) = \frac{y}{\sigma^2} \exp(-y^2 / 2\sigma^2) \!. \]
18.10.2 Sampling statement
y ~
rayleigh
(sigma)
Increment target log probability density with rayleigh_lupdf(y | sigma)
.
Available since 2.0
18.10.3 Stan functions
real
rayleigh_lpdf
(reals y | reals sigma)
The log of the Rayleigh density of y given scale sigma
Available since 2.12
real
rayleigh_lupdf
(reals y | reals sigma)
The log of the Rayleigh density of y given scale sigma
dropping constant additive terms
Available since 2.25
real
rayleigh_cdf
(real y, real sigma)
The Rayleigh cumulative distribution of y given scale sigma
Available since 2.0
real
rayleigh_lcdf
(real y | real sigma)
The log of the Rayleigh cumulative distribution of y given scale sigma
Available since 2.12
real
rayleigh_lccdf
(real y | real sigma)
The log of the Rayleigh complementary cumulative distribution of y
given scale sigma
Available since 2.12
R
rayleigh_rng
(reals sigma)
Generate a Rayleigh variate with scale sigma; may only be used in
generated quantities block. For a description of argument and return
types, see section vectorized PRNG functions.
Available since 2.18