Bernoulli Distribution Calculator
The simplest distribution of all — one trial, two outcomes — with its mean, variance, entropy and the value of n trials in a row.
A Bernoulli trial has one parameter p, the chance of success.
How the bernoulli distribution calculator works
A Bernoulli trial has one parameter p, the chance of success. Its mean is p and its variance p(1 − p), which peaks at p = 0.5: a fair coin is the most unpredictable single trial there is.
Everything binomial is built from it — n independent Bernoulli trials summed give the binomial distribution, which is why the mean np and variance np(1 − p) look so familiar.
Formula: mean = p; variance = p(1 − p); H = −p log₂ p − q log₂ q
Worked examples
| Inputs | Mean (expected value) | Note |
|---|---|---|
| p = 30% | 0.3 | variance 0.21, entropy 0.881 bits |
| A fair coin | 0.5 | variance 0.25, entropy exactly 1 bit |
| A rare event | 0.01 | variance 0.0099, entropy 0.081 bits |
FAQFrequently asked questions
What is a Bernoulli trial?
A single experiment with two outcomes — success or failure — and a fixed probability p.
How does it relate to the binomial?
A binomial variable is the sum of n independent Bernoulli trials. That is where np and np(1−p) come from.
Why is the variance largest at 50%?
Because that is where the outcome is least predictable. At p = 0.01 almost every trial fails, so there is little to vary.
What is the entropy for?
It measures how much information one trial reveals. A fair coin gives exactly one bit; a 99% biased coin gives only 0.08.
Is a coin flip a Bernoulli trial?
Yes — the canonical one, with p = 0.5.
Where these figures come from
- NIST Digital Library of Mathematical Functions — reference definitions for elementary and special functions
- Wolfram MathWorld — definitions and formulas for every topic on this page
- NIST/SEMATECH e-Handbook of Statistical Methods — the statistical formulas (mean, variance, z, confidence intervals, sample size)
- Common Core State Standards — Mathematics — the terms and methods taught in US schools
Last checked: September 2026. Formulas are fixed by mathematics and do not change with tax years or regulations.