Arithly

← All maths topics

Binomial distribution: exactly k successes in n trials

A binomial experiment has four features: a fixed number n of trials, trials that are independent of each other, only two outcomes each time — success and failure — and the same probability p of success on every trial. If X counts the successes, X follows a binomial distribution, written X ~ B(n, p). Tossing coins, rolling dice looking for sixes, and checking items off a production line all fit this pattern. To compute with it straight away, use the Binomial Distribution Calculator — exact and cumulative probabilities and the mean and standard deviation, with every step shown.

The probability of exactly k successes is P(X = k) = C(n, k) pᵏ qⁿ⁻ᵏ, where q = 1 − p is the failure probability. Each part earns its place: pᵏ is the probability of the k successes, qⁿ⁻ᵏ covers the remaining failures, and C(n, k) counts how many ways of choosing which trials succeed — because the successes can happen in any positions. One shortcut: C(n, k) = C(n, n − k), so C(5, 3) can be worked out as C(5, 2), with smaller numbers.

Think first

Before reading the solution, try to answer these — they are the hints Arithly itself gives:

Worked example

A fair coin is tossed 5 times. Find the probability of getting exactly 3 heads

  1. X counts the number of successes in n independent trials, each with the same success probability p — a BINOMIAL distribution, X ~ B(n, p). Here n = 5 and p = 1/2 (a fair coin tossed 5 times (success = the face asked about)).
  2. The probability of failure on one trial is q = 1 − p = 1 − 1/2 = 1/2.
  3. The binomial formula: P(X = k) = C(n, k) × pᵏ × qⁿ⁻ᵏ — C(n, k) chooses WHICH k of the n trials succeed, pᵏ is the k success factors multiplied together, and qⁿ⁻ᵏ is the failure factors for the remaining trials.
  4. Choosing which 3 trials succeed is the same as choosing which 2 fail, so C(5, 3) = C(5, 2) — work with the smaller number, 2.
  5. C(5, 3) = (5 × 4) / (2 × 1) — the falling product of 2 factors over 2!. Cancel common factors BEFORE multiplying out.
  6. Cancelling: 4 ÷ 2 = 2 (the 2 below cancels into the 4 above). This leaves 5 × 2.
  7. C(5, 3) = 5 × 2 = 10.
  8. The success factors: p³ = (1/2)³ = 1/8. The failure factors: q² = (1/2)² = 1/4.
  9. Multiply the three parts: P(X = 3) = 10 × 1/8 × 1/4 = 10/32 = 5/16.

Answer: 5/16

Practice

Try these yourself. Each one opens in Arithly with the question already filled in — solve it there and check your working:

Related topics

Binomial Distribution Calculator

Exact P(X = k), cumulative probabilities, mean and standard deviation — button-first, with steps.

Poisson Distribution

Counting events in an interval — the binomial's close relative.

Normal Distribution and Z-Scores

What the binomial melts into as trials pile up.

Permutations & Combinations

The counting behind every binomial coefficient.

Probability: Combined Events

Repeated trials start here: AND and OR rules for paired events.

Probability Basics

Chance as a number between 0 and 1, built from counting outcomes.

More topics: all maths topics · Next topic: Equations of a circle: centre and radius

© 2026 Arithly. Content: CC BY-NC 4.0 · Code & solver: all rights reserved.