Geometric Distribution Calculator Formula
Understand the math behind the geometric distribution calculator. Each variable explained with a worked example.
Formulas Used
P(X = k)
probability = pow(1 - p, k - 1) * pP(X <= k)
cdf = 1 - pow(1 - p, k)Expected Value (1/p)
expected = 1 / pVariance
variance_val = (1 - p) / pow(p, 2)Variables
| Variable | Description | Default |
|---|---|---|
p | Success Probability (p) | 0.2 |
k | Trial Number (k) | 5 |
How It Works
How to Calculate Geometric Distribution Probability
Formula
P(X = k) = (1-p)^(k-1) * p
The geometric distribution models the number of trials needed to get the first success. Each trial is independent with success probability p. The probability of needing exactly k trials means k-1 failures followed by 1 success. The expected number of trials is 1/p.
Worked Example
A basketball player has a 20% free-throw rate. What is the probability the first basket is made on the 5th attempt?
p = 0.2k = 5
- 01P(X=5) = (1-0.2)^(5-1) * 0.2
- 02= 0.8^4 * 0.2
- 03= 0.4096 * 0.2
- 04= 0.08192
- 05Expected trials until first success = 1/0.2 = 5
Ready to run the numbers?
Open Geometric Distribution Calculator