geoinv
Geometric inverse cumulative distribution function
Syntax
x = geoinv(y,p)
Description
x = geoinv(y,p)
返回逆累积分布功能on (icdf) of the geometric distribution at each value iny
using the corresponding probabilities inp
.
geoinv
returns the smallest positive integerx
such that the geometric cdf evaluated atx
is equal to or exceedsy
. You can think ofy
as the probability of observingx
successes in a row in independent trials, wherep
is the probability of success in each trial.
y
andp
can be vectors, matrices, or multidimensional arrays that all have the same size. A scalar input forp
ory
is expanded to a constant array with the same dimensions as the other input. The values inp
andy
must lie on the interval[0,1]
.