Jump to content

Geometric distribution

From Wikipedia, the free encyclopedia
Geometric
Probability mass function
Cumulative distribution function
Parameters success probability (real) success probability (real)
Support k trials where k failures where
PMF
CDF for ,
for
for ,
for
Mean
Median


(not unique if is an integer)


(not unique if is an integer)
Mode
Variance
Skewness
Excess kurtosis
Entropy
MGF
for

for
CF
PGF

In probability theory and statistics, the geometric distribution is either one of two discrete probability distributions:

  • The probability distribution of the number of Bernoulli trials needed to get one success, supported on ;
  • The probability distribution of the number of failures before the first success, supported on .

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 ); 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 independent trials, each with success probability . If the probability of success on each trial is , then the probability that the -th trial is the first success is

for

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:

for

In either case, the sequence of probabilities is a geometric sequence.

Definition[edit]

The geometric distribution is the discrete probability distribution that describes when the first success in an infinite sequence of independent and identically distributed Bernoulli trials occurs. Its probability mass function iswhere is the number of trials and is the probability of success in each trial.[1]: 260–261 

Alternatively, some texts define the distribution where and call the former the zero-truncated geometric distribution. This alters the probability mass function into:[2]: 66 An example of a geometric distribution arises from rolling a six-sided die until a "1" appears. Each roll is independent with a chance of success. The number of rolls needed follows a geometric distribution with .

Properties[edit]

Memorylessness[edit]

The geometric distribution is the only memoryless discrete probability distribution.[3] It is the discrete version of the same property found in the exponential distribution.[4] The property asserts that the number of previously failed trials does not affect the number of future trials needed for a success. Expressed in terms of conditional probability, where and are natural numbers. The equality is still true when ≥ is substituted.[2]: 71 

Moments and cumulants[edit]

The expected value and variance of a geometrically distributed random variable defined over is[1]: 261  When a geometrically distributed random variable defined over , the expected value changes intowhile the variance stays the same.[5]: 114–115 

For example, when rolling a six-sided die until landing on a "1", the average number of rolls needed is and the average number of failures is .

The moments for the number of failures before the first success are given by

where is the polylogarithm function.

The cumulants of the probability distribution of Y satisfy the recursion

where , the expected value of a geometrically distributed random variable defined over .

Proof of expected value[edit]

Consider the expected value of X as above, i.e. the average number of trials until a success. On the first trial, we either succeed with probability , or we fail with probability . If we fail the remaining mean number of trials until a success is identical to the original mean. This follows from the fact that all trials are independent. From this we get the formula:

which, if solved for , gives:

The expected value of can be found from the linearity of expectation, . It can also be shown in the following way:

The interchange of summation and differentiation is justified by the fact that convergent power series converge uniformly on compact subsets of the set of points where they converge.

Summary statistics[edit]

The mean of the geometric distribution is its expected value which is, as previously discussed in § Moments and cumulants, or when defined over or respectively.

The median of the geometric distribution is when defined over .[2]: 69 

The mode of the geometric distribution is the first value in the support set. This is 1 when defined over and 0 when defined over .[2]: 69 

The skewness of the geometric distribution is .[5]: 115 

The kurtosis of the geometric distribution is .[5]: 115  The excess kurtosis of a distribution is the difference between its kurtosis and the kurtosis of a normal distribution, .[6]: 217  Therefore, the excess kurtosis of the geometric distribution is . Since , the excess kurtosis is always positive so the distribution is leptokurtic.[2]: 69  In other words, the tail of a geometric distribution decays faster than a Gaussian.[6]: 217 

General properties[edit]

  • The probability generating functions of geometric random variables and defined over and are, respectively,[5]: 114–115 
  • 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.[citation needed]
  • 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 Y1, ..., Yn whose sum has the same distribution that Y has. These will not be geometrically distributed unless n = 1; they follow a negative binomial distribution.
  • The decimal digits of the geometrically distributed random variable Y are a sequence of independent (and not identically distributed) random variables.[citation needed] For example, the hundreds digit D has this probability distribution:
