# $$\text{GeometricCDF}$$¶

You can use the $$\text{GeometricCDF}$$ function to calculate the cumulative distribution function (CDF) of the geometric distribution.

You can use the \geometricc backslash command to insert this function.

The following variants of this function are available:

• $$\text{real } \text{GeometricCDF} \left ( \text{<k>}, \text{<p>} \right )$$

Where $$k$$ is a positive integer value representing the number of trials and $$p$$ represents the success probability for each trial. Note that the $$\text{GeometricCDF}$$ function is defined over the range $$k > 0$$ and $$0 \leq p \leq 1$$ and will generate a runtime error or return NaN for all other values.

The value is calculated directly using the relation:

$\text{GeometricCDF} \left ( k, p \right ) = 1 - \left ( 1 - p \right ) ^ k$

The geometric distribution calculates the probability of success after $$k$$ trials where the probability of success for any given trial is given by $$p$$.

As an example, imagine you are drawing cards from a an infinitely large shuffled deck. The probability of drawing a club for the first time when drawing the third card from the deck would be $$\text{GeometricCDF} \left ( 3, \frac{1}{4} \right )$$

Note that, like the exponential distribution, the geometric distribution models a memoryless process where the outcome from any trial is independent of the outcome of previous trials. The geometric distribution models discrete memoryless processes whereas the exponential distribution models continuous processes.

Figure 145 shows the basic use of the $$\text{GeometricCDF}$$ function.

Figure 145 Example Use Of The GeometricCDF Function