HOME

TheInfoList



OR:

In
probability theory Probability theory is the branch of mathematics concerned with probability. Although there are several different probability interpretations, probability theory treats the concept in a rigorous mathematical manner by expressing it through a set ...
and
statistics Statistics (from German: '' Statistik'', "description of a state, a country") is the discipline that concerns the collection, organization, analysis, interpretation, and presentation of data. In applying statistics to a scientific, indust ...
, the geometric distribution is either one of two
discrete probability distribution In probability theory and statistics, a probability distribution is the mathematical function that gives the probabilities of occurrence of different possible outcomes for an experiment. It is a mathematical description of a random phenomenon ...
s: * The probability distribution of the number ''X'' of
Bernoulli trial In the theory of probability and statistics, a Bernoulli trial (or binomial trial) is a random experiment with exactly two possible outcomes, "success" and "failure", in which the probability of success is the same every time the experiment is c ...
s needed to get one success, supported on the set \; * The probability distribution of the number ''Y'' = ''X'' − 1 of failures before the first success, supported on the set \. Which of these is called the geometric distribution is a matter of convention and convenience. These two different geometric distributions should not be confused with each other. Often, the name ''shifted'' geometric distribution is adopted for the former one (distribution of the number ''X''); however, to avoid ambiguity, it is considered wise to indicate which is intended, by mentioning the support explicitly. The geometric distribution gives the probability that the first occurrence of success requires ''k'' independent trials, each with success probability ''p''. If the probability of success on each trial is ''p'', then the probability that the ''k''th trial is the first success is :\Pr(X = k) = (1-p)^p for ''k'' = 1, 2, 3, 4, .... The above form of the geometric distribution is used for modeling the number of trials up to and including the first success. By contrast, the following form of the geometric distribution is used for modeling the number of failures until the first success: :\Pr(Y=k) =\Pr(X=k+1)= (1 - p)^k p for ''k'' = 0, 1, 2, 3, .... In either case, the sequence of probabilities is a
geometric sequence In mathematics, a geometric progression, also known as a geometric sequence, is a sequence of non-zero numbers where each term after the first is found by multiplying the previous one by a fixed, non-zero number called the ''common ratio''. For ...
. For example, suppose an ordinary
die Die, as a verb, refers to death, the cessation of life. Die may also refer to: Games * Die, singular of dice, small throwable objects used for producing random numbers Manufacturing * Die (integrated circuit), a rectangular piece of a semicondu ...
is thrown repeatedly until the first time a "1" appears. The probability distribution of the number of times it is thrown is supported on the infinite set and is a geometric distribution with ''p'' = 1/6. The geometric distribution is denoted by Geo(''p'') where 0 < ''p'' ≤ 1.


Definitions

Consider a sequence of trials, where each trial has only two possible outcomes (designated failure and success). The probability of success is assumed to be the same for each trial. In such a sequence of trials, the geometric distribution is useful to model the number of failures before the first success since the experiment can have an indefinite number of trials until success, unlike the binomial distribution which has a set number of trials. The distribution gives the probability that there are zero failures before the first success, one failure before the first success, two failures before the first success, and so on.


Assumptions: When is the geometric distribution an appropriate model?

The geometric distribution is an appropriate model if the following assumptions are true. *The phenomenon being modeled is a sequence of independent trials. *There are only two possible outcomes for each trial, often designated success or failure. *The probability of success, ''p'', is the same for every trial. If these conditions are true, then the geometric random variable ''Y'' is the count of the number of failures before the first success. The possible number of failures before the first success is 0, 1, 2, 3, and so on. In the graphs above, this formulation is shown on the right. An alternative formulation is that the geometric random variable ''X'' is the total number of trials up to and including the first success, and the number of failures is ''X'' − 1. In the graphs above, this formulation is shown on the left.


Probability outcomes examples

