| Statistics Toolbox | Search  Help Desk |
| geopdf | Examples |
Geometric probability density function (pdf).
Syntax
Y = geopdf(X,P)
Description
geocdf(X,P) computes the geometric pdf 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 pdf is:
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?p = geopdf(3,0.5)
p =
0.0625