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

◆ binomial_lpmf() [1/3]

template<bool propto, typename T_n_cl , typename T_N_cl , typename T_prob_cl , require_all_prim_or_rev_kernel_expression_t< T_n_cl, T_N_cl, T_prob_cl > * = nullptr, require_any_nonscalar_prim_or_rev_kernel_expression_t< T_n_cl, T_N_cl, T_prob_cl > * = nullptr>
return_type_t< T_prob_cl > stan::math::binomial_lpmf ( const T_n_cl &  n,
const T_N_cl  N,
const T_prob_cl &  theta 
)

Returns the log PMF for the binomial distribution evaluated at the specified success, population size, and chance of success.

If given containers of matching lengths, returns the log sum of probabilities.

Template Parameters
T_n_cltype of successes parameter
T_N_cltype of population size parameter
T_prob_cltype of chance of success parameter
Parameters
nsuccesses parameter
Npopulation size parameter
thetachance of success parameter
Returns
log sum of probabilities
Exceptions
std::domain_errorif n is negative or greater than N
std::domain_errorif N is negative
std::domain_errorif theta is not a valid probability
std::invalid_argumentif container sizes mismatch

Definition at line 36 of file binomial_lpmf.hpp.