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

◆ normal_sufficient_lpdf() [1/2]

template<bool propto, typename T_y , typename T_s , typename T_n , typename T_loc , typename T_scale >
return_type_t< T_y, T_s, T_loc, T_scale > stan::math::normal_sufficient_lpdf ( const T_y &  y_bar,
const T_s &  s_squared,
const T_n &  n_obs,
const T_loc &  mu,
const T_scale &  sigma 
)

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

y, s_squared, mu, or sigma can each be either a scalar, a std vector or Eigen vector. n can be either a single int or an std vector of ints. 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 sample average parameter
T_stype of sample squared errors parameter
T_ntype of sample size parameter
T_loctype of location parameter
T_scaletype of scale parameter
Parameters
y_bar(Sequence of) scalar(s) (sample average(s)).
s_squared(Sequence of) sum(s) of sample squared errors
n_obs(Sequence of) sample size(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 either n or sigma are not positive, if s_squared is negative or if any parameter is not finite.

Definition at line 54 of file normal_sufficient_lpdf.hpp.