How to Use This Calculator
Step 1: Enter Your Parameters
- Success Prob (p): The probability of success on each individual trial (must be between 0 and 1, e.g., 0.2 means 20% chance of success per trial)
- Lower Bound Trial (a): The starting trial number for range calculations (must be ≥ 1)
- Upper Bound Trial (b): The ending trial number for range calculations (must be ≥ a)
Step 2: Click "Calculate"
The calculator will instantly show you:
- P(X < a): The probability that the first success occurs before trial a
- P(X > b): The probability that the first success occurs after trial b
- P(a ≤ X ≤ b): The probability that the first success occurs between trials a and b (inclusive)
- Statistical measures: mean (expected number of trials = 1/p), variance, and standard deviation
- Visual charts: PMF (bar chart) showing the probability of first success on each trial, and CDF (step function) showing cumulative probabilities
- Complete probability table: PMF and CDF values for trials 1 through 30, which you can copy to your clipboard
Step 3: Export Your Results
Use the buttons below the results to:
- Copy Table: Copy all probability data to paste into Excel, Google Sheets, or other software
- Save as PNG: Download charts and summary as an image for reports or presentations
- Save as PDF: Generate a complete report with all calculations, visualizations, and the full probability table
💡 Quick Tip: The geometric distribution models "waiting time" until the first success. If p = 0.2, you'll need an average of 1/0.2 = 5 trials to get your first success. Unlike the binomial distribution (fixed trials), here the number of trials is what varies! If a > b, the calculator will automatically swap the values.
Understanding the Geometric Distribution
The Geometric Distribution is a discrete probability distribution that models the number of trials required to achieve the first success in a series of independent Bernoulli trials. Unlike the Binomial distribution, which has a fixed number of trials, the geometric distribution is concerned with the "waiting time" until a success occurs.
Conditions for a Geometric Experiment
For a scenario to be modeled by a geometric distribution, it must satisfy the following conditions:
- Independent Trials: The outcome of one trial does not influence the outcome of subsequent trials.
- Two Possible Outcomes: Each trial results in one of two outcomes: "success" or "failure".
- Constant Probability (p): The probability of success (p) is the same for every trial.
- Variable Trials: The experiment continues until the first success is observed. The number of trials is the random variable of interest.
The Geometric Probability Formula
The probability that the first success occurs on the \(k^{th}\) trial is given by the Probability Mass Function (PMF):
$$P(X = k) = (1-p)^{k-1} p$$
This formula makes intuitive sense: for the first success to be on trial \(k\), we must have \(k-1\) consecutive failures, each with probability \((1-p)\), followed by one success with probability \(p\).
- Mean / Expected Value: \(E[X] = \frac{1}{p}\)
- Variance: \(Var[X] = \frac{1-p}{p^2}\)
Examples with Step-by-Step Answers
Example 1: Rolling a Die
Problem: You are rolling a standard six-sided die. What is the probability that the first time you roll a '6' is on your fourth roll?
1. Identify the parameters:
- Probability of success (rolling a '6'), \(p = \frac{1}{6} \approx 0.1667\)
- Trial number for the first success, \(k = 4\)
2. Apply the formula:
$$P(X=4) = (1 - \frac{1}{6})^{4-1} \times \frac{1}{6}$$
3. Calculate each part:
- Probability of failure: \(1 - \frac{1}{6} = \frac{5}{6}\)
- Failure term: \((\frac{5}{6})^3 = \frac{125}{216} \approx 0.5787\)
4. Combine the results:
\(P(X=4) = \frac{125}{216} \times \frac{1}{6} = \frac{125}{1296} \approx 0.0965\)
Answer: There is approximately a 9.65% chance that the first '6' you roll will be on the fourth attempt.
Example 2: Quality Control
Problem: A machine produces light bulbs with a 5% chance of being defective. What is the probability that the first defective bulb is found within the first 3 bulbs tested?
1. Identify the parameters:
- Probability of success (finding a defective bulb), \(p = 0.05\)
- We need to find \(P(X \le 3)\), which is \(P(X=1) + P(X=2) + P(X=3)\).
2. Calculate the probability for each value of k:
- For \(k=1\): \(P(X=1) = (0.95)^{1-1} \times 0.05 = 1 \times 0.05 = 0.05\)
- For \(k=2\): \(P(X=2) = (0.95)^{2-1} \times 0.05 = 0.95 \times 0.05 = 0.0475\)
- For \(k=3\): \(P(X=3) = (0.95)^{3-1} \times 0.05 = (0.95)^2 \times 0.05 \approx 0.0451\)
3. Sum the probabilities:
\(P(X \le 3) = 0.05 + 0.0475 + 0.0451 = 0.1426\)
Alternative using CDF: The CDF formula is \(P(X \le k) = 1 - (1-p)^k\).
\(P(X \le 3) = 1 - (1 - 0.05)^3 = 1 - (0.95)^3 = 1 - 0.857375 \approx 0.1426\)
Answer: The probability that the first defective bulb is found within the first three tested is approximately 14.26%.