Statistics Toolbox    
geopdf

Geometric probability density function (pdf)

Syntax

Description

geocdf(X,P) computes the geometric pdf 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 pdf is

where .

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 exactly three tails before getting a heads?

See Also

geocdf, geoinv, geornd, geostat, pdf


  geomean geornd