Skip to the calculator
Rule Calculator

Binomial Calculator

With trials 20, successes 12, probability of success each trial 50 %, binomial comes to 12.0134 % — chance of exactly k. It is reached in 6 steps, the last of which is 0.1201344 * 100, and each one is printed on the page with its numbers filled in. The formula is the one published by NIST/SEMATECH e-Handbook, not an approximation fitted to it.

The probability of exactly k successes in n independent trials, with the cumulative tails, the mean and the standard deviation.

Formula and sources checked · How we check

Trials 20, Successes 12, Probability of success each trial 50

12.0134 %

Chance of exactly k for the example below. Editing a field recomputes the calculator below; this figure holds the answer the page was loaded with.

It is written into the HTML rather than drawn by a script, so a search engine reading this page without running JavaScript still finds an answer.

Chance of exactly k
12.0134 %
Ways to choose k from n
combinations(20, max(0, min(12, 20)))125,970 ways
P(X = k)
125970 * 0.5 ^ 12 * (1 - 0.5) ^ (20 - 12)0.12
P(X = k) as a percentage
0.1201344 * 10012.013 %
Mean, np
20 * 0.510 successes
Standard deviation
sqrt(5)2.236 successes
How many deviations k is from the mean
(12 - 10) / 2.2360680.894 σ

Ask about this in the chat

Worked example

Twelve heads in twenty fair tosses happens 12.014% of the time — the single likeliest count is ten at 17.62%, and twelve is only two-thirds as likely. The mean is 10 with a standard deviation of 2.236, so twelve sits 0.894 deviations out: unremarkable, which is why a run like this is no evidence of a biased coin.

How to work it out yourself

  1. 1.Count the ways k successes can fall among n trials: that is n choose k.
  2. 2.Multiply by p to the power k — the probability of those successes happening.
  3. 3.Multiply by (1 − p) to the power n − k — the probability the rest fail.
  4. 4.The three together are P(X = k). The mean np and deviation √(np(1−p)) say whether that k was ever likely.

The formula

  1. Ways to choose k from ncombinations(20, max(0, min(12, 20)))
  2. P(X = k)125970 * 0.5 ^ 12 * (1 - 0.5) ^ (20 - 12)
  3. P(X = k) as a percentage0.1201344 * 100
  4. Mean, np20 * 0.5
  5. Standard deviationsqrt(5)
  6. How many deviations k is from the mean(12 - 10) / 2.236068

Source: NIST/SEMATECH e-Handbook — binomial distribution, NIST/SEMATECH e-Handbook of Statistical Methods

Questions people actually ask

What is the binomial probability formula?
P(X = k) = C(n,k) · pᵏ · (1−p)ⁿ⁻ᵏ. The three factors are the number of arrangements, the probability of the successes and the probability of the failures. Each appears above on its own line with its numbers in.
When does the binomial distribution apply?
Four conditions: a fixed number of trials, two outcomes each, the same probability every time, and independence. Drawing cards without replacement fails the third and fourth — that is the hypergeometric distribution instead, and using the binomial for it understates the spread.
Why is exactly 10 heads in 20 tosses only 17.6%?
Because the probability is spread across 21 possible counts, and 10 is merely the most likely one. Landing exactly on the mean gets rarer as n grows — with 100 tosses, exactly 50 heads happens under 8% of the time — while landing near it gets more certain. That is the difference between a point probability and a range.
When can I use the normal approximation?
When np and n(1−p) both exceed about 5 — for 20 trials at p = 0.5 that holds comfortably. Approximate with mean np and deviation √(np(1−p)), and apply the continuity correction of half a unit, without which the answer is systematically off in the tails.

Related

Put this calculator on your site

Free, no attribution required beyond the link.

<iframe src="https://rulecalculators.com/embed/binomial-distribution" width="100%" height="420" style="border:1px solid #e7e4de;border-radius:12px" title="Binomial Calculator"></iframe>
Did this answer your question?