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 list input, are listed below.
.. autofunction:: pystats.dbinom(x: float, n_trials: int, prob: float, log: bool = False) -> float :noindex:
.. autofunction:: pystats.dbinom(x: List[float], n_trials: int, prob: float, log: bool = False) -> List[float] :noindex:
The cumulative distribution function (CDF) of the Binomial distribution:
F(x; n, p) = \sum_{z \leq x} f(z; n, p)
Methods for scalar input, as well as for list input, are listed below.
.. autofunction:: pystats.pbinom(p: float, n_trials: int, prob: float, log: bool = False) -> float :noindex:
.. autofunction:: pystats.pbinom(p: List[float], n_trials: int, prob: float, log: bool = False) -> List[float] :noindex:
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 list input, are listed below.
.. autofunction:: pystats.qbinom(q: float, n_trials: int, prob: float) -> float :noindex:
.. autofunction:: pystats.qbinom(q: List[float], n_trials: int, prob: float) -> List[float] :noindex:
Random sampling for the Binomial distribution is achieved by summing the results of simulating n Bernoulli-distributed random variables.
.. autofunction:: pystats.rbinom(n_trials: int, prob: float) -> float :noindex:
.. autofunction:: pystats.rbinom(n: int, n_trials: int, prob: float) -> List[float] :noindex: