Geometric Distribution¶
The geometric distribution tells us how likely the first success is given a sequence of \(n\) trials of independent Bernoulli events with probability \(p\). he formula for the Probability Mass Function (PMF) of the random variable \(\mathbf{X}\) is :
\[
\mathbf{X} \sim \text{Geometric}(p)
\]
Since this calculates the probability of the first success occurring on the \(n^th\) trials, the previous trials (before the \(n^th\)) must be failures. By the independence of the trials, the probability of this event is:
\[
\begin{align*}
P(\mathbf{X} = n) &= P(X_0 = 0 \cap X_1 = 0 \cap \cdots \cap X_{n-1} = 0 \cap X_n = 1)\\
&= P(X_0 = 0) \cdot P(X_1 = 0) \cdots P(X_{n-1} = 0) \cdot P(X_n = 1)\\
P(\mathbf{X} = n)&=(1-p)^{n-1}p
\end{align*}
\]