Tool for performing probability calculations with the binomial distribution, number of k successes, average odds, etc.
Binomial Distribution - dCode
Tag(s) : Combinatorics
dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!
The binomial distribution is a model (a law of probability) which allows a representation of the average number of successes (or failures) obtained with a repetition of successive independent trials.
$$ P(X=k) = {n \choose k} \, p^{k} (1-p)^{n-k} $$
with $ k $ the number of successes, $ n $ the total number of trials/attempts/expériences, and $ p $ the probability of success (and therefore $ 1-p $ the probability of failure).
The binomial distribution can be used in situations with 2 contingencies (success or failure, true or false, toss or tails, etc.) that can be repeated and independent.
Example: Calculation of the probability to draw 4 times the number 6 after 5 successive dice rolls: the probability $ p $ to make a 6 is $ 1/6 $, the total number of trials is $ n = 5 $, the total number of successes expected is $ k = 4 $. $$ P(X=4) = {5 \choose 4} \, \left(\frac{1}{6}\right)^4 \left(1-\frac{1}{6}\right)^{5-4} = {5 \choose 4} \left(\frac{1}{6}\right)^4 \left(\frac{5}{6}\right)^1 = \frac{5^2}{6^5} \approx 0.00321 \approx 0.3% $$
Exercises involving the binomial distribution look like:
— A person randomly draws a card 10 times from a deck of 52 cards. What is the probability that she draws at least 7 red color cards?
— A basketball player hits 60% of his free throws. If the player attempts 10 free throws, what is the probability that he will hit exactly 8?
— A merchant has a conversion rate of 10% on his online sales site. If 200 people visit his site, what is the probability that 50% will make a purchase?
— A medicine has a 75% success rate in relieving an illness. If given to 10 patients, what is the probability that at least 8 patients will feel better after taking the drug?
The formula for the binomial distribution involves the binomial coefficient $ {n \choose k} $ (which can be read as a combination of $ k $ among $ n $).
It is sometimes called Two-outcome distribution and is closely related to Bernoulli distribution.
dCode retains ownership of the "Binomial Distribution" source code. Any algorithm for the "Binomial Distribution" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Binomial Distribution" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "Binomial Distribution" or any other element are not public (except explicit open source licence like Creative Commons). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.
The content of the page "Binomial Distribution" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source.
Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).
To cite dCode.fr on another website, use the link:
In a scientific article or book, the recommended bibliographic citation is: Binomial Distribution on dCode.fr [online website], retrieved on 2025-04-16,