|On this page…|
The geometric distribution is discrete, existing only on the nonnegative integers. It models the number of successes before one failure in an independent succession of tests where each test results in success or failure.
The geometric distribution uses the following parameter.
|p||Probability of success|
The geometric distribution is a special case of the negative binomial distribution, with r = 1.
This example shows how to compute the probability of a particular series of outcomes when the event follows a geometric distribution.
Suppose the probability of a five-year-old battery failing in cold weather is 0.03. What is the probability of starting 25 consecutive days during a long cold snap?
1 - geocdf(25,0.03)
ans = 0.4530
The plot shows the cdf for this scenario.
x = 0:25; y = geocdf(x,0.03); stairs(x,y)