where q = 1 − p, and similarly for the other digits, and, more generally, similarly for numeral systems 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.

Related distributions[edit]

  • The sum of independent geometric random variables with parameter is a negative binomial random variable with parameters and .[8] The geometric distribution is a special case of the negative binomial distribution, with .
  • The geometric distribution is a special case of discrete compound Poisson distribution.
  • The minimum of geometric random variables with parameters is also geometrically distributed with parameter .[9]
  • Suppose 0 < r < 1, and for k = 1, 2, 3, ... the random variable Xk has a Poisson distribution with expected value rk/k. Then
has a geometric distribution taking values in , with expected value r/(1 − r).[citation needed]
  • The exponential distribution is the continuous analogue of the geometric distribution. Applying the floor function to the exponential distribution with parameter creates a geometric distribution with parameter defined over .[2]: 74  This can be used to generate geometrically distributed random numbers as detailed in § Random variate generation.
  • If p = 1/n and X is geometrically distributed with parameter p, then the distribution of X/n approaches an exponential distribution with expected value 1 as n → ∞, since

More generally, if p = λ/n, where λ is a parameter, then as n→ ∞ the distribution of X/n approaches an exponential distribution with rate λ:

therefore the distribution function of X/n converges to , which is that of an exponential random variable.

Statistical inference[edit]

The true parameter of an unknown geometric distribution can be inferred through estimators and conjugate distributions.

Method of moments[edit]

Provided they exist, the first moments of a probability distribution can be estimated from a sample using the formulawhere is the th sample moment and .[10]: 349–350  Estimating with gives the sample mean, denoted . Substituting this estimate in the formula for the expected value of a geometric distribution and solving for gives the estimators and when supported on and respectively. These estimators are biased since as a result of Jensen's inequality.[11]: 53–54 

Maximum likelihood estimation[edit]

The maximum likelihood estimator of is the value that maximizes the likelihood function given a sample.[10]: 308  By finding the zero of the derivative of the log-likelihood function when the distribution is defined over , the maximum likelihood estimator can be found to be , where is the sample mean.[12] If the domain is , then the estimator shifts to . As previously discussed in § Method of moments, these estimators are biased.

Regardless of the domain, the bias is equal to

which yields the bias-corrected maximum likelihood estimator,

Bayesian inference[edit]

In Bayesian inference, the parameter is a random variable from a prior distribution with a posterior distribution calculated using Bayes' theorem after observing samples.[11]: 167  If a beta distribution is chosen as the prior distribution, then the posterior will also be a beta distribution and it is called the conjugate distribution. In particular, if a prior is selected, then the posterior, after observing samples , is[13]Alternatively, if the samples are in , the posterior distribution is[14]The posterior mean approaches its maximum likelihood estimate as and approach zero, regardless of the support.

Random variate generation[edit]

The geometric distribution can be generated experimentally from i.i.d. standard uniform random variables by finding the first such random variable to be less than or equal to . However, the number of random variables needed is also geometrically distributed and the algorithm slows as decreases.[15]: 498 

Random generation can be done in constant time by truncating exponential random numbers. An exponential random variable can become geometrically distributed with parameter through . In turn, can be generated from a standard uniform random variable altering the formula into .[15]: 499–500 [16]

Computational methods[edit]

In the programming language R, the function dgeom(k, prob) calculates the probability of k failures before a success with a success probability prob for each trial.

In Microsoft Excel, the function NEGBINOMDIST(number_f, number_s, probability_s) can be used to calculate the number of failures, number_f, before a number of successes, number_s, with a success probability, probability_s, for each trial. Setting number_s to 1, gives the geometric distribution.[17]

See also[edit]

