| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Statistics Toolbox |
| Contents | Index |
| Learn more about Statistics Toolbox |
| On this page… |
|---|
The geometric pdf is
![]()
where q = 1 – p. The geometric distribution is a special case of the negative binomial distribution, with r = 1.
The geometric distribution is discrete, existing only on the nonnegative integers. It is useful for modeling the runs of consecutive successes (or failures) in repeated independent trials of a system.
The geometric distribution models the number of successes before one failure in an independent succession of tests where each test results in success or failure.
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)

![]() | Generalized Pareto Distribution | Hypergeometric Distribution | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |