You flip a coin ten times and want to know the odds of landing exactly six heads. Or you’re checking a production line where 5% of parts are defective and need the probability that exactly two out of twenty fail. Both problems come down to one formula — and once you see the pattern, you’ll never forget it.
The Bernoulli formula gives the probability of getting exactly k successes in n independent trials, where each trial has only two outcomes and the same probability of success p each time: P(X = k) = C(n,k) · pᵏ · (1−p)ⁿ⁻ᵏ. It’s named after Jacob Bernoulli, who first proved it in Ars Conjectandi (1713).
What Is the Bernoulli Formula?
A Bernoulli trial is any experiment with exactly two possible outcomes — success or failure, heads or tails, defective or fine. Flip a coin once and you’ve run one Bernoulli trial. Run that same coin flip ten times in a row, and you’ve got a sequence of ten independent Bernoulli trials.
The Bernoulli formula — sometimes called the binomial probability formula — answers a specific question: out of n trials, what’s the probability of getting exactly k successes?
It’s named after Jacob Bernoulli (1654–1705), a Swiss mathematician from the famous Bernoulli family, who worked out the underlying logic decades before it was published in his book Ars Conjectandi in 1713, eight years after his death. He wasn’t the first person to think about probability, but he was the first to formalize what happens when you repeat the same yes/no experiment over and over — a question that seems simple until you actually try to count all the ways it can happen.
Here’s the intuition before the algebra. Say you flip a fair coin three times and want exactly two heads. The outcomes could be HHT, HTH, or THH — three different orders, same result. Each specific order has probability p²(1−p)¹, and there are three orders that work. Multiply the two together and you have your answer. The Bernoulli formula just automates that counting step for any n and any k, so you’re not listing outcomes by hand once n gets past 4 or 5.
A Quick Note on “Bernoulli’s Equation” vs. “Bernoulli’s Formula”
If your search also turned up something about pressure, fluid velocity, and airplane wings, that’s a different topic entirely — Bernoulli’s equation in fluid dynamics, developed by Jacob’s nephew Daniel Bernoulli. Same family, completely different field. This article covers the probability formula used in statistics and math courses. If you landed here looking for fluid mechanics, you’ll want a physics resource instead.
The Bernoulli Formula, Step by Step
Here’s the formula in full:
P(X = k) = C(n, k) · pᵏ · (1 − p)ⁿ⁻ᵏ
Some textbooks write it with q instead of (1−p), and r instead of k — same formula, different letters. You’ll also see it as P(X = k) = ₙCₖ pᵏ qⁿ⁻ᵏ.
Breaking Down Each Symbol
| Symbol | Meaning |
|---|---|
| n | Total number of trials |
| k (or r) | Number of successes you want |
| p | Probability of success on a single trial |
| q or (1−p) | Probability of failure on a single trial |
| C(n, k) | Number of ways to choose k successes out of n trials, calculated as n! / (k!(n−k)!) |
The binomial coefficient C(n, k) is the piece most students skip past too quickly — and it’s the piece doing the actual counting work. It tells you how many different orders of successes and failures produce the same total count. Without it, you’d only be calculating the probability of one specific sequence, not the probability of “any sequence with exactly k successes.”
Quick Takeaway: Multiply three things together — the number of arrangements, the probability of success raised to the number of successes, and the probability of failure raised to the number of failures. That’s the whole formula.
Conditions for Using the Bernoulli Formula
The formula only works cleanly if four conditions hold. Skip this checklist and you’ll apply the formula to problems it wasn’t built for — which is one of the most common grading-loss points in intro stats courses.
- Fixed number of trials. n is decided in advance, not determined by the outcome.
- Only two possible outcomes per trial. Success or failure — nothing in between.
- Constant probability of success. p must stay the same on every trial.
- Independent trials. The outcome of one trial can’t affect another.
That last condition trips people up the most. Drawing cards without replacement, for instance, breaks independence — the probability shifts after each draw because the deck changes. Drawing with replacement keeps p constant and the Bernoulli formula applies. Sampling from a huge population without replacement is often close enough to treat as independent, but strictly speaking, only sampling with replacement (or drawing from a technically infinite population) preserves true independence.
Bernoulli Distribution vs. Binomial Distribution
This is where most competing explanations get vague, and it’s worth being precise, because the two terms get used almost interchangeably online when they shouldn’t be.
A Bernoulli distribution describes a single trial with two outcomes. A binomial distribution describes the sum of n independent Bernoulli trials — how many successes you get across all of them.
| Bernoulli Distribution | Binomial Distribution | |
|---|---|---|
| Number of trials | 1 | n (any fixed number) |
| Parameters | p | n and p |
| What it models | Single yes/no outcome | Count of successes across n trials |
| PMF | P(X=x) = pˣ(1−p)¹⁻ˣ, x ∈ {0,1} | P(X=k) = C(n,k)pᵏ(1−p)ⁿ⁻ᵏ |
| Example | One coin flip | Ten coin flips, counting heads |
Put simply: a binomial distribution with n = 1 is a Bernoulli distribution. Every binomial random variable can also be written as the sum of n independent Bernoulli random variables — X = X₁ + X₂ + … + Xₙ, where each Xᵢ is 0 or 1. That relationship is why the two names get blended together in casual explanations, but on an exam, mixing them up will cost you points.
Worked Examples of the Bernoulli Formula
Example 1 — The Classic Coin Toss
A fair coin is flipped 5 times. What’s the probability of getting exactly 3 heads?
- n = 5, k = 3, p = 0.5, q = 0.5
- C(5,3) = 5! / (3!·2!) = 10
- P(X=3) = 10 × (0.5)³ × (0.5)² = 10 × 0.125 × 0.25 = 0.3125
There’s roughly a 31% chance of landing exactly 3 heads in 5 flips.
Example 2 — Quality Control on a Production Line
A factory knows 10% of the widgets it produces are defective. If 8 widgets are randomly sampled, what’s the probability that exactly 2 are defective?
- n = 8, k = 2, p = 0.1, q = 0.9
- C(8,2) = 8! / (2!·6!) = 28
- P(X=2) = 28 × (0.1)² × (0.9)⁶ = 28 × 0.01 × 0.531441 ≈ 0.1488
About a 14.9% chance of exactly 2 defective widgets in that sample of 8.
Example 3 — “At Least” Probability
A basketball player makes free throws 70% of the time. In 4 attempts, what’s the probability of making at least 3?
This needs two applications of the formula, then adding the results — “at least 3” means 3 successes or 4 successes.
- P(X=3): C(4,3) × (0.7)³ × (0.3)¹ = 4 × 0.343 × 0.3 = 0.4116
- P(X=4): C(4,4) × (0.7)⁴ × (0.3)⁰ = 1 × 0.2401 × 1 = 0.2401
- P(X≥3) = 0.4116 + 0.2401 = 0.6517
About a 65% chance of hitting at least 3 of 4 free throws. This “add up the individual probabilities” approach is exactly how you handle any cumulative question — at least, at most, or between two values.
Mean, Variance, and Expected Value
Once you’re comfortable with the formula itself, two summary numbers come up constantly in coursework:
Expected value (mean): E(X) = np
Variance: Var(X) = np(1−p), often written np·q
Standard deviation: σ = √(np(1−p))
Take Example 2 above: n = 8, p = 0.1. Expected number of defective widgets = 8 × 0.1 = 0.8. Variance = 8 × 0.1 × 0.9 = 0.72. Standard deviation ≈ 0.85. In plain terms — across many samples of 8 widgets, you’d expect about 0.8 defective units on average, with a typical spread of under one unit either way. These formulas save you from summing every individual probability just to find an average outcome.
Common Mistakes Students Make with Bernoulli’s Formula
Confusing p and q. It sounds trivial, but plugging the failure probability into the success slot (or vice versa) is the single most common arithmetic error on this topic. Always label which value is p before you start calculating.
Forgetting the binomial coefficient entirely. Some students calculate pᵏ(1−p)ⁿ⁻ᵏ and stop there — that’s the probability of one specific ordering, not the probability of exactly k successes in any order. Skipping C(n,k) undercounts every answer.
Applying the formula when trials aren’t independent. Sampling without replacement from a small group, or situations where one outcome influences the next, technically violate the independence condition. In those cases, you need a hypergeometric distribution instead, not the Bernoulli formula.
Mixing up “exactly k” with “at least k.” “Exactly 3 successes” is one calculation. “At least 3” requires summing multiple k values. Misreading the question is a frequent source of wrong answers even when the arithmetic is correct.
Treating n as fixed when it isn’t. If the number of trials depends on when a success first occurs (e.g., “how many flips until you get heads?”), that’s a geometric distribution problem, not a Bernoulli/binomial one.
Real-World Applications of the Bernoulli Formula
This isn’t just a textbook exercise — the same math shows up across fields:
- Quality control and manufacturing: estimating defect rates in a batch, as in Example 2.
- Medicine and clinical trials: probability that a treatment works in exactly k out of n patients, or that a diagnostic test returns a given number of positives.
- Genetics: probability that a specific number of offspring inherit a particular trait, given fixed inheritance odds.
- Machine learning: the Bernoulli distribution underlies binary classification problems (spam vs. not spam, fraud vs. not fraud) and is the basis of Bernoulli Naive Bayes classifiers.
- Polling and survey sampling: estimating the probability of a specific number of “yes” responses in a sample, assuming independence.
- Reliability engineering: probability that exactly k out of n components survive a stress test.
Calculating Bernoulli Probability with a Calculator or Excel
You rarely need to compute factorials by hand once you understand the logic:
- Excel/Google Sheets:
=BINOM.DIST(k, n, p, FALSE)gives P(X=k) exactly. SwitchFALSEtoTRUEfor the cumulative probability P(X≤k). - TI-84 calculator:
binompdf(n, p, k)for exact probability;binomcdf(n, p, k)for cumulative probability. - R:
dbinom(k, n, p)for exact;pbinom(k, n, p)for cumulative.
These tools are useful for checking your work, but understanding the formula by hand is what actually gets tested — and what makes the tool’s output make sense instead of feeling like a black box.
Putting It Together
The Bernoulli formula boils down to three moving parts: how many ways an outcome can happen (the binomial coefficient), how likely success is (p), and how likely failure is (1−p). Once those three pieces click, you can handle coin flips, defect rates, free-throw percentages, or any other fixed-trial, two-outcome problem the same way. Work through the three examples above by hand at least once before reaching for a calculator — that’s what actually cements the pattern. From there, the natural next step is practicing with the Bernoulli vs. binomial distinction and cumulative (“at least/at most”) problems, since those two areas cause the most confusion on tests.
For a complete list of maths formulas, click here.
FAQ Section
What is Bernoulli’s formula? It’s a formula that calculates the probability of getting exactly k successes in n independent trials, where each trial has a fixed probability of success p. Written as P(X=k) = C(n,k)pᵏ(1−p)ⁿ⁻ᵏ, it’s also called the binomial probability formula.
What is a Bernoulli trial? A Bernoulli trial is a single experiment with exactly two possible outcomes — typically labeled success and failure — where the probability of success stays constant every time the experiment is repeated.
What is the difference between Bernoulli and binomial distribution? A Bernoulli distribution models one trial with two outcomes. A binomial distribution models the total number of successes across n repeated Bernoulli trials. A binomial distribution with n=1 is identical to a Bernoulli distribution.
How do you calculate Bernoulli probability? Identify n (trials), k (successes wanted), and p (probability of success). Plug them into P(X=k) = C(n,k)pᵏ(1−p)ⁿ⁻ᵏ, calculating the binomial coefficient first, then multiplying by the probability terms.
What are the conditions for Bernoulli’s formula? Four conditions must hold: a fixed number of trials, only two possible outcomes per trial, a constant probability of success across trials, and independence between trials.
Who discovered Bernoulli’s formula? Jacob Bernoulli, a Swiss mathematician, developed the formula and published it in his book Ars Conjectandi in 1713, eight years after his death.
What is p and q in Bernoulli’s formula? p is the probability of success on a single trial; q (equivalently 1−p) is the probability of failure. Together they must add up to 1.
Is Bernoulli’s formula the same as the binomial formula? Yes — “Bernoulli’s formula” and “binomial probability formula” refer to the same equation. Some sources use “Bernoulli distribution” specifically for the single-trial case and “binomial” for the multi-trial case, even though the underlying formula is shared.