geometric

Probability mass function
Distribution
Mean
Variance
Mode 0

The Geometric distribution is a discrete distribution bounded at 0 and unbounded on the high side. It is a special case of the Negative Binomial distribution. In particular, it is the direct discrete analog for the continuous Exponential distribution. The Geometric distribution has no history dependence, its probability at any value being independent of a shift along the axis.

The Geometric distribution has been used for inventory demand, marketing survey returns, a ticket control problem, and meteorological models.

Samples

geometric(double p)

Description

Generates a sample of the Geometric distribution.

Parameters

Name Type Description
p double the probability of occurrence

Result

Type Description
int the generated sample

geometric(double p, java.util.Random r)

Description

Generates a sample of the Geometric distribution using the specified random number generator.

Parameters

Name Type Description
p double the probability of occurrence
r java.util.Random the random number generator

Result

Type Description
int the generated sample