Stan Math Library
5.0.0
Automatic Differentiation
|
return_type_t< T_prob > stan::math::binomial_lpmf | ( | const T_n & | n, |
const T_N & | N, | ||
const T_prob & | 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.
T_n | type of successes parameter |
T_N | type of population size parameter |
T_prob | type of chance of success parameter |
n | successes parameter |
N | population size parameter |
theta | chance of success parameter |
std::domain_error | if n is negative or greater than N |
std::domain_error | if N is negative |
std::domain_error | if theta is not a valid probability |
std::invalid_argument | if container sizes mismatch |
Definition at line 39 of file binomial_lpmf.hpp.