bernoulli calculator

Bernoulli Distribution Calculator

Compute probabilities and key distribution statistics for a Bernoulli random variable.

Enter a decimal between 0 and 1, or a percent up to 100.
Leave blank to display both P(X=0) and P(X=1).

A Bernoulli model is one of the simplest and most useful probability tools in statistics. If your experiment has only two outcomes (success/failure, yes/no, pass/fail, click/no click), you can model it with a Bernoulli random variable. This calculator helps you do that quickly and accurately.

What is a Bernoulli random variable?

A Bernoulli random variable X takes only two values:

  • X = 1 with probability p (success)
  • X = 0 with probability 1 - p (failure)

That’s it. One trial, two outcomes, one parameter.

Probability mass function (PMF):
P(X = x) = px(1 - p)1 - x, for x ∈ {0, 1}

What this Bernoulli calculator gives you

When you enter a valid probability p, this tool computes:

  • Probability of success: P(X=1) = p
  • Probability of failure: P(X=0) = 1-p
  • Optional point probability for chosen x (0 or 1)
  • Mean (expected value): E[X] = p
  • Variance: Var(X) = p(1-p)
  • Standard deviation: √(p(1-p))
  • Success odds: p/(1-p)

How to use it

Step 1: Enter probability of success

Use either decimal format (like 0.3) or percent format (like 30%). The tool accepts both.

Step 2: (Optional) Enter an outcome x

If you enter x = 0 or x = 1, the calculator will also return P(X=x) using the Bernoulli PMF formula.

Step 3: Click Calculate

You’ll get a compact summary of all key Bernoulli outputs.

Quick examples

Example 1: Coin flip (biased)

If the probability of heads is p = 0.6:

  • P(X=1) = 0.6
  • P(X=0) = 0.4
  • Mean = 0.6
  • Variance = 0.24

Example 2: Email open event

Suppose a campaign has open probability p = 25% (0.25). For one recipient:

  • Probability they open = 0.25
  • Probability they don’t open = 0.75
  • Expected opens per recipient = 0.25

Bernoulli vs Binomial

This is a common point of confusion:

  • Bernoulli: one trial
  • Binomial: many independent Bernoulli trials

If you repeat the same Bernoulli experiment n times, the total number of successes follows a Binomial distribution.

Common mistakes to avoid

  • Entering p outside [0,1] (or outside 0% to 100%)
  • Using outcomes other than 0 or 1 for a Bernoulli variable
  • Confusing probability with odds
  • Applying Bernoulli to problems with more than two outcomes

Why this matters

Bernoulli modeling appears everywhere: product analytics, A/B testing, medical diagnosis, quality control, and finance risk events. Once you understand Bernoulli distributions, more advanced models become much easier to learn.

🔗 Related Calculators