A random variable turns the outcome of a trial into a number, and a distribution describes the probability of each of those numbers occurring. Memorizing distribution names and formulas alone isn’t enough: when modeling, you also need to know what the parameters actually represent, whether the data fits the model’s assumptions, and what information the mean and variance leave out.
This article first builds up the numerical tools used to describe a single distribution, then compares common discrete and continuous distributions, and finally generalizes from a single random variable to a random vector. Whenever a PMF, PDF, or CDF is used, the necessary definitions are given inline, so this article doesn’t require having read the other articles in the series first.
1. Describing a Random Variable with a Distribution and Numerical Summaries
1.1 The PMF, PDF, and CDF Answer Different Questions
A discrete random variable uses a probability mass function (PMF) , and the probabilities of all possible values must satisfy and . A continuous random variable uses a probability density function (PDF) , with interval probability given by . A density value itself is not a probability; for a continuous variable, typically holds, and what’s actually meaningful is the area under a stretch of the curve.
A cumulative distribution function (CDF) applies equally to discrete and continuous variables. The CDF can compute interval and tail probabilities directly, for example ; for a continuous , . When comparing two models, first confirm whether you’re working with a point probability, a density, or a cumulative probability — doing so avoids mistaking a PDF’s height for an event’s probability.
1.2 Expectation, Variance, and Moments
Expectation describes the center of gravity of a distribution. In the discrete case, ; in the continuous case, . Expectation isn’t necessarily a value you could actually observe: a fair six-sided die has an expected value of , but no single roll will ever come up . Expectation also isn’t guaranteed to exist; a distribution whose tail decays too slowly can make the integral diverge.
Variance measures the squared deviation of observations relative to the mean . The standard deviation shares the same units as , making it easier to interpret than the variance. If a server’s latency has a mean of 100 ms and a standard deviation of 10 ms, the standard deviation directly describes the fluctuation in milliseconds; the variance’s units are squared milliseconds instead.
The -th order raw moment is , and the -th order central moment is . The first-order raw moment is just the mean, and the second-order central moment is just the variance; the standardized third-order central moment forms skewness, used to describe left-right asymmetry; the standardized fourth-order central moment relates to kurtosis, used to describe tail weight and concentration. A finite number of moments generally can’t fully determine a distribution, and some distributions don’t have higher-order moments at all, so moments are a summary, not the distribution itself.
1.3 Median, Quantiles, and Tail Risk
The median is the 0.5 quantile. More generally, the quantile can be defined as ; the 25th, 50th, and 75th percentiles respectively describe a distribution’s quartile positions. The interquartile range is less sensitive to extreme values, making it suitable for describing skewed data or data containing outliers.
The difference between the mean and the median can reveal skew. When nine latency measurements are 20 ms and one is 1020 ms, the mean is 120 ms while the median is still 20 ms. The mean reflects the total cost caused by extreme latency, while the median reflects the typical request; the two numbers answer different questions. Service reliability reporting usually also needs to report , , or the tail probability of exceeding a threshold, , since distributions sharing the same mean and standard deviation can still have drastically different tails.
2. Common Discrete Distributions
2.1 Bernoulli, Binomial, and Geometric
The Bernoulli distribution describes a single trial with only success or failure. If with success probability , this is written ; its expectation is , and its variance is . The parameter must have a clear meaning within each specific trial it’s applied to — for example, the probability that “a request completes within 200 ms” — rather than an abstract success rate with no time frame or scope attached.
The Binomial distribution describes the total number of successes across independent Bernoulli trials sharing the same success rate. If , then , , . Suppose 20 independent requests each have a 5% chance of failing; the number of failures can be modeled as , and the probability of exactly two failures is . If the requests share the same failing node, failure events could be highly correlated, and the Binomial’s independence assumption would no longer hold.
The Geometric distribution describes how many trials are needed before the first success. If the trial number on which success occurs is denoted , then and . Some textbooks instead denote the number of failures as a variable starting at 0; you must confirm where the counting starts before applying a formula. The Geometric distribution has the discrete memoryless property, making it suitable for waiting-time problems with a fixed success rate and independent trials.
2.2 The Poisson Distribution
The Poisson distribution describes the number of events within a fixed interval. If , then , and . The parameter is the average number of events within the specified interval; if the average is 3 requests per minute, the mean for a ten-minute interval, under a homogeneity assumption, is 30 — you can’t still plug in a parameter of 3.
The Poisson model generally assumes events occur individually and independently of one another within very short intervals, and that the average rate is fixed across the interval being studied. A large gap between the mean and the sample variance may indicate overdispersion in the data, a rate that changes over time, or clustering of events. The Poisson distribution for a fixed interval only describes a single count variable; to describe how a count accumulates over time, and the relationship between a count and the waiting time, see Stochastic Processes 9: The Poisson Process.
2.3 Categorical and Multinomial
The Categorical distribution extends Bernoulli’s two outcomes to mutually exclusive categories, with parameters given by a probability vector , where every and they sum to 1. A single request’s status might be split into success, client error, and server error, with the three probabilities together defining one Categorical trial.
The Multinomial distribution further extends a single Categorical trial to independent, identically distributed trials, giving the count of each category , satisfying . The counts of the different categories can’t be independent of one another, since one more count in one category necessarily reduces the total available for the others. This constraint foreshadows an important idea: every component of multi-dimensional data may each have a simple marginal distribution, yet the components remain constrained by their joint structure.
3. Common Continuous Distributions
3.1 Uniform, Exponential, and Gamma
The Uniform distribution has a fixed density of on the interval , with expectation and variance . The model assumes every equal-length subinterval has the same probability, making it suitable for describing a location with no preference within a bounded range; Uniform shouldn’t be adopted just because the data happens to fall within some range — the observation mechanism still needs to support the uniformity assumption.
The Exponential distribution is commonly used to describe the gaps between events in a Poisson process, with density (), expectation , and variance . The larger the rate , the shorter the average waiting time. The Exponential’s memoryless property, , means that time already waited doesn’t change the distribution of the remaining waiting time; lifetime data exhibiting aging, wear, or queuing clustering usually doesn’t satisfy this assumption.
The Gamma distribution can describe the accumulation of multiple independent Exponential waiting times. Using the shape-rate parameterization , the expectation is and the variance is . Different software may use the scale instead of the rate; when you encounter Gamma parameters, you must first confirm whether the second parameter is a rate or a scale.
3.2 The Normal Distribution and Standardization
The Normal distribution is determined by the location parameter and the scale parameter , with expectation and variance . Standardizing via gives , so observations in different units can be converted into a number of standard deviations from the mean.
If a part’s length can be approximated as mm, and the spec requires 96 to 104 mm, the standardized bounds are -2 and 2, so the pass rate is approximately . This computed result depends on the Normal assumption; if the distribution is skewed, has heavy tails, or mixes several production batches together, applying the 68-95-99.7 rule based on the mean and standard deviation alone will underestimate tail probability.
The Normal distribution commonly shows up in measurement errors and sample means arising from many small effects added together, but “having a lot of data” doesn’t automatically make the raw data itself follow a Normal distribution. The central limit theorem typically describes a centered and rescaled sum or mean, not every individual observation from an arbitrary population.
3.3 Choosing a Candidate Model Based on the Data’s Type
A distribution’s name should be determined jointly by the random mechanism and the support set. For a binary outcome, consider Bernoulli first; for the number of successes within a fixed number of trials, consider Binomial; for a sparse event count within a fixed time period, consider Poisson; for a positive waiting time, compare Exponential, Gamma, or other lifetime distributions; for a location with roughly no preference within upper and lower bounds, consider Uniform; for a real-valued quantity formed by summing many small errors, consider Normal.
A candidate model still needs to be checked against the data. A researcher can compare histograms, the empirical CDF, sample quantiles against model quantiles, and check whether the mean and variance are consistent with the parameter constraints. A model is an approximation carrying assumptions; when choosing a distribution, the generating mechanism, the support set, and tail behavior matter more than the shape of the curve.
4. Joint, Marginal, and Conditional Distributions
4.1 A Joint Distribution Preserves How Variables Occur Together
The joint PMF of two discrete random variables is ; two continuous random variables can instead use the joint density . A joint distribution needs to be normalized over every possible combination, and it contains the complete information about both the individual variables’ distributions and the dependence between them.
Consider a data table sampled with equal probability: each take the values with probability . ’s distribution alone only tells the reader , and ‘s distribution alone only tells the reader , , . The joint PMF additionally preserves the dependence structure that never equals 2 when , and never equals 0 when .
A joint distribution can be generalized to a random vector . Each observation is no longer a single number, but a point in -dimensional space. For example, a request might be represented by a three-dimensional random vector made up of latency, response size, and CPU time; a multivariate distribution describes how each of the three components varies on its own, as well as how they vary together.
4.2 Marginal Distributions and Conditional Distributions
Summing a joint PMF over a variable you don’t care about gives the marginal PMF: . In the continuous case, this becomes an integral instead: . This operation is called marginalization, meaning that the specific value of is ignored, keeping only ‘s distribution.
After observing , the discrete conditional distribution is , provided . In the four-point example above, and only satisfies that condition, so ; without that conditioning information, . A conditional distribution quantifies how newly added information changes uncertainty, and it’s also the shared foundation of regression, classification, Bayesian inference, and sequence models.
Knowing all of the marginal distributions still isn’t enough to reconstruct the joint distribution. Two Bernoulli variables could be mutually independent, could satisfy , or could satisfy ; all three cases have the same marginal distributions, but completely different joint behavior. Stochastic processes therefore must study the joint distribution across different points in time, rather than just listing distributions point by point; for a more complete extension, see Stochastic Processes 2: Joint Distributions, Correlation, and Dependence Structure.
5. Independence, Covariance, and Correlation
5.1 Independence Is a Requirement on the Entire Joint Distribution
Discrete variables and are independent when every possible combination satisfies ; continuous variables are independent when . Equivalently, knowing doesn’t change ‘s conditional distribution. Independence is a stronger claim than “the two variables don’t appear to show a trend” — it must be supported by the joint distribution itself, or by a reasonable generating mechanism.
If and are independent and the relevant expectations exist, then holds for any suitable functions . The reverse generally doesn’t hold: one particular expectation factoring doesn’t prove that the entire joint distribution factors.
5.2 Covariance and the Correlation Coefficient
Covariance describes linear co-movement. A positive value indicates the two variables tend to deviate from their respective means in the same direction, a negative value indicates opposite directions, and zero indicates no linear co-movement. Covariance is affected by units; converting meters to centimeters scales the covariance up by a factor of 100.
The Pearson correlation coefficient removes the scale, landing within , provided both standard deviations are greater than 0. close to 1 or -1 indicates a strong linear relationship, while close to 0 only indicates a weak linear relationship. A correlation coefficient provides no direction of causation, and it can also be misled by extreme values, mixed subgroups, or nonlinear relationships.
Zero correlation doesn’t imply independence. Let be uniformly distributed on , and let . Symmetry gives and , so ; yet is entirely determined by , and the two are clearly not independent. Independence together with the existence of second-order moments implies zero covariance; zero covariance only implies independence when additional conditions hold, such as jointly Normal.
5.3 The Covariance Matrix and Linear Combinations
For a -dimensional random vector , the mean vector is written , and the covariance matrix is written . The matrix entries are ; the diagonal holds each component’s variance, and the off-diagonal holds the pairwise covariances. A covariance matrix is always symmetric and positive semi-definite, so any vector satisfies . The multivariate Normal distribution is determined by the mean vector and covariance matrix; within this distribution family, zero covariance also implies independence between the corresponding components.
Suppose two services’ per-minute load are , each with a standard deviation of 10. If the correlation coefficient is 0.8, the variance of their combined load is , giving a standard deviation of about 18.97; if the two are independent instead, the combined load’s standard deviation is . With the same per-machine fluctuation, positive correlation still increases the uncertainty of the total capacity. Resource allocation, portfolio construction, and multi-sensor fusion all need to preserve the covariance matrix — you can’t just keep each component’s standard deviation separately.
A distribution describes the possible values and their probabilities, a numerical summary compresses the features of a distribution, and a joint distribution fills in the patterns of how multiple variables occur together. With these three levels of distinction in place, the parameter estimation, confidence intervals, the law of large numbers, and the central limit theorem that follow all have a clear subject: which distribution the data comes from, what the unknown parameters are, and how a statistic varies under repeated sampling.