Bernoulli Calculator Probability
Use this interactive Bernoulli distribution calculator to find the probability of success or failure for a single trial, plus the mean, variance, and standard deviation. It is ideal for yes-or-no events such as pass or fail, click or no click, defect or non-defect, and conversion or no conversion.
Enter a decimal from 0 to 1. Example: 0.65 means 65% chance of success.
A Bernoulli random variable takes only two values: 1 for success and 0 for failure.
Choose how many digits to show in the final answer.
Load a sample value to test how the Bernoulli model behaves.
Results
Enter a value for p and click the calculate button to see the Bernoulli probability, expected value, variance, and standard deviation.
Probability Visualization
The chart below compares the two possible outcomes in a Bernoulli trial. As you adjust p, the success bar changes to p and the failure bar changes to 1 – p. The spread is highest around p = 0.50, where uncertainty is greatest.
What is a Bernoulli calculator probability tool?
A Bernoulli calculator probability tool helps you evaluate the simplest random experiment in statistics: a trial with only two possible outcomes. In a Bernoulli setting, one outcome is labeled success and coded as 1, while the other is labeled failure and coded as 0. The entire distribution is determined by a single number, the success probability p. Once you know p, you know the probability of success, the probability of failure, the expected value, the variance, and the standard deviation.
This makes the Bernoulli distribution one of the most important building blocks in probability theory, data science, engineering, finance, biostatistics, quality control, and digital marketing. A website visitor either converts or does not convert. A part either passes inspection or fails inspection. A patient either responds to a treatment or does not. A bit in computer science is either 1 or 0. In each of these cases, one trial can be modeled using a Bernoulli random variable.
Bernoulli distribution formulas you should know
The Bernoulli distribution uses straightforward formulas, but they carry a lot of insight. If X is a Bernoulli random variable with success probability p, then:
- P(X = 1) = p
- P(X = 0) = 1 – p
- Mean: E[X] = p
- Variance: Var(X) = p(1 – p)
- Standard deviation: SD(X) = √(p(1 – p))
The key idea is that the average value of a Bernoulli random variable equals the success probability itself. That is why proportions and Bernoulli variables are so closely related. If you repeated the same trial many times under the same conditions, the long-run sample mean would estimate p.
How to interpret the mean and variance
The mean p is intuitive. If success has an 80% chance, the expected value is 0.80. The variance tells you how much uncertainty exists around that outcome. Interestingly, Bernoulli variance is largest at p = 0.50 and gets smaller as p moves closer to 0 or 1. That matches intuition: if success and failure are equally likely, the trial is most uncertain. If success is almost guaranteed, there is much less randomness.
| Success probability p | Failure probability 1 – p | Mean E[X] | Variance p(1 – p) | Standard deviation | Interpretation |
|---|---|---|---|---|---|
| 0.10 | 0.90 | 0.10 | 0.09 | 0.3000 | Rare success event with relatively low uncertainty |
| 0.25 | 0.75 | 0.25 | 0.1875 | 0.4330 | Success is possible but still meaningfully less likely than failure |
| 0.50 | 0.50 | 0.50 | 0.25 | 0.5000 | Maximum uncertainty because both outcomes are equally likely |
| 0.75 | 0.25 | 0.75 | 0.1875 | 0.4330 | Success is likely, but there is still visible randomness |
| 0.90 | 0.10 | 0.90 | 0.09 | 0.3000 | Very likely success with relatively low uncertainty |
How to use this Bernoulli probability calculator
- Enter the success probability p as a decimal between 0 and 1.
- Select the outcome you want to evaluate: success (X = 1) or failure (X = 0).
- Choose how many decimal places you want in the displayed answer.
- Click the calculate button.
- Review the probability, mean, variance, standard deviation, and the chart.
If you select success, the calculator returns p. If you select failure, it returns 1 – p. It also shows the expected value and variability of the Bernoulli trial, which helps you understand the distribution beyond a single probability statement.
Worked example
Suppose a machine produces a conforming part with probability 0.97. Let X = 1 if a part passes inspection and X = 0 if it fails. Then:
- P(X = 1) = 0.97
- P(X = 0) = 0.03
- E[X] = 0.97
- Var(X) = 0.97 × 0.03 = 0.0291
- SD(X) = √0.0291 ≈ 0.1706
That means each part is very likely to pass, and because p is close to 1, the uncertainty is smaller than it would be at p = 0.50.
When should you use a Bernoulli model?
You should use a Bernoulli model when all of the following are true:
- There is only one trial under consideration.
- There are exactly two possible outcomes.
- The outcomes can naturally be coded as success and failure.
- The success probability p is defined for that trial.
Typical examples include:
- A customer clicks an ad or does not click it.
- A loan applicant defaults or does not default.
- A user subscribes or does not subscribe.
- A medical test is positive or negative.
- A packet is transmitted correctly or incorrectly.
- A student answers a true-false question correctly or incorrectly.
Real-world intuition
Bernoulli models are often hidden inside bigger statistical systems. Logistic regression predicts probabilities for Bernoulli outcomes. A/B testing compares Bernoulli conversion rates between variants. Reliability models can start with Bernoulli pass-fail observations. Clinical outcomes such as treatment response, survival at a fixed endpoint, and adverse event occurrence can all be represented as Bernoulli data at the individual trial level.
Bernoulli vs binomial: what is the difference?
This is one of the most common points of confusion. A Bernoulli distribution describes a single trial. A binomial distribution describes the number of successes in n independent Bernoulli trials that all share the same success probability p. In other words, the binomial distribution is built from Bernoulli trials.
If one email recipient either opens an email or not, that is Bernoulli. If you send the email to 100 recipients and count how many open it, that count is binomial.
| Feature | Bernoulli distribution | Binomial distribution |
|---|---|---|
| What it models | One trial with success or failure | Total number of successes across n trials |
| Possible values | 0 or 1 | 0, 1, 2, …, n |
| Parameters | p | n and p |
| Mean | p | np |
| Variance | p(1 – p) | np(1 – p) |
| Example | Will one customer buy? | How many of 500 customers buy? |
Why the distinction matters
If you use the wrong model, your interpretation can drift. Bernoulli probability tells you about one event. Binomial probability tells you about a count. Many beginners enter a single-trial problem into a binomial framework and accidentally solve a different question. If your outcome is just one yes-or-no event, Bernoulli is usually the correct and simplest choice.
How Bernoulli probability connects to estimation and data science
In practice, p is often unknown. You estimate it from data. If you observe n Bernoulli trials and record the sample proportion of successes, that sample proportion is the natural estimator of p. This idea appears everywhere in analytics and machine learning. Conversion rate, defect rate, click-through rate, fraud rate, churn rate, and treatment response rate are all proportions built on Bernoulli observations.
For example, if 210 users out of 1,000 convert, the estimated Bernoulli success probability is 0.21. The individual observation for each user is Bernoulli, while the total number of conversions is binomial. This relationship is one reason Bernoulli models are foundational for modern experimentation, especially in digital product teams.
Connection to hypothesis testing
Bernoulli outcomes are also central to confidence intervals and significance tests for proportions. When analysts compare whether one landing page converts better than another, they are often comparing Bernoulli probabilities across two groups. When a manufacturing engineer checks whether a defect rate exceeds a target threshold, the underlying data are again Bernoulli observations summarized into a sample proportion.
Common mistakes when using a Bernoulli calculator
- Entering percentages instead of decimals: 65% should be entered as 0.65, not 65.
- Using more than two outcomes: If there are multiple categories, the Bernoulli model is not appropriate unless you recode the event into success or failure.
- Confusing one trial with many trials: Bernoulli is for one event; binomial is for counts across repeated events.
- Mislabeling success: Success does not mean something positive. It simply means the event of interest.
- Ignoring context: A mathematically correct probability still needs a sensible interpretation in the real world.
Authoritative references for Bernoulli probability
If you want to go deeper into the theory and applications behind this calculator, these sources are excellent starting points:
- NIST Engineering Statistics Handbook for practical statistical foundations used in science and engineering.
- Penn State STAT 414 Probability Theory for formal probability instruction, including discrete distributions.
- UC Berkeley Statistics for academic resources in probability and statistical modeling.
Frequently asked questions about Bernoulli calculator probability
Is a Bernoulli distribution discrete or continuous?
It is a discrete distribution because it can take only the values 0 and 1.
What does success mean in a Bernoulli trial?
Success simply means the event you want to track. It does not necessarily mean a good outcome. In fraud detection, for example, success could mean that fraud occurred.
Why is the mean equal to p?
Because a Bernoulli random variable is 1 with probability p and 0 with probability 1 – p. The expected value is 1×p + 0×(1 – p) = p.
Why is the variance highest at p = 0.50?
The variance is p(1 – p). This product reaches its maximum at 0.50, where the two outcomes are equally likely and uncertainty is greatest.
Can I use this calculator for repeated trials?
You can use it to understand the single-trial behavior and the underlying success probability, but if you want the distribution of counts over many trials, you need a binomial calculator.
Final takeaway
The Bernoulli calculator probability tool is simple, but it captures one of the deepest ideas in applied statistics: a single binary event can be quantified, interpreted, and connected to larger decision systems. Once you understand how to compute P(X = 1), P(X = 0), the mean p, and the variance p(1 – p), you have a foundation for binomial models, proportion estimation, logistic regression, quality control, reliability analysis, and online experimentation.