jax.scipy.stats.bernoulli.pmf

Contents

jax.scipy.stats.bernoulli.pmf#

jax.scipy.stats.bernoulli.pmf(k, p, loc=0)[source]#

Bernoulli probability mass function.

JAX implementation of scipy.stats.bernoulli pmf

The Bernoulli probability mass function is defined as

\[\begin{split}f(k) = \begin{cases} 1 - p, & k = 0 \\ p, & k = 1 \\ 0, & \mathrm{otherwise} \end{cases}\end{split}\]
Parameters:
Returns:

array of pmf values

Return type:

Array