CumGeometric
CumGeometric(k, p)
The cumulative probability function for the Geometric(p) distribution.
Computes the probability that at most «k» independent Bernoulli trials would be required before the first success is obtained. The probability of success on each trial is «p».
Library
- Distribution Densities Library (
"Distribution Densities.ana"
)
This function was included in this library for the first time in the Analytica 4.4.3 patch release. But the function will work in earlier releases, so if you need it you can grab the most recent version of the Distribution Densities Library.
Examples
If you enter a lottery every day of the year, where each entry has odds of 1 chance in 1M of winning, what is the probability that you will win within one year? How about within 10 years?
CumGeometric(365, 1/1M) → 3.649e-004
CumGeometric(3653, 1/1M) → 3.646e-003
What is the probability of rolling doubles ten times in a row with a pair of fair dice? To encode this, treat a success as a non-double roll, which has a probability of 5/6, so the answer is given by
1 - CumGeometric(10, 5/6) → 1.654e-008
John is a baseball player, who hits the ball on 10% of his swings. What is the probability he gets a hit during his next three swings?
CumGeometric(3, 10%)
Enable comment auto-refresher