Guozhen AIGlobal AI field notes and model intelligence

English translation

Set parameters

Published:

Category: Probability Theory

Read time: 4 min

Reads: 0

Lesson #10Views are counted together with the original Chinese articleImages are preserved from the source page

Conceptual Diagram of the Geometric Distribution

The geometric distribution models how long we must wait until the first success. It is appropriate for “waiting time” problems—not for counting how many successes occur within a fixed number of trials.

Geometric Distribution Checklist

I distinguish between the binomial and geometric distributions as follows:

  • The binomial distribution asks how many successes occur in a fixed number of trials.
  • The geometric distribution asks on which trial the first success occurs.

The geometric distribution is a discrete probability distribution that describes the number of independent Bernoulli trials needed until the first success occurs. In other words, it answers the question: “On which trial does the first success happen?” This makes it especially well-suited for modeling “waiting time” scenarios.

Definition of the Geometric Distribution

Let the random variable XX denote the trial number on which the first success occurs in a sequence of independent, identical Bernoulli trials, where each trial succeeds with probability pp. Then XX follows a geometric distribution with parameter pp, denoted XGeom(p)X \sim \text{Geom}(p).

Geometric Distribution Decision Card

To identify whether a scenario follows a geometric distribution, first verify that:

  • Each trial is independent;
  • The success probability pp remains constant across trials; and
  • The question concerns the position (trial number) of the first success.

Probability Mass Function (PMF)

The probability mass function (PMF) of the geometric distribution is:

P(X=k)=(1p)k1pfor k=1,2,3,P(X = k) = (1-p)^{k-1} p \quad \text{for } k = 1, 2, 3, \ldots

Here, P(X=k)P(X = k) represents the probability that the first success occurs on the kk-th trial.

Cumulative Distribution Function (CDF)

The cumulative distribution function (CDF) is given by:

P(Xk)=1(1p)kfor k=1,2,3,P(X \leq k) = 1 - (1-p)^k \quad \text{for } k = 1, 2, 3, \ldots

Key Properties of the Geometric Distribution

The geometric distribution possesses several important properties that aid both theoretical understanding and practical application:

Probability Reading Map Card

Content like “Geometric Distribution Among Common Probability Distributions” can easily get lost in details. First, follow the main conceptual thread illustrated in the diagram—then return to the text to verify the context, inputs, outputs, and decision criteria.

  1. Expected Value (Mean):

    • The expected value of XX is E(X)=1pE(X) = \frac{1}{p}.
  • Variance:

    • The variance of XX is Var(X)=1pp2\mathrm{Var}(X) = \frac{1-p}{p^2}.
  • These properties make the geometric distribution highly useful in real-world applications such as:

    • Determining how many times a fair coin must be flipped before observing the first “heads”.
    • Modeling the number of customers arriving at a service counter until the first one receives successful service.

    Application Examples

    Coin-Flipping Example

    Suppose you flip a fair coin, where the probability of heads (“success”) is p=0.5p = 0.5. You wish to know the number of flips required until the first heads appears. By definition, the random variable XX representing this count follows XGeom(0.5)X \sim \text{Geom}(0.5).

    Computing Probabilities

    We compute the probability that the first heads occurs on the kk-th flip:

    For k=1k = 1:

    P(X=1)=(10.5)110.5=10.5=0.5P(X = 1) = (1-0.5)^{1-1} \cdot 0.5 = 1 \cdot 0.5 = 0.5

    For k=3k = 3:

    P(X=3)=(10.5)310.5=(0.5)20.5=0.250.5=0.125P(X = 3) = (1-0.5)^{3-1} \cdot 0.5 = (0.5)^2 \cdot 0.5 = 0.25 \cdot 0.5 = 0.125

    These results indicate the probabilities that the first success occurs on the first or third trial, respectively.

    Computing Expectation and Variance

    • For the coin-flipping scenario, the expected value is:
    E(X)=1p=10.5=2E(X) = \frac{1}{p} = \frac{1}{0.5} = 2

    This means that, on average, two flips are needed to observe the first heads.

    • The variance is:
    Var(X)=1pp2=0.5(0.5)2=2\mathrm{Var}(X) = \frac{1-p}{p^2} = \frac{0.5}{(0.5)^2} = 2

    This indicates that observed numbers of flips will fluctuate around the mean of 2, with a variance of 2.

    Python Example

    Below is a simple Python example demonstrating how to compute and visualize the PMF of a geometric distribution:

    import numpy as np
    import matplotlib.pyplot as plt
    
    # Set parameters
    p = 0.5
    k = np.arange(1, 21)  # Trial numbers from 1 to 20
    
    # Compute geometric PMF
    pmf = (1 - p) ** (k - 1) * p
    
    # Plot the distribution
    plt.bar(k, pmf)
    plt.xlabel('Trial Number (k)')
    plt.ylabel('Probability P(X=k)')
    plt.title('Geometric Distribution (p=0.5)')
    plt.xticks(k)
    plt.show()
    

    In this code, we set p=0.5p = 0.5 and compute the probability that the first success occurs on each of the first 20 trials. The resulting probabilities are visualized using a bar chart.

    Application Review Card: Geometric Distribution Among Common Probability Distributions

    After studying “Geometric Distribution Among Common Probability Distributions”, try adapting it to a scenario of your own—pay close attention to whether the inputs, processing logic, and outputs align coherently.

    Application Verification Card: Geometric Distribution Among Common Probability Distributions

    To apply “Geometric Distribution Among Common Probability Distributions” to your own task, start by narrowing the scope—focus on validating just one critical decision point.

    Summary

    The geometric distribution is a fundamental probability distribution used to model waiting-time phenomena and enjoys wide practical applicability. Having explored its definition, key properties, and concrete examples, we are now better equipped to apply it effectively to real-world problems.

    In the next section, we will delve deeper into computing expectations of random variables and further examine their relationship with variance—strengthening our foundational understanding of probability theory, especially as applied to practical problems.

    Continue

    Keep reading from here

    Browse English site

    Reader Messages

    Reader messages

    Questions, corrections, extra sources, or hands-on results can be left here. No login is required.

    Max 800 characters

    To reduce spam, each message is checked for length, link count, and posting frequency.

    0/800

    Messages

    0 messages
    Loading messages...