Stan Math Library
5.0.0
Automatic Differentiation
|
return_type_t< T_y, T_inv_scale > stan::math::exponential_lpdf | ( | const T_y & | y, |
const T_inv_scale & | beta | ||
) |
The log of an exponential density for y with the specified inverse scale parameter.
Inverse scale parameter must be greater than 0. y must be greater than or equal to 0.
\begin{eqnarray*} y &\sim& \mbox{\sf{Expon}}(\beta) \\ \log (p (y \, |\, \beta) ) &=& \log \left( \beta \exp^{-\beta y} \right) \\ &=& \log (\beta) - \beta y \\ & & \mathrm{where} \; y > 0 \end{eqnarray*}
T_y | type of scalar |
T_inv_scale | type of inverse scale |
y | A scalar variable. |
beta | Inverse scale parameter. |
std::domain_error | if beta is not greater than 0. |
std::domain_error | if y is not greater than or equal to 0. |
Definition at line 52 of file exponential_lpdf.hpp.