Statistics Toolbox
  Go to function:
    Search    Help Desk 
geocdf    Examples

Geometric cumulative distribution function (cdf).

Syntax

Description

geocdf(X,P) computes the geometric cdf with probabilities, P, at the values in X. The arguments X and P must be the same size except that a scalar argument functions as a constant matrix of the same size as the other argument.

The parameter, P, is 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?



[ Previous | Help Desk | Next ]