Bernoulli distribution
The Bernoulli distribution describes the outcome of a single trial with two outcomes: success (coded 1) or failure (coded 0). It is the simplest indicator variable and the building block of binomial and counting models.
Characteristics
| Characteristic | Formula | Description |
|---|---|---|
| Notation | Sometimes written or | |
| Parameter | Success probability; often | |
| Support | Two mutually exclusive integer values | |
| Probability mass function | PMF on the binary support | |
| Cumulative distribution function | if , if | Jump of height at |
| Moment-generating function | Derivatives at 0 yield moments | |
| Characteristic function | Fourier transform of the law | |
| Mean | Average success probability on one trial | |
| Variance | Maximized at () | |
| Median | if , if | Not unique if |
| Mode | if , if | Bimodal if |
| Skewness | Positive if , negative if | |
| Excess kurtosis | Lighter tails than the normal at | |
| Shannon entropy | Convention ; maximized at | |
| Fisher information | For one observation; increases as moves away from | |
| Kullback-Leibler divergence | Between two Bernoulli laws with parameters and |
Properties and theorems
| Property / theorem | Formula | Description |
|---|---|---|
| Indicator variable | Every Bernoulli is the indicator of an event with probability | |
| Complement | Success and failure are symmetric under inversion | |
| i.i.d. sum | independent trials → binomial law | |
| Integer moments | for | Since on |
| Maximum variance | Reached at ; bounds single-trial uncertainty | |
| Zero product | and are never simultaneously nonzero | |
| MGF of sums | For i.i.d. variables; identifies the binomial | |
| Degenerate cases | , | Point masses at the parameter boundaries |
| Bernoulli process | i.i.d. | Sequence of independent trials; partial sums are binomial |
Applications
Default modeling
A loan defaulting (yes/no) over a horizon is often modeled as a Bernoulli with parameter PD (probability of default).
Binary classification
Classifier output (positive/negative), marketing conversion, binary signal: the target or prediction error is naturally Bernoulli.
Independent trials
Coin flips, noisy bit transmission, winning/losing trades under i.i.d. assumptions: each repetition is a Bernoulli trial.
Building block for counting laws
Sums of i.i.d. Bernoulli variables yield the binomial; in the rare regime (large , small ), the Poisson law appears as a limit.
Statistical inference
| Concept | Formula | Description |
|---|---|---|
| Sample | observed trials; inference targets proportion | |
| MLE estimator | Empirical success rate; unbiased, consistent, efficient | |
| Estimator variance | Decays as ; largest at | |
| Wald interval | Normal approximation; acceptable when and are large enough | |
| Clopper-Pearson interval | Exact proportion interval with | |
| Proportion Z-test | Under and large | |
| Conjugate prior (Bayesian) | The beta law is conjugate to Bernoulli |
Important remarks
A single trial () cannot estimate with a margin of error; inference practically concerns an i.i.d. Bernoulli sample.
The Wald interval can yield bounds outside for near 0 or 1 and moderate .
- For small samples, prefer Clopper-Pearson or the Wilson interval.
The rule of thumb and guides use of the normal approximation.
Computational methods
| Method | Description | Applications |
|---|---|---|
| Pseudo-random generation | , return 1 if | Default simulation, Monte Carlo, bootstrap |
| NumPy |
| Vectorized draws on a portfolio |
| SciPy |
| Exact calculations and simulation |
| Estimation and CIs |
| Robust confidence intervals for proportions |
Chargement…
References
• Wikipedia, Bernoulli distribution: https://en.wikipedia.org/wiki/Bernoulli_distribution
• Special case of the exponential family; see also Fundamentals and Discrete distributions.