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

◆ normal_lpdf() [1/3]

template<bool propto, typename T_y_cl , typename T_loc_cl , typename T_scale_cl , require_all_prim_or_rev_kernel_expression_t< T_y_cl, T_loc_cl, T_scale_cl > * = nullptr, require_any_not_stan_scalar_t< T_y_cl, T_loc_cl, T_scale_cl > * = nullptr>
return_type_t< T_y_cl, T_loc_cl, T_scale_cl > stan::math::normal_lpdf ( const T_y_cl &  y,
const T_loc_cl &  mu,
const T_scale_cl &  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 matrix_cl. 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_y_cltype of scalar
T_loc_cltype of location parameter
T_scale_cltype 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 40 of file normal_lpdf.hpp.