Intuition

A probability distribution answers a simple question: how likely is each possible outcome? Roll a die and every face has probability . Measure human heights and values cluster around a central peak. Distributions give us a precise language for these patterns - discrete distributions count outcomes, continuous distributions measure them.

Understanding distributions matters because almost every statistical method (estimation, testing, regression) assumes the data follow some distribution. Choosing the right one shapes the analysis. In CS, distributions also underpin average-case analysis: the “average” is an expectation over an assumed input distribution.

Core Idea

Discrete distributions

A probability mass function (PMF) assigns a probability to each value in a countable set: .

Bernoulli - a single trial with success probability :

Binomial - independent Bernoulli trials, counting successes:

Mean , variance .

Poisson - count of events in a fixed interval when events arrive at rate :

Mean and variance both equal . The Poisson approximates the binomial when is large and is small.

Continuous distributions

A probability density function (PDF) gives probability via integration: .

Normal (Gaussian) - the bell curve, parameterized by mean and variance :

The Central Limit Theorem guarantees that sums of independent random variables converge to a normal distribution, which is why it appears everywhere.

Exponential - time between Poisson events, parameterized by rate :

Mean , variance . It is memoryless: .

Cumulative distribution function

The CDF works for both discrete and continuous distributions. For continuous , . For discrete , . The CDF is non-decreasing, right-continuous, and ranges from 0 to 1.

Tip

The CDF is the unifying abstraction. Any distribution - discrete, continuous, or mixed - has a CDF. Many statistical tests (Kolmogorov–Smirnov, Anderson–Darling) operate directly on CDFs rather than PMFs or PDFs.

Key relationships

DistributionSupportParametersMeanVariance
Bernoulli
Binomial
Poisson
Normal
Exponential

Example

Server request arrivals. Suppose a web server receives requests at an average rate of per second. The number of requests in a given second follows a Poisson distribution:

The time between consecutive requests follows an Exponential distribution with :

So there is roughly an 8% chance of waiting more than half a second between requests - useful for timeout tuning and capacity planning.