Interactive module guide
Bernoulli Distribution Calculator & Guide
This Bernoulli distribution calculator lets you explore a single success/failure trial and see how the success probability sets its mass, mean, and variance.
Free · No sign-up · Calculations stay in your browser
The Bernoulli distribution describes one trial with exactly two outcomes: success with probability p and failure with probability 1−p.
It is the smallest unit of discrete probability, and nearly every count model on this site is built from it—summing independent Bernoulli trials gives the binomial, waiting for the first success gives the geometric, and waiting for the r-th success gives the negative binomial.
Use this page to see how a single parameter fixes the two mass values, the mean p, the variance p(1−p), and the skewness that flips sign at p equal to one half.
Is this the right module for my question?
Use it when
- Use a Bernoulli model for any single observation that is honestly binary: one inspected part passes or fails, one visitor converts or leaves, one patient responds or does not. The parameter p is the population success probability, and the whole distribution is the pair of masses P(X=1)=p and P(X=0)=1−p.
- Use it as the formal building block when you plan to aggregate. Deciding whether n repeated trials justify a binomial model is exactly the question of whether each trial is Bernoulli with the same p and independent of the others, so examining the single-trial model first makes the aggregation assumptions explicit rather than implicit.
- Use it to reason about indicator variables in simulation and regression. An indicator that an event occurs is Bernoulli by construction, its expectation is the event probability, and logistic regression is nothing more than a model for how that Bernoulli p depends on covariates.
Choose another method when
- Avoid collapsing genuinely multi-valued outcomes into two categories without recording the rule. A five-level satisfaction score dichotomized at an arbitrary cut is a modeling decision that discards information; if the cut moves, p changes, and analyses made under different cuts are not comparable.
- Avoid treating a sequence of trials as one Bernoulli question. Questions about how many successes occur in n trials belong to the binomial page, and questions about how long until the first success belong to the geometric page; the Bernoulli model covers exactly one trial.
- Avoid using a constant p when the success chance clearly varies across units or over time. Pooling morning and evening conversion data into one p hides the structure; a model with covariates or separate parameters represents the mechanism more honestly than a single averaged probability.
Interactive tool
The calculator loads as you approach this section so the guide remains fast on mobile connections.
Example preview
Single quality-check pass or fail
- Inputs
- X ~ Bernoulli(p=0.3); evaluate the chance of a success.
- Representative result
- P(X=1) = 0.3 and P(X=0) = 0.7, with mean 0.3 and variance 0.21.
Illustrative only. Load the interactive tool to enter your own values and review assumptions.
Watch the explanation
2:53 minThe player loads only after you press play. You can also watch on YouTube.
Read the complete transcript
The Bernoulli Distribution. How can one yes-or-no trial contain the foundation of so many probability models? Label success as one with probability p, and failure as zero with probability one minus p. Those two integers form the complete support; every other numerical value has probability zero. One compact mass formula generates both bars by substituting x equals zero or one. Its cumulative function stays zero, jumps at zero, then reaches one at outcome one. A quantile returns zero through cumulative level one minus p, and one above it.
Because X is an event indicator, its expectation equals the event probability p exactly. Its variance is p times one minus p, measuring uncertainty in the binary outcome. That variance peaks at exactly one quarter when both outcomes are equally likely. Toward p equals zero or one, variance collapses and the distribution becomes degenerate. Skewness is positive below one half, zero there, and negative above one half. Excess kurtosis also changes with p and equals negative two at the balanced case. The more probable outcome is the mode; at one half both outcomes tie. Unlike continuous density height, each Bernoulli bar height is an actual point probability.
For one inspection, let X equal one mark a defect, with p zero point three. The defect bar is zero point three, while the nondefect bar is zero point seven. CDF at zero equals zero point seven; survival beyond zero equals point three. Mean is point three, variance point two one, and standard deviation about point four six. Its skewness is about zero point eight seven three, positive because the right outcome is rarer. One inspected unit is never thirty percent defective; the realized indicator is zero or one.
Sum independent Bernoulli trials with one common p, and the total becomes binomial. Across twenty-five trials, mean count is seven point five and variance five point two five. Different success probabilities instead produce a Poisson-binomial sum, not an ordinary binomial. Dependence also breaks the binomial variance, often creating more clustering than the model predicts. Logistic regression keeps each response Bernoulli while letting p change with measured covariates. The explorer evaluates a specified p; estimating p and uncertainty requires observed trial data. Report the success definition, source of p, exact event, and requested probability output. Explore Bernoulli masses, moments, and probability levels free at Distri Scope dot com.
How to read the result
The chart shows two bars whose heights are the two probabilities. Reading it is immediate, and that is the point: every claim about more complex count models can be traced back to a picture this simple.
The variance p(1−p) peaks at p=0.5 and falls toward zero at either extreme, which is why estimated proportions near one half carry the widest uncertainty for a fixed sample size.
Skewness is positive when p is below one half, negative above it, and zero exactly at one half; the asymmetry mirrors which outcome is rarer.
Inputs and parameter meaning
The only parameter is the success probability p, restricted here to the interior range 0.01 to 0.99. The endpoints would make the outcome certain, which is a degenerate distribution with zero variance rather than a random trial.
The support is exactly the two integers 0 and 1, so the point calculator only returns nonzero mass at those two values; any other x has probability zero by definition.
Interval probabilities follow the discrete convention used across this site: both integer endpoints are included, so the interval from 0 to 1 always has probability one.
Formula and available parameters
Density or probability mass
Cumulative distribution
Mean
Variance
- Probability of success (p): interactive range 0.01 to 0.99; default 0.5.
What the method is doing
All quantities are closed-form. The mass function is p at one and 1−p at zero, the CDF steps from 0 to 1−p at zero and to one at one, and the quantile function returns 0 when the requested probability is at most 1−p and 1 otherwise.
The summary panel reports the exact moments: mean p, variance p(1−p), skewness (1−2p)/√(p(1−p)), and excess kurtosis (1−6p(1−p))/(p(1−p)). These match the binomial formulas with n=1, which is a useful consistency check.
When p equals one half the two outcomes tie as modes; this page reports the larger outcome, matching the tie-breaking convention used for the binomial mode.
Worked example: one inspected unit
A production line historically produces conforming units 70% of the time, so a single inspection is modeled as X~Bernoulli(p=0.3) where X=1 marks a defect. The quality engineer wants the two outcome probabilities, the mean and variance of the defect indicator, and a statement of how this single-trial model scales to a batch.
- 1Write the two masses directly: P(X=1)=0.3 and P(X=0)=0.7. The chart shows exactly these two bars and nothing else, because no other outcome exists.
- 2Read the summary panel: the mean is p=0.3, the variance is 0.3×0.7=0.21, and the standard deviation is √0.21≈0.458.
- 3Compute the skewness (1−2×0.3)/√0.21≈0.873: positive, because the rarer outcome (a defect) sits on the right of the mass function.
- 4Scale up: a batch of 25 independent inspections with the same p is Binomial(n=25, p=0.3), with mean 25×0.3=7.5 defects—each binomial fact is a sum of 25 copies of this Bernoulli model.
Interpretation
Under the stated model a single unit is defective with probability 0.3. The variance 0.21 is close to its maximum possible value of 0.25, so individual outcomes are highly unpredictable even though the long-run rate is known; only aggregation across many trials produces stable counts.
Common mistakes
- Do not interpret p as a property of one specific unit. It is a long-run population rate; any single trial simply happens or does not, and probability statements describe the mechanism, not a hidden partial state of the unit.
- Do not average distinct groups into one p without checking that the mixture matters. A pooled probability can sit far from every subgroup rate, and downstream binomial calculations inherit the distortion.
- Do not forget the independence question when scaling to counts. Ten correlated trials are not Binomial(10, p), and the correlation usually inflates variance beyond what the Bernoulli building block predicts.
Limits and independent validation
This page models exactly one trial with a known p; it does not estimate p from data. Estimating a proportion with uncertainty belongs to the one-proportion tests and their confidence intervals in the hypothesis test calculator.
The parameter grid stops at 0.01 and 0.99. Rates outside that range are better handled by thinking about the rare outcome directly, and degenerate certain outcomes are not distributions in a useful sense.
Real binary data often exhibit drift or clustering; the model has no mechanism for either, and detecting them requires more data structure than a single trial provides.
Before using the result
- Check that the two outcome labels are defined operationally—what exactly counts as success—and that the definition matches the source of the claimed p. A rate measured under a different definition or period is a different parameter.
- When historical trials exist, compare the claimed p with the observed frequency and its Wilson interval from the one-proportion z test page; a claimed rate outside that interval deserves scrutiny before being used in planning.
- Recompute one summary by hand: the variance must equal p(1−p) exactly, so p=0.3 must show 0.21. A mismatch signals a data-entry error rather than a model subtlety.
Related modules and resources
Explore Other Probability Distributions
- Normal Distribution Calculator
- Binomial Distribution Calculator
- Poisson Distribution Calculator
- Exponential Distribution Calculator
- Gamma Distribution Calculator
- Beta Distribution Calculator
- Weibull Distribution Calculator
- Lognormal Distribution Calculator
- Continuous Uniform Distribution
- Student’s t Distribution
- Chi-Square Distribution
- F Distribution
- Bernoulli Distribution
- Geometric Distribution
- Negative Binomial Distribution
- Hypergeometric Distribution
- Cauchy Distribution
- Pareto Distribution
- Laplace Distribution
- Logistic Distribution
- Rayleigh Distribution
- Triangular Distribution
- Discrete Uniform Distribution
See every option in the Probability Distribution Explorer or review the DistriScope methodology. Educational information; last reviewed 2026-08-09. Verify consequential calculations independently.