Previous Up Next

20.4.13  Geometric distribution

The probability density function for the geometric distribution.

If an experiment with probability of success p is iterated, the probability that the first success occurs on the kth trial is (1−p)k−1p. This gives the geometric distribution (with parameter p) on the natural numbers. Given such a p, the geometric density function at n is given by

geometric(p,n)=(1−p)n−1p     (10)

The geometric command computes this density function.

Example

geometric(0.2,3)
     
0.128           
The cumulative distribution function of the geometric distribution.

The geometric_cdf command computes the cumulative distribution function for the geometric distribution.

It turns out that geometric_cdf(p,n)=1−(1−p)n.

Examples

geometric_cdf(0.2,3)
     
0.488           
geometric_cdf(0.2,3,5)
     
0.31232           
The inverse distribution function for the geometric distribution.

The geometric_icdf command computes the inverse distribution for the geometric distribution.

Example

geometric_icdf(0.2,0.5)
     
4           

Previous Up Next