The general formula to calculate the probability of ''k'' failures before the first success, where the probability of success is ''p'' and the probability of failure is ''q'' = 1 − ''p'', is :\Pr(Y=k) = q^k\,p. for ''k'' = 0, 1, 2, 3, .... E1) A doctor is seeking an antidepressant for a newly diagnosed patient. Suppose that, of the available anti-depressant drugs, the probability that any particular drug will be effective for a particular patient is ''p'' = 0.6. What is the probability that the first drug found to be effective for this patient is the first drug tried, the second drug tried, and so on? What is the expected number of drugs that will be tried to find one that is effective? The probability that the first drug works. There are zero failures before the first success. ''Y'' = 0 failures. The probability Pr(zero failures before first success) is simply the probability that the first drug works. :\Pr(Y=0) = q^0\,p\ = 0.4^0 \times 0.6 = 1 \times 0.6 = 0.6. The probability that the first drug fails, but the second drug works. There is one failure before the first success. ''Y'' = 1 failure. The probability for this sequence of events is Pr(first drug fails) \times p(second drug succeeds), which is given by :\Pr(Y=1) = q^1\,p\ = 0.4^1 \times 0.6 = 0.4 \times 0.6 = 0.24. The probability that the first drug fails, the second drug fails, but the third drug works. There are two failures before the first success. ''Y'' = 2 failures. The probability for this sequence of events is Pr(first drug fails) \times p(second drug fails) \times Pr(third drug is success) :\Pr(Y=2) = q^2\,p, = 0.4^2 \times 0.6 = 0.096. E2) A newlywed couple plans to have children and will continue until the first girl. What is the probability that there are zero boys before the first girl, one boy before the first girl, two boys before the first girl, and so on? The probability of having a girl (success) is ''p''= 0.5 and the probability of having a boy (failure) is ''q'' = 1 − ''p'' = 0.5. The probability of no boys before the first girl is :\Pr(Y=0) = q^0\,p\ = 0.5^0 \times 0.5 = 1 \times 0.5 = 0.5. The probability of one boy before the first girl is :\Pr(Y=1) = q^1\,p\ = 0.5^1 \times 0.5 = 0.5 \times 0.5 = 0.25. The probability of two boys before the first girl is :\Pr(Y=2) = q^2\,p\ = 0.5^2 \times 0.5 = 0.125. and so on.


Properties


Moments and cumulants

The
expected value In probability theory, the expected value (also called expectation, expectancy, mathematical expectation, mean, average, or first moment) is a generalization of the weighted average. Informally, the expected value is the arithmetic mean of a ...
for the number of independent trials to get the first success, and the
variance In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbe ...
of a geometrically distributed
random variable A random variable (also called random quantity, aleatory variable, or stochastic variable) is a mathematical formalization of a quantity or object which depends on random events. It is a mapping or a function from possible outcomes (e.g., the po ...
''X'' is: :\operatorname(X) = \frac 1 p, \qquad\operatorname(X) = \frac. Similarly, the expected value and variance of the geometrically distributed random variable ''Y'' = ''X'' - 1 (See definition of distribution \Pr(Y=k)) is: :\operatorname(Y) = \operatorname(X-1) = \operatorname(X)-1 = \frac p, \qquad\operatorname(Y) = \frac.


Proof

That the expected value is (1 − ''p'')/''p'' can be shown in the following way. Let ''Y'' be as above. Then : \begin \mathrm(Y) & =\sum_^\infty (1-p)^k p\cdot k \\ & =p\sum_^\infty(1-p)^k k \\ & = p (1-p) \sum_^\infty (1-p)^\cdot k\\ & = p (1-p) \left frac\left(-\sum_^\infty (1-p)^k\right)\right\\ & =p(1-p)\frac\left(-\frac\right)=\frac. \end The interchange of summation and differentiation is justified by the fact that convergent
power series In mathematics, a power series (in one variable) is an infinite series of the form \sum_^\infty a_n \left(x - c\right)^n = a_0 + a_1 (x - c) + a_2 (x - c)^2 + \dots where ''an'' represents the coefficient of the ''n''th term and ''c'' is a con ...
converge uniformly on
compact Compact as used in politics may refer broadly to a pact or treaty; in more specific cases it may refer to: * Interstate compact * Blood compact, an ancient ritual of the Philippines * Compact government, a type of colonial rule utilized in Britis ...
subsets of the set of points where they converge. Let ''μ'' = (1 − ''p'')/''p'' be the expected value of ''Y''. Then the cumulants \kappa_n of the probability distribution of ''Y'' satisfy the recursion :\kappa_ = \mu(\mu+1) \frac.


Expected value examples

E3) A patient is waiting for a suitable matching kidney donor for a transplant. If the probability that a randomly selected donor is a suitable match is ''p'' = 0.1, what is the expected number of donors who will be tested before a matching donor is found? With ''p'' = 0.1, the mean number of failures before the first success is E(''Y'') = (1 − ''p'')/''p'' =(1 − 0.1)/0.1 = 9. For the alternative formulation, where ''X'' is the number of trials up to and including the first success, the expected value is E(''X'') = 1/''p'' = 1/0.1 = 10. For example 1 above, with ''p'' = 0.6, the mean number of failures before the first success is E(''Y'') = (1 − ''p'')/''p'' = (1 − 0.6)/0.6 = 0.67.


