Binomial Distribution Calculator

Distribution Parameters

Number of independent trials (positive integer)
Probability of success on a single trial (0 ≤ p ≤ 1)

Calculation Type

Calculate P(X = k), the probability of exactly k successes

Display Options

Binomial Distribution Visualization

n = 10, p = 0.5

Probability Table

k P(X = k) P(X ≤ k)

Binomial Distribution Overview

The binomial distribution models the number of successes in a fixed number of independent trials, each with the same probability of success.

Probability Mass Function (PMF)

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

where \(\binom{n}{k}\) is the binomial coefficient representing the number of ways to choose k items from n items.

Expected Value

\[ E[X] = np \]

Variance

\[ Var(X) = np(1-p) \]

Key Properties

  • The random variable X represents the number of successes in n trials
  • Each trial is independent with probability p of success
  • The distribution is symmetric when p = 0.5, positively skewed when p < 0.5, and negatively skewed when p > 0.5
  • As n increases, the binomial distribution approaches a normal distribution with μ = np and σ² = np(1-p)
  • A binomial distribution with n = 1 is a Bernoulli distribution

Understanding the Binomial Distribution

Definition & Characteristics

The binomial distribution is a discrete probability distribution that describes the number of successes in a fixed number of independent Bernoulli trials, each with the same probability of success.

Requirements for a Binomial Experiment

  1. Fixed number of trials: The experiment consists of a fixed number n of trials.
  2. Independence: Each trial is independent of all other trials.
  3. Binary outcomes: Each trial has exactly two possible outcomes: "success" or "failure".
  4. Constant probability: The probability of success p is the same for each trial.

Mathematical Formulation

A random variable X follows a binomial distribution with parameters n and p, written as X ~ Bin(n, p), if:

  • X represents the number of successes in n trials
  • The probability of success in any single trial is p
  • The probability of failure in any single trial is q = 1-p
Probability Mass Function
\[ P(X = k) = \binom{n}{k} p^k (1-p)^{n-k}, \quad k = 0, 1, 2, \ldots, n \]

where \(\binom{n}{k} = \frac{n!}{k!(n-k)!}\) is the binomial coefficient.

Properties & Applications

Key Properties

Expected Value (Mean)
E[X] = np
The average number of successes in n trials
Variance
Var(X) = np(1-p)
Measures the spread or dispersion of the distribution
Standard Deviation
σ = \sqrt{np(1-p)}
Typical deviation from the mean
Skewness
\frac{1-2p}{\sqrt{np(1-p)}}
Measures the asymmetry of the distribution
Mode
⌊(n+1)p⌋ or ⌈(n+1)p⌉-1
The most likely number of successes

Normal Approximation

For large values of n, the binomial distribution can be approximated by a normal distribution with mean μ = np and variance σ² = np(1-p), particularly when:

  • np > 5 and n(1-p) > 5, or
  • n > 20 and 0.05 < p < 0.95

Real-World Applications

  • Quality Control: Testing a sample of n items for defects
  • Medicine: Clinical trials where each patient either responds or doesn't respond to treatment
  • Genetics: Inheritance patterns following Mendelian laws
  • Surveys: Opinion polls where each person either supports or doesn't support a proposition
  • Finance: Modeling stock price movements (up or down) over multiple trading days

Example Problems

Example 1: Coin Flipping

Suppose you flip a fair coin 10 times. What is the probability of getting exactly 6 heads?

This is a binomial distribution with n = 10 (number of flips) and p = 0.5 (probability of heads on each flip).

We want to find P(X = 6), where X is the number of heads.

\begin{align} P(X = 6) &= \binom{10}{6} (0.5)^6 (1-0.5)^{10-6} \\ &= \binom{10}{6} (0.5)^6 (0.5)^4 \\ &= 210 \cdot (0.5)^{10} \\ &= 210 \cdot 0.0009765625 \\ &= 0.205078125 \\ &\approx 0.2051 \end{align}

The probability of getting exactly 6 heads in 10 flips is approximately 0.2051 or 20.51%.

Example 2: Multiple-Choice Test

A student takes a 20-question multiple-choice test where each question has 4 options. If the student guesses randomly on each question, what is the probability that they will get at least 8 questions correct?

This is a binomial distribution with n = 20 (number of questions) and p = 0.25 (probability of guessing correctly with 4 options).

We want to find P(X ≥ 8), which is the same as 1 - P(X ≤ 7).

\begin{align} P(X \geq 8) &= 1 - P(X \leq 7) \\ &= 1 - \sum_{k=0}^{7} \binom{20}{k} (0.25)^k (0.75)^{20-k} \\ \end{align}

Calculating this sum:

\begin{align} P(X \geq 8) &= 1 - 0.7576 \\ &= 0.2424 \end{align}

The probability of getting at least 8 questions correct by random guessing is approximately 0.2424 or 24.24%.

Example 3: Manufacturing Quality Control

A manufacturing process produces items with a 3% defect rate. If a quality inspector randomly selects 50 items for inspection, what is the probability that fewer than 2 items are defective?

This is a binomial distribution with n = 50 (number of items inspected) and p = 0.03 (probability of an item being defective).

We want to find P(X < 2) = P(X = 0) + P(X = 1).

\begin{align} P(X = 0) &= \binom{50}{0} (0.03)^0 (0.97)^{50} \\ &= 1 \cdot 1 \cdot (0.97)^{50} \\ &= 0.2187 \end{align}
\begin{align} P(X = 1) &= \binom{50}{1} (0.03)^1 (0.97)^{49} \\ &= 50 \cdot 0.03 \cdot (0.97)^{49} \\ &= 1.5 \cdot (0.97)^{49} \\ &= 0.3371 \end{align}
\begin{align} P(X < 2) &= P(X = 0) + P(X = 1) \\ &= 0.2187 + 0.3371 \\ &= 0.5558 \end{align}

The probability of finding fewer than 2 defective items is approximately 0.5558 or 55.58%.

Test Your Knowledge

Quick Quiz: Binomial Distribution

1. A basketball player makes 70% of his free throws. If he attempts 8 free throws in a game, what is the probability that he makes exactly 6 of them?

A. 0.2013
B. 0.2503
C. 0.2335
D. 0.1848

2. The mean of a binomial distribution with n = 15 and p = 0.4 is:

A. 6
B. 6.5
C. 5.5
D. 7.5

3. Which of the following is NOT a requirement for a binomial experiment?

A. Fixed number of trials
B. Independent trials
C. Probability of success must be greater than 0.5
D. Each trial has exactly two possible outcomes