Independent and identically distributed random variables Created 2026-09-24 Updated 2026-10-14
An independent and identically distributed sequence combines two conditions: its members are independent random variables, and every member has the same probability distribution. For a finite sequence with common law , this means that for all measurable sets ,
For an infinite sequence, require this condition for every finite collection of distinct indices. Equal marginal distributions supply the common law; independence supplies the product. Neither condition supplies the other. Grinstead and Snell call the combination an independent trials process.[ref]
Choose a Bernoulli distribution with success probability . Four independent draws produce all sixteen binary patterns with probability each. If instead for one fair Bernoulli random variable , every member still has that same Bernoulli distribution, but only patterns 0000 and 1111 occur. Conversely, independently drawn Bernoulli random variables with success probabilities have a product joint probability distribution but unequal marginal distributions.
Figure 1.
IID sampling combines a common distribution with separate independent draws
. Original constructions of four Bernoulli random variables. Separate arrows in the first and third panels represent explicitly independent source draws; the middle panel copies one shared draw. Dependence and marginal laws are specified by the chosen models. Details.
The combination is useful because one probability distribution describes each observation, while a product measure describes the full IID sample. In particular, an IID sample of finite-variance, real-valued observations has a predictable sample mean: its expected value stays at the population expected value, while its variance of a sample mean decreases as . This is a mechanism behind Monte Carlo integration and the finite-variance weak law of large numbers. Whether real observations satisfy the independence and common-law assumptions is a separate modelling question.
A good pseudorandom number generator for Monte Carlo integration should have approximately uniform outputs, a period much longer than the intended run, and negligible detectable dependence both serially and in higher-dimensional tuples. It should be fast, reproducible from a seed, portable enough to reproduce a calculation, and numerically precise enough for the required tail probabilities. Values strictly inside avoid singularities in logarithmic inverse transform sampling. Separate simulations also need well-separated streams or seeds, rather than accidentally identical streams. A pseudorandom number generator is deterministic; these properties mean that it imitates independent uniform distributions sufficiently well for the application, not that its outputs are literally independent.
There is a genuine normalization error in the printed function. Write independently, and . The internal sum produces a scalar; taking its mean does not divide by . The literal returned value is therefore
Since and , its expectation is
It does not estimate unbiasedly unless , and no fixed control variate coefficient removes this bias. In particular the actual call with returns
This is an instance of summing before taking a mean changes Monte Carlo normalization.
The intended corrected method replaces the sum by a sample mean:
It uses symmetry to write the tail as , then Monte Carlo integration on a bounded interval, and finally a mean-zero control variate. For the intended estimator is , whose summands are smooth and bounded. Keeping the average normalization, and
Differentiating this quadratic gives the Cauchy tail control variate on a bounded interval coefficient
Here , , so . Also
Consequently
The negative sign is consistent with decreasing and increasing. One may estimate the covariance and variance using a separate pilot sample and fix the resulting coefficient for a fresh sample. This coefficient minimizes the literal function's variance as well, but its missing factor of still leaves the bias above.
Under independent area counts and independent area prior distributions, the joint posterior distribution factors into the gamma posteriors. For each simulation , draw one joint vector by independently generating
Rank the risks within that joint draw, taking rank one to mean highest risk:
The empirical posterior rank distribution and highest-risk probability are
Independent gamma draws make this direct Monte Carlo integration, so Markov chain Monte Carlo is unnecessary here. Continuous posteriors give ties probability zero, and the highest-risk probabilities sum to one. The same ranking calculation can be applied to dependent joint draws from a richer hierarchical Bayesian model; ranking separate posterior means would discard the uncertainty that the program is intended to measure.
A pseudorandom number generator is a deterministic state-update algorithm producing numbers intended to imitate an independent sequence from a prescribed probability distribution. For Monte Carlo integration, desirable features include good one-dimensional and multidimensional uniformity, a period far longer than the calculation, negligible detectable dependence, reproducible seeds, sufficient numerical precision and fast generation. Uniform marginal distributions alone do not provide independent draws.