# geoinv

Geometric inverse cumulative distribution function

## Syntax

`x = geoinv(y,p)`

## Description

`x = geoinv(y,p)`

returns
the inverse cumulative distribution function (icdf) of the geometric
distribution at each value in `y`

using the corresponding
probabilities in `p`

.

`geoinv`

returns the smallest positive integer `x`

such
that the geometric cdf evaluated at `x`

is equal
to or exceeds `y`

. You can think of `y`

as
the probability of observing `x`

successes in a row
in independent trials, where `p`

is the probability
of success in each trial.

`y`

and `p`

can be vectors,
matrices, or multidimensional arrays that all have the same size.
A scalar input for `p`

or `y`

is
expanded to a constant array with the same dimensions as the other
input. The values in `p`

and `y`

must
lie on the interval `[0,1]`

.

## Examples

## Extended Capabilities

**Introduced before R2006a**