Binomial Distribution#
The Binomial distribution is a discrete probability distribution that describes the number of successes in a fixed number \(n\) of independent Bernoulli trials (yes/no experiments), each with the same probability of success \(p\).
Key properties and parameters#
Support |
\(x \in \{0, 1, \ldots, n\}\) |
Mean |
\(n p\) |
Variance |
\(n p (1-p)\) |
Parameters:
\(n\) : (int) Number of Bernoulli trials, \(n \geq 0\).
\(p\) : (float) Probability of success in each trial, \(0 \leq p \leq 1\).
Probability Mass Function (PMF)#
/home/docs/checkouts/readthedocs.org/user_builds/preliz/envs/stable/lib/python3.11/site-packages/pytensor/link/numba/dispatch/basic.py:211: UserWarning: Numba will use object mode to run XlogY0's perform method. Set `pytensor.config.compiler_verbose = True` to see more details.
warnings.warn(
/home/docs/checkouts/readthedocs.org/user_builds/preliz/envs/stable/lib/python3.11/site-packages/pytensor/link/numba/dispatch/basic.py:211: UserWarning: Numba will use object mode to run XlogY0's perform method. Set `pytensor.config.compiler_verbose = True` to see more details.
warnings.warn(
/home/docs/checkouts/readthedocs.org/user_builds/preliz/envs/stable/lib/python3.11/site-packages/pytensor/link/numba/dispatch/basic.py:211: UserWarning: Numba will use object mode to run XlogY0's perform method. Set `pytensor.config.compiler_verbose = True` to see more details.
warnings.warn(
Cumulative Distribution Function (CDF)#
where \(I_{1 - p}(a, b)\) is the regularized incomplete beta function.
See also
Common Alternatives:
Bernoulli Distribution - For a single trial, i.e., \(n=1\), the Binomial distribution reduces to the Bernoulli distribution.
Related Distributions:
Beta-Binomial Distribution - Generalization of the Binomial distribution with a Beta distribution for the probability of success.
Hypergeometric Distribution - Distribution of the number of successes in a sample drawn without replacement.