Binomial Distribution Calculator

Calculate Binomial Probability

Enter the probability of success for a single trial, the number of trials, and the number of successes to calculate the binomial and cumulative probabilities.

How to Calculate Using the Binomial Distribution

The binomial distribution is a discrete probability distribution that models the number of successes in a fixed number of independent Bernoulli trials. It's widely used in various fields, including statistics, quality control, and data science.

Binomial Distribution Formula

The probability mass function for the binomial distribution is:

\[ P(X = k) = \binom{n}{k} p^k (1-p)^{n-k} \]

Where:

  • n is the number of trials
  • k is the number of successes
  • p is the probability of success on each trial
  • \( \binom{n}{k} \) is the binomial coefficient, calculated as \( \frac{n!}{k!(n-k)!} \)

Calculation Steps

  1. Identify the number of trials (n), number of successes (k), and probability of success (p)
  2. Calculate the binomial coefficient \( \binom{n}{k} \)
  3. Calculate \( p^k \) and \( (1-p)^{n-k} \)
  4. Multiply the results from steps 2 and 3
  5. For cumulative probability, sum the individual probabilities from 0 to k

Example Calculation

Let's calculate the probability of getting exactly 3 heads in 5 coin flips (assuming a fair coin):

  • n = 5 (number of flips)
  • k = 3 (number of heads)
  • p = 0.5 (probability of heads on a single flip)

Steps:

  1. Calculate \( \binom{5}{3} = \frac{5!}{3!(5-3)!} = 10 \)
  2. Calculate \( 0.5^3 = 0.125 \)
  3. Calculate \( (1-0.5)^{5-3} = 0.5^2 = 0.25 \)
  4. Multiply: \( 10 \cdot 0.125 \cdot 0.25 = 0.3125 \)

Therefore, the probability of getting exactly 3 heads in 5 flips of a fair coin is 0.3125 or 31.25%.

Visual Representation

A visual representation can help understand the binomial distribution. Here's a diagram showing the probabilities for our example:

0 1 2 3 4 5

This diagram illustrates the probabilities for getting 0 to 5 heads in 5 coin flips. The pink bar represents the probability of getting exactly 3 heads, which we calculated in our example.