Adjust trials n and success probability p to visualize the binomial distribution B(n,p) — PMF, CDF, region probabilities, plus Poisson and normal approximations — updated in real time.
Parameters
P(k) =—
Presets
Results
Mean μ = np
—
Standard deviation σ
—
Skewness γ₁
—
Mode
—
Pmf
Blue bars: P(X=k); red line: query k position
Cdf
Cumulative distribution function F(k)=P(X≤k). The step shape is characteristic of a discrete distribution.
Approx
Blue: binomial distribution (exact); green: normal approximation; orange: Poisson approximation. Change n and p to compare accuracy.
🙋 How do you calculate the number of heads when flipping a coin 20 times?
🙋
If you flip a coin 20 times, there are only heads and tails, and each flip is independent, right? How do you calculate the probability of getting exactly k heads?
🎓
That's the binomial distribution. P(X=k) = C(n,k) × p^k × (1-p)^(n-k). For example, the probability of getting exactly 10 heads when flipping a coin (p=0.5) n=20 times is C(20,10)×0.5^20 ≈ 17.6%. Set n=20, p=0.5 in this simulator and check k=10—you'll get the answer instantly.
🙋
In the 'Approximation Comparison' tab, I see 'Normal Approximation' and 'Poisson Approximation.' When are these used?
🎓
The normal approximation works well when n is large and p is close to 0.5, with a rule of thumb being np≥5 and n(1-p)≥5. For n=100, p=0.3, the bar chart of the binomial distribution becomes almost bell-shaped like a normal distribution. The Poisson approximation, on the other hand, is used when n is large and p is very small—rare events like a factory defect rate (p=0.01). Try the 'Defective Preset' and you'll see the Poisson approximation matches almost perfectly.
🙋
When I want to find the probability over a range, like 'P(k ≤ 6) = ?', I use the cumulative distribution function CDF, right?
🎓
Exactly. The CDF F(k) = P(X ≤ k) is the sum of all probabilities up to k. In this tool's 'Query' field, set the operator to '≤' and k=6, and you'll get P(X≤6) instantly. For an interval probability like P(3≤X≤8), compute F(8) − F(2). This directly connects to practical questions in quality control, like 'What is the probability that the number of defective items is 5 or fewer?'
🙋
I see a metric called 'Skewness,' and it looks completely different when p=0.5 versus p=0.1.
🎓
Skewness γ₁ = (1-2p)/√(np(1-p)). When p=0.5, γ₁=0 (perfectly symmetric). As p approaches 0, it becomes positively skewed (long right tail); as p approaches 1, it becomes negatively skewed (long left tail). This matches the intuition that 'rarer events produce more skewed distributions.' As n increases, the √n in the denominator reduces skewness—this connects to the central limit theorem.
🙋
In election exit polls, they often say 'margin of error ±3%.' Is that related to the binomial distribution?
🎓
Directly. When you ask n people yes or no, the number of 'yes' responses follows a binomial distribution B(n, p). The standard error is σ/√n = √(p(1-p)/n). The 95% confidence interval is p̂ ± 1.96√(p̂(1-p̂)/n). For n=1000, p̂=0.5, this gives ±3.1%, showing that the common '±3% margin of error' in exit polls corresponds to a survey of about n=1000. Set n=1000, p=0.5 in this simulator and you'll see that σ becomes quite small.
Frequently Asked Questions
Four conditions are required: ① each trial is independent, ② each trial has only two outcomes ('success' or 'failure'), ③ the success probability p is constant across trials (Bernoulli trials), and ④ the number of trials n is fixed. If you draw cards without replacement (non-replenishing sampling), the trials are not independent, so you should use the hypergeometric distribution instead of the binomial distribution.
When n is large and p is small (λ = np is moderate), the approximation B(n,p) ≈ Poisson(λ) can be used. A practical rule of thumb is n≥20 and p≤0.05 (or np≤10). Example: For a factory defect rate p=0.01 and inspection count n=100, the Poisson approximation with λ=1 can be used. If n is small or p is large, use the binomial distribution directly.
When approximating a discrete binomial distribution with a continuous normal distribution, the continuity correction adds a ±0.5 margin: P(X=k) ≈ P(k-0.5 ≤ Y ≤ k+0.5). This improves accuracy over using no continuity correction. Example: For approximating P(X≤5), compute P(Y≤5.5) with continuity correction. The effect of continuity correction is more pronounced for smaller sample sizes.
To test the null hypothesis H₀: p = p₀ for a population proportion p₀, calculate the P-value from B(n, p₀) based on the observed number of successes k. Example: To check if a coin is fair (p=0.5), with n=100 flips and k=60 heads, compute the p-value = P(X≥60|p=0.5) from the CDF. If it falls below 0.05, reject p=0.5. You can check P(X≥k) in the cumulative distribution tab of this simulator.
The binomial distribution applies to sampling with replacement (independent trials, constant p), while the hypergeometric distribution applies to sampling without replacement (success probability changes with each trial). Example: When drawing n cards from a deck of N cards with K winning cards, the number of wins follows the hypergeometric distribution HG(N,K,n). If n is sufficiently small relative to N (n/N < 0.05), the binomial distribution can be used as an approximation.
What is Binomial Distribution?
Binomial Distribution is a fundamental topic in engineering and applied physics. This interactive simulator lets you explore the key behaviors and relationships by directly manipulating parameters and observing real-time results.
By combining numerical computation with visual feedback, the simulator bridges the gap between abstract theory and physical intuition — making it an effective learning tool for students and a rapid-verification tool for practicing engineers.
Physical Model & Key Equations
The simulator is based on the governing equations behind Binomial Distribution Simulator. Understanding these equations is key to interpreting the results correctly.
Each parameter in the equations corresponds to a slider in the control panel. Moving a slider changes the equation's solution in real time, helping you build a direct connection between mathematical expressions and physical behavior.
Real-World Applications
Engineering Design: The concepts behind Binomial Distribution Simulator are applied across mechanical, structural, electrical, and fluid engineering disciplines. This tool provides a quick way to estimate design parameters and sensitivity before committing to full CAE analysis.
Education & Research: Widely used in engineering curricula to connect theory with numerical computation. Also serves as a first-pass validation tool in research settings.
CAE Workflow Integration: Before running finite element (FEM) or computational fluid dynamics (CFD) simulations, engineers use simplified models like this to establish physical scale, identify dominant parameters, and define realistic boundary conditions.
Common Misconceptions and Points of Caution
Model assumptions: The mathematical model used here relies on simplifying assumptions such as linearity, homogeneity, and isotropy. Always verify that your real system satisfies these assumptions before applying results directly to design decisions.
Units and scale: Many calculation errors arise from unit conversion mistakes or order-of-magnitude errors. Pay close attention to the units shown next to each parameter input.
Validating results: Always sanity-check simulator output against physical intuition or hand calculations. If a result seems unexpected, review your input parameters or verify with an independent method.