Next: , Previous: , Up: Functions and Variables for discrete distributions   [Contents][Index]

52.3.5 Geometric Random Variable

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 k1 tails in a row followed by heads is given by the Geometric(p) distribution.

Function: pdf_geometric (x,p)

Returns the value at x of the probability function of a Geometric(p) random variable, with 0<p1

The pdf is

f(x;p)=p(1p)x

This is interpreted as the probability of x failures before the first success.

load("distrib") loads this function.

Categories: Package distrib ·
Function: cdf_geometric (x,p)

Returns the value at x of the distribution function of a Geometric(p) random variable, with 0<p1

The cdf is

1(1p)1+x

load("distrib") loads this function.

Categories: Package distrib ·
Function: quantile_geometric (q,p)

Returns the q-quantile of a 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(1p)x. This is interpreted as the probability of x failures before the first success.

load("distrib") loads this function.

Categories: Package distrib ·
Function: mean_geometric (p)

Returns the mean of a Geometric(p) random variable, with 0<p1.

The mean is

E[X]=1p1

The probability from which the mean is derived is defined as p(1p)x. This is interpreted as the probability of x failures before the first success.

load("distrib") loads this function.

Categories: Package distrib ·
Function: var_geometric (p)

Returns the variance of a Geometric(p) random variable, with 0<p1.

The variance is

V[X]=1pp2

load("distrib") loads this function.

Categories: Package distrib ·
Function: std_geometric (p)

Returns the standard deviation of a Geometric(p) random variable, with 0<p1.

D[X]=1pp

load("distrib") loads this function.

Categories: Package distrib ·
Function: skewness_geometric (p)

Returns the skewness coefficient of a Geometric(p) random variable, with 0<p1.

The skewness coefficient is

SK[X]=2p1p

load("distrib") loads this function.

Categories: Package distrib ·
Function: kurtosis_geometric (p)

Returns the kurtosis coefficient of a geometric random variable Geometric(p) , with 0<p1.

The kurtosis coefficient is

KU[X]=p26p+61p

load("distrib") loads this function.

Categories: Package distrib ·
Function: random_geometric (p)
    random_geometric (p,n)

random_geometric(p) returns one random sample from a 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(1p)x. This is interpreted as the probability of x failures before the first success.

load("distrib") loads this function.

Categories: Package distrib · Random numbers ·

Next: , Previous: , Up: Functions and Variables for discrete distributions   [Contents][Index]

JavaScript license information