Bernoulli Distribution Calculator

Calculate properties of a Bernoulli distribution for binary (success/failure) outcomes

About Bernoulli Distribution

The Bernoulli distribution is the simplest discrete probability distribution, representing a single trial with two possible outcomes: success (1) or failure (0).

Properties:

  • Mean: E[X] = p
  • Variance: Var[X] = p(1-p)
  • Only two possible outcomes: 0 or 1

Example: Flipping a coin once - heads (success) or tails (failure).

What Is the Bernoulli Distribution?

The Bernoulli distribution is the simplest discrete probability distribution in statistics. Named after Swiss mathematician Jacob Bernoulli, it models a single random experiment with exactly two possible outcomes: success (coded as 1) or failure (coded as 0). Every yes/no, pass/fail, or heads/tails scenario is a Bernoulli trial.

The entire distribution is defined by a single parameter p — the probability of success. Given p, the probability of failure is simply q = 1−p. Despite its simplicity, the Bernoulli distribution is the building block of more complex distributions: the binomial distribution is the sum of independent Bernoulli trials, and the geometric distribution counts Bernoulli trials until the first success.

This calculator takes the probability of success p and instantly computes all key properties: success and failure probabilities, mean, variance, standard deviation, skewness, and kurtosis.

Bernoulli Distribution Formula

The probability mass function (PMF) of the Bernoulli distribution is elegantly simple. For a random variable X that takes values 0 or 1, the PMF gives the probability of each outcome directly from the parameter p.

Bernoulli PMF & Properties

P(X=x) = p^x × (1−p)^(1−x), with E[X] = p, Var[X] = p(1−p)

Where:

  • p= Probability of success (1). Must be between 0 and 1.
  • q = 1−p= Probability of failure (0). Complementary to p.
  • X= Random variable that takes value 1 (success) or 0 (failure)
  • E[X]= Expected value (mean) of the distribution, equal to p
  • Var[X]= Variance = p(1−p). Maximum of 0.25 when p = 0.5.

Understanding Bernoulli Properties

The Bernoulli distribution has several notable statistical properties. The mean equals p — intuitively, the expected value of a single trial is simply the probability of success. The variance p(1−p) is maximized at p = 0.5 (where uncertainty is highest) and approaches 0 as p nears 0 or 1 (where the outcome becomes nearly certain).

Probability p Mean Variance Interpretation
0.10.100.09Success is rare — highly skewed
0.50.500.25Maximum uncertainty — symmetric
0.90.900.09Success is highly likely — skewed opposite

The skewness is (1−2p) / √(p(1−p)), so it is positive when p < 0.5, negative when p > 0.5, and zero when p = 0.5 (symmetric). Kurtosis is (1−6p(1−p)) / (p(1−p)), which shows how peaked or flat the distribution is relative to a normal curve.

How to Use This Calculator

Using the Bernoulli Distribution Calculator requires just one input:

  1. Enter probability of success p: Type a decimal between 0 and 1. For example, 0.3 means a 30% chance of success per trial. The calculator accepts any value in this range.
  2. Read the results: The calculator instantly displays the probability of success and failure (as percentages), along with the mean, variance, standard deviation, skewness, and kurtosis of the distribution.

This is the foundation distribution for understanding binary outcomes — a single coin flip, one yes/no survey response, or whether a manufactured item passes inspection.

Real-World Applications

The Bernoulli distribution models countless real-world binary scenarios. In quality control, each manufactured item either passes or fails inspection — the Bernoulli parameter p represents the defect rate. Factories track this p over time to detect shifts in quality using control charts.

In clinical trials, each patient's response to treatment is binary: effective or not effective. The Bernoulli model forms the basis for calculating sample sizes and analyzing binary endpoints. In credit scoring, each loan applicant either defaults or repays, and the default probability p drives lending decisions and risk models.

In A/B testing and conversion optimization, each website visitor either converts (success) or doesn't (failure), and the conversion rate is the Bernoulli parameter. Statistical tests compare conversion rates between different page variants to determine which design performs better.

Worked Examples

Coin Flip Analysis

Problem:

A fair coin has an equal chance of landing heads or tails. Model a single flip as a Bernoulli trial with p = 0.5. What are the distribution properties?

Solution Steps:

  1. 1Step 1: Enter p = 0.5 into the probability of success field.
  2. 2Step 2: The calculator computes: P(success) = 50%, P(failure) = 50%. Mean = 0.5. Variance = 0.5 × 0.5 = 0.25.
  3. 3Step 3: Standard deviation = √0.25 = 0.5. Skewness = (0.5−0.5)/0.5 = 0 — perfectly symmetric.
  4. 4Step 4: Kurtosis = (1−6×0.5×0.5) / (0.5×0.5) = (1−1.5)/0.25 = −2.

