ML Wiki
Machine Learning Wiki - A collection of ML concepts, algorithms, and resources.

Geometric Distribution

Geometric Distribution

A geometric distribution is a Discrete Distribution of Random Variables

Assume we run a series of Bernoulli Trials where the probability of seing the event $A$ is $p$, and, therefore, the probability of not seing $A$ is $q = 1 - p$

The trials stop once $A$ occures, i.e. if $A$ occures at $k$-th trial, it didn’t occur in previous $k -1$ trials

Random Variable $X$ is the number of trials we should run until we see $A$

  • the distribution of $X$ is called Geomentric

Formally, Geometric Distribution describes the waiting time until a success for indepented and identically distributed Bernoulli Random Variables

Typical questions:

  • How long should we flip a coin until we get head?
  • How many times we roll a dice until we get 1?

Cumulative Distribution Function

Suppose the event did not occur in the $(k-1)$-th trial, but occurred in the $k$-th trial. Then by the multiplication theorem for independent events we have the following distribution function:

$P(X = k) = q^{k - 1} p$

Thus, for each $k = 0, 1, 2, …$ we obtain a geometric progression, where $p$ is the first term and $q$ is the common ratio:

$p, qp, q^2 p, …, q^{k - 1} p, …$

Moments

  • $E[X] = \cfrac{p}{1 - p}$
  • $\text{Var}[X] = \cfrac{q}{p^2}$

See Also

Sources