Bernoulli distribution¶
Story¶
The result \(y\) of a single Bernoulli trial is Bernoulli distributed.
Example¶
Check to see if a given bacterium is competent, given that it has probability \(\theta\) of being competent.
Parameter¶
The Bernoulli distribution is parametrized by a single value, \(\theta\), the probability that the trial is successful.
Support¶
The Bernoulli distribution may be nonzero only for \(y = 0\) and \(y = 1\).
Probability mass function¶
\[\begin{split}\begin{align}
f(y;\theta) = \left\{ \begin{array}{ccc}
1\theta & & y = 0 \\[0.5em]
\theta & & y = 1.
\end{array}
\right.
\end{align}\end{split}\]
Usage¶
Package 
Syntax 

NumPy 

SciPy 

Stan 