Higher-order moments

The moments for the number of failures before the first success are given by : \begin \mathrm(Y^n) & =\sum_^\infty (1-p)^k p\cdot k^n \\ & =p \operatorname_(1-p) \end where \operatorname_(1-p) is the polylogarithm function.


General properties

* The probability-generating functions of ''X'' and ''Y'' are, respectively, :: \begin G_X(s) & = \frac, \\
0pt PT, Pt, or pt may refer to: Arts and entertainment * ''P.T.'' (video game), acronym for ''Playable Teaser'', a short video game released to promote the cancelled video game ''Silent Hills'' * Porcupine Tree, a British progressive rock group ...
G_Y(s) & = \frac, \quad , s, < (1-p)^. \end * Like its continuous analogue (the
exponential distribution In probability theory and statistics, the exponential distribution is the probability distribution of the time between events in a Poisson point process, i.e., a process in which events occur continuously and independently at a constant average ...
), the geometric distribution is memoryless. That means that if you intend to repeat an experiment until the first success, then, given that the first success has not yet occurred, the conditional probability distribution of the number of additional trials does not depend on how many failures have been observed. The die one throws or the coin one tosses does not have a "memory" of these failures. The geometric distribution is the only memoryless discrete distribution. ::\Pr\=\Pr\ * Among all discrete probability distributions supported on with given expected value ''μ'', the geometric distribution ''X'' with parameter ''p'' = 1/''μ'' is the one with the largest entropy. * The geometric distribution of the number ''Y'' of failures before the first success is infinitely divisible, i.e., for any positive integer ''n'', there exist independent identically distributed random variables ''Y''1, ..., ''Y''''n'' whose sum has the same distribution that ''Y'' has. These will not be geometrically distributed unless ''n'' = 1; they follow a
negative binomial distribution In probability theory and statistics, the negative binomial distribution is a discrete probability distribution that models the number of failures in a sequence of independent and identically distributed Bernoulli trials before a specified (non- ...
. * The decimal digits of the geometrically distributed random variable ''Y'' are a sequence of
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independe ...
(and ''not'' identically distributed) random variables. For example, the hundreds digit ''D'' has this probability distribution: ::\Pr(D=d) = , :where ''q'' = 1 − ''p'', and similarly for the other digits, and, more generally, similarly for
numeral system A numeral system (or system of numeration) is a writing system for expressing numbers; that is, a mathematical notation for representing numbers of a given set, using digits or other symbols in a consistent manner. The same sequence of symbo ...
s with other bases than 10. When the base is 2, this shows that a geometrically distributed random variable can be written as a sum of independent random variables whose probability distributions are indecomposable. * Golomb coding is the optimal prefix code for the geometric discrete distribution. *The sum of two independent ''Geo''(p) distributed random variables is not a geometric distribution.


Related distributions

* The geometric distribution ''Y'' is a special case of the
negative binomial distribution In probability theory and statistics, the negative binomial distribution is a discrete probability distribution that models the number of failures in a sequence of independent and identically distributed Bernoulli trials before a specified (non- ...
, with ''r'' = 1. More generally, if ''Y''1, ..., ''Y''''r'' are
independent Independent or Independents may refer to: Arts, entertainment, and media Artist groups * Independents (artist group), a group of modernist painters based in the New Hope, Pennsylvania, area of the United States during the early 1930s * Independe ...
geometrically distributed variables with parameter ''p'', then the sum ::Z = \sum_^r Y_m :follows a negative binomial distribution with parameters ''r'' and ''p''. *The geometric distribution is a special case of discrete
compound Poisson distribution In probability theory, a compound Poisson distribution is the probability distribution of the sum of a number of independent identically-distributed random variables, where the number of terms to be added is itself a Poisson-distributed variable. ...
. * If ''Y''1, ..., ''Y''''r'' are independent geometrically distributed variables (with possibly different success parameters ''p''''m''), then their
minimum In mathematical analysis, the maxima and minima (the respective plurals of maximum and minimum) of a function, known collectively as extrema (the plural of extremum), are the largest and smallest value of the function, either within a given r ...
::W = \min_ Y_m\, :: :is also geometrically distributed, with parameter p = 1-\prod_m(1-p_). * Suppose 0 < ''r'' < 1, and for ''k'' = 1, 2, 3, ... the random variable ''X''''k'' has a
Poisson distribution In probability theory and statistics, the Poisson distribution is a discrete probability distribution that expresses the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known co ...
with expected value ''r'' ''k''/''k''. Then ::\sum_^\infty k\,X_k :has a geometric distribution taking values in the set , with expected value ''r''/(1 − ''r''). * The
exponential distribution In probability theory and statistics, the exponential distribution is the probability distribution of the time between events in a Poisson point process, i.e., a process in which events occur continuously and independently at a constant average ...
is the continuous analogue of the geometric distribution. If ''X'' is an exponentially distributed random variable with parameter λ, then ::Y = \lfloor X \rfloor, : where \lfloor \quad \rfloor is the
floor A floor is the bottom surface of a room or vehicle. Floors vary from simple dirt in a cave to many layered surfaces made with modern technology. Floors may be stone, wood, bamboo, metal or any other material that can support the expected load ...
(or greatest integer) function, is a geometrically distributed random variable with parameter ''p'' = 1 − ''e''−''λ'' (thus ''λ'' = −ln(1 − ''p'')) and taking values in the set . This can be used to generate geometrically distributed pseudorandom numbers by first generating exponentially distributed pseudorandom numbers from a uniform
pseudorandom number generator A pseudorandom number generator (PRNG), also known as a deterministic random bit generator (DRBG), is an algorithm for generating a sequence of numbers whose properties approximate the properties of sequences of random numbers. The PRNG-generate ...
: then \lfloor \ln(U) / \ln(1-p)\rfloor is geometrically distributed with parameter p, if U is uniformly distributed in ,1 * If ''p'' = 1/''n'' and ''X'' is geometrically distributed with parameter ''p'', then the distribution of ''X''/''n'' approaches an
exponential distribution In probability theory and statistics, the exponential distribution is the probability distribution of the time between events in a Poisson point process, i.e., a process in which events occur continuously and independently at a constant average ...
with expected value 1 as ''n'' → ∞, since :: \begin \Pr(X/n>a)=\Pr(X>na) & = (1-p)^ = \left(1-\frac 1 n \right)^ = \left \left( 1-\frac 1 n \right)^n \right \\ & \to ^ = e^ \text n\to\infty. \end More generally, if ''p'' = ''λ''/''n'', where ''λ'' is a parameter, then as ''n''→ ∞ the distribution of ''X''/''n'' approaches an exponential distribution with rate ''λ'': :\Pr(X>nx)=\lim_(1-\lambda /n)^=e^ therefore the distribution function of ''X''/''n'' converges to 1-e^, which is that of an exponential random variable.


Statistical inference


Parameter estimation

For both variants of the geometric distribution, the parameter ''p'' can be estimated by equating the expected value with the
sample mean The sample mean (or "empirical mean") and the sample covariance are statistics computed from a sample of data on one or more random variables. The sample mean is the average value (or mean value) of a sample of numbers taken from a larger popu ...
. This is the method of moments, which in this case happens to yield
maximum likelihood In statistics, maximum likelihood estimation (MLE) is a method of estimating the parameters of an assumed probability distribution, given some observed data. This is achieved by maximizing a likelihood function so that, under the assumed stat ...
estimates of ''p''. Specifically, for the first variant let ''k'' = ''k''1, ..., ''k''''n'' be a
sample Sample or samples may refer to: Base meaning * Sample (statistics), a subset of a population – complete data set * Sample (signal), a digital discrete sample of a continuous analog signal * Sample (material), a specimen or small quantity of ...
where ''k''''i'' ≥ 1 for ''i'' = 1, ..., ''n''. Then ''p'' can be estimated as :\widehat = \left(\frac1n \sum_^n k_i\right)^ = \frac. \! In
Bayesian inference Bayesian inference is a method of statistical inference in which Bayes' theorem is used to update the probability for a hypothesis as more evidence or information becomes available. Bayesian inference is an important technique in statistics, and ...
, the
Beta distribution In probability theory and statistics, the beta distribution is a family of continuous probability distributions defined on the interval , 1in terms of two positive parameters, denoted by ''alpha'' (''α'') and ''beta'' (''β''), that appear as ...
is the
conjugate prior In Bayesian probability theory, if the posterior distribution p(\theta \mid x) is in the same probability distribution family as the prior probability distribution p(\theta), the prior and posterior are then called conjugate distributions, and ...
distribution for the parameter ''p''. If this parameter is given a Beta(''α'', ''β'')
prior Prior (or prioress) is an ecclesiastical title for a superior in some religious orders. The word is derived from the Latin for "earlier" or "first". Its earlier generic usage referred to any monastic superior. In abbeys, a prior would be low ...
, then the posterior distribution is :p \sim \mathrm\left(\alpha+n,\ \beta+\sum_^n (k_i-1)\right). \! The posterior mean E 'p''approaches the maximum likelihood estimate \widehat as ''α'' and ''β'' approach zero. In the alternative case, let ''k''1, ..., ''k''''n'' be a sample where ''k''''i'' ≥ 0 for ''i'' = 1, ..., ''n''. Then ''p'' can be estimated as :\widehat = \left(1 + \frac1n \sum_^n k_i\right)^ = \frac. \! The posterior distribution of ''p'' given a Beta(''α'', ''β'') prior is :p \sim \mathrm\left(\alpha+n,\ \beta+\sum_^n k_i\right). \! Again the posterior mean E 'p''approaches the maximum likelihood estimate \widehat as ''α'' and ''β'' approach zero. For either estimate of \widehat using Maximum Likelihood, the bias is equal to : b \equiv \operatorname\bigg ;(\hat p_\mathrm - p)\;\bigg = \frac which yields the bias-corrected maximum likelihood estimator : \hat^*_\text = \hat_\text - \hat


Computational methods


Geometric distribution using R

The R function dgeom(k, prob) calculates the probability that there are k failures before the first success, where the argument "prob" is the probability of success on each trial. For example, dgeom(0,0.6) = 0.6 dgeom(1,0.6) = 0.24 R uses the convention that k is the number of failures, so that the number of trials up to and including the first success is ''k'' + 1. The following R code creates a graph of the geometric distribution from ''Y'' = 0 to 10, with ''p'' = 0.6. Y=0:10 plot(Y, dgeom(Y,0.6), type="h", ylim=c(0,1), main="Geometric distribution for p=0.6", ylab="Pr(Y=Y)", xlab="Y=Number of failures before first success")


Geometric distribution using Excel

The geometric distribution, for the number of failures before the first success, is a special case of the
negative binomial distribution In probability theory and statistics, the negative binomial distribution is a discrete probability distribution that models the number of failures in a sequence of independent and identically distributed Bernoulli trials before a specified (non- ...
, for the number of failures before s successes. The Excel function NEGBINOMDIST(number_f, number_s, probability_s) calculates the probability of k = number_f failures before s = number_s successes where ''p'' = probability_s is the probability of success on each trial. For the geometric distribution, let number_s = 1 success. For example, :=NEGBINOMDIST(0, 1, 0.6) = 0.6 :=NEGBINOMDIST(1, 1, 0.6) = 0.24 Like R, Excel uses the convention that k is the number of failures, so that the number of trials up to and including the first success is k + 1.


See also

* Hypergeometric distribution * Coupon collector's problem *
Compound Poisson distribution In probability theory, a compound Poisson distribution is the probability distribution of the sum of a number of independent identically-distributed random variables, where the number of terms to be added is itself a Poisson-distributed variable. ...
*
Negative binomial distribution In probability theory and statistics, the negative binomial distribution is a discrete probability distribution that models the number of failures in a sequence of independent and identically distributed Bernoulli trials before a specified (non- ...


References


External links


Geometric distribution
on MathWorld. {{ProbDistributions, discrete-infinite Discrete distributions Exponential family distributions Infinitely divisible probability distributions Articles with example R code