Probability and statistics

m∼Bernoulli⁡(p)m \sim \operatorname{Bernoulli}(p) Bernoulli distribution

Bernoulli(p) is a coin flip: 1 with probability p, 0 otherwise.

In ML papers

Bernoulli⁡(p)\operatorname{Bernoulli}(p) is a single yes/no trial: it gives 1 with probability pp and 0 with probability 1−p1-p. Its mean is pp and its variance p(1−p)p(1-p).

In ML it models binary labels (a sigmoid output is the pp of a Bernoulli, and the binary cross-entropy loss is its negative log-likelihood) and random masks. In dropout (Srivastava et al. 2014), each unit is kept according to rj∼Bernoulli⁡(p)r_j \sim \operatorname{Bernoulli}(p), where pp is the probability of keeping a unit.

How to type it

LaTeXShows
\operatorname{Bernoulli}(p)Bernoulli⁡(p)\operatorname{Bernoulli}(p)
\operatorname{Bern}(p)Bern⁡(p)\operatorname{Bern}(p)

A worked example

P(m=1)=0.8, P(m=0)=0.2,E[m]=0.8P(m = 1) = 0.8,\ P(m = 0) = 0.2, \quad \mathbb{E}[m] = 0.8

A dropout mask with keep probability 0.80.8 keeps about 80 of every 100 units.

Common confusions

Equations that use it

Related

y∼Cat⁡(π)y \sim \operatorname{Cat}(\boldsymbol{\pi})Categorical distributionx∼pdatax \sim p_{\text{data}}Distributed as (tilde)p(x),  q(z)p(\mathbf{x}), \; q(\mathbf{z})Probability p(x)Ex∼p[f(x)]\mathbb{E}_{x \sim p}[f(x)]Expectation

Decode this example →