Statistics Toolbox    
geocdf

Geometric cumulative distribution function (cdf)

Syntax

Description

geocdf(X,P) computes the geometric cdf at each of the values in X using the corresponding probabilities in P. Vector or matrix inputs for X and P must be the same size. A scalar input is expanded to a constant matrix with the same dimensions as the other input. The parameters in P must lie on the interval [0 1].

The geometric cdf is

where .

The result, y, is the probability of observing up to x trials before a success, when the probability of success in any given trial is p.

Examples

Suppose you toss a fair coin repeatedly. If the coin lands face up (heads), that is a success. What is the probability of observing three or fewer tails before getting a heads?

See Also

cdf, geoinv, geopdf, geornd, geostat


  gamstat geoinv