Next: Discrete Uniform Random Variable, Previous: Bernoulli Random Variable, Up: Functions and Variables for discrete distributions [Contents][Index]
The Geometric distibution is a discrete probability distribution. It is the distribution of the number Bernoulli trials that fail before the first success.
Consider flipping a biased coin where heads occurs with probablity \(p\). Then the probability of \(k-1\) tails in a row followed by heads is given by the \({\it Geometric}(p)\) distribution.
Returns the value at x of the probability function of a \({\it Geometric}(p)\) random variable, with \(0 < p \leq 1\)
The pdf is
This is interpreted as the probability of \(x\) failures before the first success.
load("distrib")
loads this function.
Returns the value at x of the distribution function of a \({\it Geometric}(p)\) random variable, with \(0 < p \leq 1\)
The cdf is
load("distrib")
loads this function.
Returns the q-quantile of a
\({\it Geometric}(p)\)
random variable, with
\(0 < p <= 1\);
in other words, this is the inverse of cdf_geometric
.
Argument q must be an element of \([0,1]\).
The probability from which the quantile is derived is defined as \(p (1 - p)^x\). This is interpreted as the probability of \(x\) failures before the first success.
load("distrib")
loads this function.
Returns the mean of a \({\it Geometric}(p)\) random variable, with \(0 < p \leq 1\).
The mean is
The probability from which the mean is derived is defined as \(p (1 - p)^x\). This is interpreted as the probability of \(x\) failures before the first success.
load("distrib")
loads this function.
Returns the variance of a \({\it Geometric}(p)\) random variable, with \(0 < p \leq 1\).
The variance is
load("distrib")
loads this function.
Returns the standard deviation of a \({\it Geometric}(p)\) random variable, with \(0 < p \leq 1\).
load("distrib")
loads this function.
Returns the skewness coefficient of a \({\it Geometric}(p)\) random variable, with \(0 < p \leq 1\).
The skewness coefficient is
load("distrib")
loads this function.
Returns the kurtosis coefficient of a geometric random variable \({\it Geometric}(p)\) , with \(0 < p \leq 1\).
The kurtosis coefficient is
load("distrib")
loads this function.
random_geometric(p)
returns one random sample from a
\({\it Geometric}(p)\)
distribution, with
\(0 < p <= 1\).
random_geometric(p, n)
returns a list of n random samples.
The algorithm is based on simulation of Bernoulli trials.
The probability from which the random sample is derived is defined as \(p (1 - p)^x\). This is interpreted as the probability of \(x\) failures before the first success.
load("distrib")
loads this function.