References[edit]

  1. ^ a b Nagel, Werner; Steyer, Rolf (2017-04-04). Probability and Conditional Expectation: Fundamentals for the Empirical Sciences. Wiley Series in Probability and Statistics (1st ed.). Wiley. doi:10.1002/9781119243496. ISBN 978-1-119-24352-6.
  2. ^ a b c d e f Chattamvelli, Rajan; Shanmugam, Ramalingam (2020). Discrete Distributions in Engineering and the Applied Sciences. Synthesis Lectures on Mathematics & Statistics. Cham: Springer International Publishing. doi:10.1007/978-3-031-02425-2. ISBN 978-3-031-01297-6.
  3. ^ Dekking, Frederik Michel; Kraaikamp, Cornelis; Lopuhaä, Hendrik Paul; Meester, Ludolf Erwin (2005). A Modern Introduction to Probability and Statistics. Springer Texts in Statistics. London: Springer London. p. 50. doi:10.1007/1-84628-168-7. ISBN 978-1-85233-896-1.
  4. ^ Johnson, Norman L.; Kemp, Adrienne W.; Kotz, Samuel (2005-08-19). Univariate Discrete Distributions. Wiley Series in Probability and Statistics (1 ed.). Wiley. p. 228. doi:10.1002/0471715816. ISBN 978-0-471-27246-5.
  5. ^ a b c d Forbes, Catherine; Evans, Merran; Hastings, Nicholas; Peacock, Brian (2010-11-29). Statistical Distributions (1st ed.). Wiley. doi:10.1002/9780470627242. ISBN 978-0-470-39063-4.
  6. ^ a b Chan, Stanley (2021). Introduction to Probability for Data Science (1st ed.). Michigan Publishing. ISBN 978-1-60785-747-1.
  7. ^ Gallager, R.; van Voorhis, D. (March 1975). "Optimal source codes for geometrically distributed integer alphabets (Corresp.)". IEEE Transactions on Information Theory. 21 (2): 228–230. doi:10.1109/TIT.1975.1055357. ISSN 0018-9448.
  8. ^ Pitman, Jim (1993). Probability. New York, NY: Springer New York. p. 372. doi:10.1007/978-1-4612-4374-8. ISBN 978-0-387-94594-1.
  9. ^ Ciardo, Gianfranco; Leemis, Lawrence M.; Nicol, David (1 June 1995). "On the minimum of independent geometrically distributed random variables". Statistics & Probability Letters. 23 (4): 313–326. doi:10.1016/0167-7152(94)00130-Z. hdl:2060/19940028569. S2CID 1505801.
  10. ^ a b Evans, Michael; Rosenthal, Jeffrey (2023). Probability and Statistics: The Science of Uncertainty (2nd ed.). ISBN 978-1429224628.
  11. ^ a b Held, Leonhard; Sabanés Bové, Daniel (2020). Likelihood and Bayesian Inference: With Applications in Biology and Medicine. Statistics for Biology and Health. Berlin, Heidelberg: Springer Berlin Heidelberg. doi:10.1007/978-3-662-60792-3. ISBN 978-3-662-60791-6.
  12. ^ Siegrist, Kyle (2020-05-05). "7.3: Maximum Likelihood". Statistics LibreTexts. Retrieved 2024-06-20.
  13. ^ Fink, Daniel. "A Compendium of Conjugate Priors". CiteSeerX 10.1.1.157.5540.
  14. ^ "3. Conjugate families of distributions" (PDF). Archived (PDF) from the original on 2010-04-08.
  15. ^ a b Devroye, Luc (1986). Non-Uniform Random Variate Generation. New York, NY: Springer New York. doi:10.1007/978-1-4613-8643-8. ISBN 978-1-4613-8645-2.
  16. ^ Knuth, Donald Ervin (1997). The Art of Computer Programming. Vol. 2 (3rd ed.). Reading, Mass: Addison-Wesley. p. 136. ISBN 978-0-201-89683-1.
  17. ^ "3.5 Geometric Probability Distribution using Excel Spreadsheet". Statistics LibreTexts. 2021-07-24. Retrieved 2023-10-20.

External links[edit]