Macaulay2 » Documentation
Packages » Probability :: geometricDistribution
next | previous | forward | backward | up | index | toc

geometricDistribution -- geometric distribution

Synopsis

Description

The geometric distribution, the distribution of the number of a failures in a sequence of Bernoulli trials before the first success, where p is the probability of a success.

i1 : X = geometricDistribution 0.1

o1 = Geo(.1)

o1 : DiscreteProbabilityDistribution
i2 : density_X 2

o2 = .081

o2 : RR (of precision 53)
i3 : probability_X 3

o3 = .3439

o3 : RR (of precision 53)
i4 : quantile_X 0.4

o4 = 4
i5 : random X

o5 = 21

Caveat

Some probability texts define the geometric distribution as the number of Bernoulli trials until the first success, and so the values will be one greater than ours. Our definition is consistent with R.

Ways to use geometricDistribution :

For the programmer

The object geometricDistribution is a method function.