Table of contents
The density function of the Binomial distribution:
f(x; n, p) = \binom{n}{x} p^x (1-p)^{n-x} \times \mathbf{1}[x \in \{0,\ldots,n\}]
Methods for scalar input, as well as for vector/matrix input, are listed below.
.. doxygenfunction:: dbinom(const llint_t, const llint_t, const T, const bool) :project: statslib
.. doxygenfunction:: dbinom(const std::vector<eT>&, const llint_t, const T1, const bool) :project: statslib
.. doxygenfunction:: dbinom(const ArmaMat<eT>&, const llint_t, const T1, const bool) :project: statslib
.. doxygenfunction:: dbinom(const BlazeMat<eT, To>&, const llint_t, const T1, const bool) :project: statslib
.. doxygenfunction:: dbinom(const EigenMat<eT, iTr, iTc>&, const llint_t, const T1, const bool) :project: statslib
The cumulative distribution function of the Binomial distribution:
F(x; n, p) = \sum_{z \leq x} f(z; n, p)
Methods for scalar input, as well as for vector/matrix input, are listed below.
.. doxygenfunction:: pbinom(const llint_t, const llint_t, const T, const bool) :project: statslib
.. doxygenfunction:: pbinom(const std::vector<eT>&, const llint_t, const T1, const bool) :project: statslib
.. doxygenfunction:: pbinom(const ArmaMat<eT>&, const llint_t, const T1, const bool) :project: statslib
.. doxygenfunction:: pbinom(const BlazeMat<eT, To>&, const llint_t, const T1, const bool) :project: statslib
.. doxygenfunction:: pbinom(const EigenMat<eT, iTr, iTc>&, const llint_t, const T1, const bool) :project: statslib
The quantile function of the Binomial distribution:
q(r; n, p) = \inf \left\{ x : r \leq F(x; n, p) \right\}
Methods for scalar input, as well as for vector/matrix input, are listed below.
.. doxygenfunction:: qbinom(const T1, const llint_t, const T2) :project: statslib
.. doxygenfunction:: qbinom(const std::vector<eT>&, const llint_t, const T1) :project: statslib
.. doxygenfunction:: qbinom(const ArmaMat<eT>&, const llint_t, const T1) :project: statslib
.. doxygenfunction:: qbinom(const BlazeMat<eT, To>&, const llint_t, const T1) :project: statslib
.. doxygenfunction:: qbinom(const EigenMat<eT, iTr, iTc>&, const llint_t, const T1) :project: statslib
Random sampling for the Binomial distribution is achieved by summing the results of simulating n Bernoulli-distributed random variables.
- Random number engines
.. doxygenfunction:: rbinom(const llint_t, const T, rand_engine_t&) :project: statslib
- Seed values
.. doxygenfunction:: rbinom(const llint_t, const T, const ullint_t) :project: statslib
- Random number engines
.. doxygenfunction:: rbinom(const ullint_t, const ullint_t, const llint_t, const T1, rand_engine_t&) :project: statslib
- Seed values
.. doxygenfunction:: rbinom(const ullint_t, const ullint_t, const llint_t, const T1, const ullint_t) :project: statslib