Course contentsShow
← Machine Learning and Deep Learning
Lesson 68 of 3,5381. Mathematical Foundations for Machine LearningFree lesson

Exponential and Gamma Distributions

Model waiting times and event intervals with exponential and gamma distributions.

Exponential and Gamma Distributions

What you'll learn: How to model waiting times between events and the time until multiple events occur using exponential and gamma distributions.

Understanding the Exponential Distribution

Imagine you're waiting for the next customer to arrive at a store, or for your computer to receive the next network packet. The exponential distribution models the time between independent events that happen at a constant average rate.

If events occur randomly but at a steady average pace (like radioactive decay or website visits), the exponential distribution tells you the probability of waiting a certain amount of time until the next event.

Key property: It's "memoryless" — if you've already waited 5 minutes for a bus, the probability of waiting another 10 minutes is the same as if you just arrived. Past waiting doesn't affect future waiting.

The probability density function involves a single parameter λ (lambda), the rate of events:

  • Higher λ means events happen more frequently (shorter waits)
  • Lower λ means longer typical waits

Understanding the Gamma Distribution

The gamma distribution generalizes the exponential distribution. While exponential models waiting for one event, gamma models waiting for multiple events to occur.

Think of it this way: exponential answers "when will the next customer arrive?" while gamma answers "when will the 5th customer arrive?"

The gamma distribution has two parameters:

  • Shape (k): number of events you're waiting for
  • Rate (λ): how frequently events occur

When k=1, gamma reduces to exponential — they're part of the same family!

Why This Matters in ML

These distributions appear when modeling time-series data, survival analysis (time until failure), and queueing systems. They help capture realistic timing patterns in real-world data.

Key Takeaway: Exponential distributions model single waiting times with constant event rates, while gamma distributions model cumulative waiting times for multiple events — both essential for time-based probabilistic modeling.