Result:

The fair coin has mean 0.5, variance 0.25, zero skewness (perfectly symmetric), and negative kurtosis (−2). The negative kurtosis reflects that a binary distribution with equal probabilities is flatter than a bell curve at the peak.

Quality Control Inspection

Problem:

A factory has a 95% pass rate for its products. Model the inspection of a single item as a Bernoulli trial. What is the variance and what does it tell us?

Solution Steps:

  1. 1Step 1: Enter p = 0.95 into the calculator.
  2. 2Step 2: P(success) = 95%. Mean = 0.95. This is the expected outcome per item — nearly always a pass.
  3. 3Step 3: Variance = 0.95 × 0.05 = 0.0475. The variance is small because the outcome is highly predictable.
  4. 4Step 4: Skewness = (0.05−0.95) / √0.0475 = −0.9 / 0.218 ≈ −4.13 — strongly negative because success is much more common.

Result:

With p = 0.95, the variance is only 0.0475 — most items pass, so there's little variability. The strong negative skewness (−4.13) reflects that failures are rare but extreme relative to the typical outcome of success.

Marketing Email Campaign

Problem:

A marketing team estimates a 12% click-through rate for an email campaign. Model a single recipient's behavior as a Bernoulli trial. What can the distribution tell us?

Solution Steps:

  1. 1Step 1: Enter p = 0.12 into the calculator.
  2. 2Step 2: P(success) = 12%, P(failure) = 88%. Mean = 0.12 — on average, 12 clicks per 100 emails.
  3. 3Step 3: Variance = 0.12 × 0.88 = 0.1056. Standard deviation = √0.1056 ≈ 0.325.
  4. 4Step 4: For a campaign of 1000 recipients, the total clicks follow a binomial distribution Bin(1000, 0.12) — the sum of 1000 independent Bernoulli trials.

Result:

Each recipient has a 12% chance of clicking. The Bernoulli variance (0.1056) per recipient tells us about individual uncertainty — most recipients won't click, making the distribution positively skewed. For campaign-level planning, the binomial distribution extends this single-trial model.

Tips & Best Practices

  • The Bernoulli distribution is the foundation — understand it well before tackling binomial, geometric, or negative binomial distributions.
  • Maximum variance occurs at p = 0.5 — if you want to minimize variability in binary outcomes, push p closer to 0 or 1.
  • When reporting Bernoulli results, always include both p and the sample size n — a single trial has limited information.
  • Skewness flips sign at p = 0.5 — positive for p < 0.5 (success is rarer), negative for p > 0.5 (success is more common).
  • Use the Bernoulli model for designing experiments: the variance p(1−p) helps calculate required sample sizes.

Frequently Asked Questions

A Bernoulli distribution models a single trial with two outcomes (success/failure). The binomial distribution models the number of successes in n independent Bernoulli trials. The binomial is the sum of n Bernoulli random variables. If X~Bernoulli(p), then Y = ΣX_i ~ Binomial(n, p).
Uncertainty is highest when success and failure are equally likely. When p = 0.5, the outcome is maximally unpredictable — you would guess wrong half the time. The variance formula p(1−p) reaches its maximum of 0.25 at p = 0.5 and decreases symmetrically toward 0 as p approaches 0 or 1.
Technically yes, but these are degenerate cases: p = 0 means failure is certain, and p = 1 means success is certain. In both cases, the variance is zero and there is no randomness — the trial always produces the same result. Real-world applications almost always have p strictly between 0 and 1.
Skewness measures the asymmetry of the distribution. When p < 0.5, skewness is positive because success (1) is rarer than failure (0), pulling the mean toward zero. When p > 0.5, skewness is negative. When p = 0.5, skewness is zero — the distribution is perfectly symmetric around the mean.
Bernoulli distributions are fundamental in machine learning, especially in binary classification. Logistic regression and neural network classifiers output a probability p (between 0 and 1) for the positive class. The Bernoulli likelihood function is used to train these models through maximum likelihood estimation and cross-entropy loss.

Sources & References

Last updated: 2026-06-06

💡

Help us improve!

How would you rate the Bernoulli Distribution Calculator?

<>

Editorial Note

MyCalcBuddy Editorial Team

This page is maintained as an educational calculator reference.

Source

Formula Source: Standard Mathematical References

by Various

UpdatedLast reviewed: May 2026
CheckedFormula checks are based on standard references and internal QA review.