Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ normal_lpdf() [2/3]

template<bool propto, typename T_y , typename T_loc , typename T_scale , require_all_not_nonscalar_prim_or_rev_kernel_expression_t< T_y, T_loc, T_scale > * = nullptr>
return_type_t< T_y, T_loc, T_scale > stan::math::normal_lpdf ( const T_y &  y,
const T_loc &  mu,
const T_scale &  sigma 
)
inline

The log of the normal density for the specified scalar(s) given the specified mean(s) and deviation(s).

y, mu, or sigma can each be either a scalar or a vector. Any vector inputs must be the same length.

The result log probability is defined to be the sum of the log probabilities for each observation/mean/deviation triple.

Template Parameters
T_ytype of scalar
T_loctype of location parameter
T_scaletype of scale parameter
Parameters
y(Sequence of) scalar(s).
mu(Sequence of) location parameter(s) for the normal distribution.
sigma(Sequence of) scale parameters for the normal distribution.
Returns
The log of the product of the densities.
Exceptions
std::domain_errorif the scale is not positive.

Definition at line 44 of file normal_lpdf.hpp.