16.10 Rayleigh Distribution
16.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) \!. \]
16.10.2 Sampling Statement
y ~
rayleigh
(sigma)
Increment target log probability density with rayleigh_lpdf(y | sigma)
dropping constant additive terms.
16.10.3 Stan Functions
real
rayleigh_lpdf
(reals y | reals sigma)
The log of the Rayleigh density of y given scale sigma
real
rayleigh_cdf
(real y, real sigma)
The Rayleigh cumulative distribution of y given scale sigma
real
rayleigh_lcdf
(real y | real sigma)
The log of the Rayleigh cumulative distribution of y given scale sigma
real
rayleigh_lccdf
(real y | real sigma)
The log of the Rayleigh complementary cumulative distribution of y given scale sigma
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.