Interactive module guide
Binomial Distribution Calculator & Guide
The binomial distribution models the number of successes in a fixed number of trials when every trial has two defined outcomes, the same success probability, and independence under the study design.
Its parameters are the trial count n and success probability p.
Use the explorer to inspect exact masses and cumulative probabilities for counts; do not apply it to an unconstrained event stream or to trials whose probabilities change materially.
Free · No sign-up · Calculations stay in your browser
Is this the right module for my question?
Use it when
- Use a binomial model when the experiment fixes n before observing outcomes and the random variable is the total number of successes. Examples include defects among a specified number of inspected units, positive responses among enrolled participants, or correct answers on a fixed set of comparable independent items.
- The success label is a definition, not a value judgment. A failure event, adverse event, or defective item can be designated “success” mathematically if it is the event being counted. State the coding clearly because replacing p with 1−p changes which end of the count scale is emphasized.
- The model is valuable for exact probabilities such as P(X=4), cumulative events such as P(X≤4), and upper events such as P(X≥4). Because X is discrete, endpoint inclusion matters and should be written explicitly before using a complement.
Choose another method when
- Do not use the binomial distribution when the number of opportunities is itself random, when more than two outcome categories are retained, or when the success probability differs across trials. A Poisson, multinomial, beta-binomial, or hierarchical model may better match those mechanisms.
- Independence can fail in clustered samples, repeated measurements from the same person, contagious events, or sampling without replacement from a small population. Dependence changes the variance even if the expected count remains close to np.
Interactive tool
The calculator loads as you approach this section so the guide remains fast on mobile connections.
How to read the result
A PMF bar reports the probability of one exact count, so its height can be read directly as P(X=k). The CDF at k adds the masses from zero through k. Because the distribution is discrete, the CDF changes in steps rather than along a smooth curve.
A small probability says the specified count is unusual under the chosen n and p. It does not demonstrate that p has changed, that trials are dependent, or that data are fraudulent. Those are competing explanations requiring an inferential design and supporting evidence.
Inputs and parameter meaning
Enter n as a nonnegative whole number representing the fixed number of trials. The support is exactly 0 through n; fractional counts and values above n are impossible. A large n does not repair a design in which trials are dependent or p is unstable.
Enter p between zero and one as the probability of the defined success on each trial. Use 0.2 for a 20% probability, not 20. The expected count is np, while the variance is np(1−p); variability is greatest near p=0.5 for a fixed n and shrinks as p approaches either boundary.
When requesting a cumulative result, distinguish “fewer than k” from “at most k.” For an integer-valued X, P(X<k)=P(X≤k−1). Similarly, P(X≥k)=1−P(X≤k−1), not 1−P(X≤k).
Formula and available parameters
Density or probability mass
Mean
Variance
- Number of trials (n): interactive range 1 to 100; default 20.
- Probability of success (p): interactive range 0.01 to 0.99; default 0.5.
What the method is doing
The mass at k combines the number of distinct trial sequences containing k successes, choose(n,k), with the probability of any one such sequence, p^k(1−p)^(n−k). This reasoning depends on exchangeable trials with a common p; the combinatorial coefficient alone does not create a binomial process.
The distribution is symmetric only when p=0.5. For p below one half it is typically right-skewed, and for p above one half it is left-skewed. As n grows while expected successes and failures are both comfortably large, a continuity-corrected normal approximation can be useful, but the explorer computes the binomial model directly.
Worked example: defects in a fixed inspection batch
A line historically produces a defective unit with probability p=0.04 under stable conditions. An inspector selects n=25 units using a design that makes the Bernoulli approximation reasonable and asks for the probability of observing at least two defective units in the batch.
- 1Define X as the number of defective units among the 25 inspected items, so X~Binomial(25,0.04). The required event is P(X≥2), which is easiest to compute as 1−P(X≤1).
- 2Use the CDF at k=1 or add the exact masses for zero and one defect. P(X=0)=0.96^25 and P(X=1)=25(0.04)(0.96^24). Their sum is about 0.736, leaving an upper probability of about 0.264.
- 3Check the expected count np=1 and expected nondefects n(1−p)=24. Because expected successes are small, a symmetric normal approximation would be poor; the exact discrete calculation is the more appropriate result here.
Interpretation
If the historical p=0.04 model and trial assumptions hold, batches with two or more defective units occur about 26% of the time. That rate is not sufficiently rare by itself to establish a process shift. A monitoring rule should be designed in advance and account for repeated batches, sampling dependence, and the cost of false alarms.
Common mistakes
- A frequent endpoint error is using 1−F(k) for P(X≥k); this actually gives P(X>k). Subtract F(k−1) when the threshold count is included.
- Do not treat sampling without replacement as independent when the sample is a substantial fraction of a finite population. The hypergeometric distribution captures that changing probability exactly.
- Do not insert an observed sample proportion as if it were a known p and then describe the result as an inferential p-value. A probability calculation under a chosen model and a hypothesis test about p answer different questions.
Limits and independent validation
The explorer assumes a common p and independent trials. It does not estimate overdispersion, intracluster correlation, or uncertainty in p. Real production, biological, and survey data often violate these simplifications.
Rare-event probabilities can be sensitive to small changes in p, particularly at large n. Validate the value of p and perform a sensitivity calculation before using a tail result in planning or risk decisions.
Before using the result
- Verify that n was fixed, that every unit had the same operational success definition, and that the design supports approximate independence. Compare the observed variation across repeated batches with np(1−p) when enough historical data exist.
- Recompute the requested event from explicit exact masses or with an independent binomial CDF. Record whether each boundary is inclusive and retain enough digits to avoid a complement dominated by rounding.
Related modules and resources
See every option in the Probability Distribution Explorer or review the DistriScope methodology. Educational information; last reviewed 2026-08-06. Verify consequential calculations independently.