Uniform labelled tree generation 2026-10-14
For , choose independent random variables, each with the uniform distribution on a finite set , and decode their values as a Prüfer sequence. Every sequence has probability , and the bijection gives each labelled tree the same probability. This produces a uniform spanning tree of the complete graph without repeatedly proposing sets of edges and rejecting those that fail to be trees. It supplies random inputs for testing implementations of breadth-first search and a tractable model of random connections. [ref]
https://sites.math.rutgers.edu/~zeilberg/Combo20/hw.html. Doron Zeilberger, Rutgers Math 454 (2020), Lecture 23: generate random labelled trees by sampling and inverting Prüfer codes
This distribution is uniform over fixed-label trees, rather than over unlabelled trees. With four labels, the star graph shape has probability and the path graph shape has probability . Also, for a fixed label , the Prüfer degree formula givesHere the binomial distribution counts the independent code positions equal to . The expected value agrees with the average vertex degree from the degree-sum formula. Individual labels have the same distribution by symmetry, though their vertex degrees are constrained together by their fixed sum. When , simply return the single isolated vertex.
Universal hash family 2026-10-13
A universal hash family is a finite collection of hash functions into an output set of size such that, for any fixed distinct inputs ,The choice of uses the uniform distribution on a finite set. The keys are fixed before that choice: the randomness belongs to the hash function, so the guarantee does not assume naturally random keys. Choose one member and keep it while using the table; changing it requires redistributing the stored records. The bound holds separately for every distinct pair, without requiring uniform individual outputs or independent random variables. A strongly universal hash family supplies those stronger properties.
The practical payoff follows from linearity of expectation. If stored keys are distinct from a fixed query, let count how many share its bucket. Then : each key contributes at most to the expected value. With stored keys and buckets, an unsuccessful search encounters at most one record on average over the random choice of hash function. This is an expected value, not a limit on every search; one unlucky choice can still create a long chain.
This calculation needs no independence between the collision events: linearity of expectation adds their individual probabilities. The fixed-query condition matters, since deliberately choosing keys after inspecting the selected hash function can target a crowded bucket.
Carter and Wegman introduced this way of analyzing storage and retrieval in their 1977 paper: average over a chosen class of hash functions while allowing any fixed sequence of inputs. Their 1979 journal version develops the same universal-pair collision condition and constructions. The insight is useful because a randomized algorithm can obtain a performance guarantee through its own choices, even when its inputs have inconvenient patterns.[ref]
https://dl.acm.org/doi/10.1145/800105.803400. Carter and Wegman, Universal classes of hash functions, STOC 1977
[ref]https://www.cs.princeton.edu/courses/archive/fall09/cos521/Handouts/universalclasses.pdf. Carter and Wegman, Universal Classes of Hash Functions, 1979
Upcrossing count 2026-10-05
The upcrossing count counts completed upcrossings by time , allowing the first purchase at time zero. For a martingale, the Doob upcrossing inequality bounds its expected value by .
Variance Created 2026-09-24 Updated 2026-10-14
The variance measures the mean squared distance of a random variable from its expected value. For a real square-integrable random variable ,The square prevents positive and negative deviations from cancelling. It also gives the variance squared units: if measures a length in metres, its variance has units of square metres. Its nonnegative square root is the standard deviation, which has the same units as .
For example, let take , and with equal probabilities. Its expected value is zero, but its variance is , and its standard deviation is . The constant random variable zero has the same expected value and zero variance: a mean alone does not describe the spread. The variance is zero exactly when almost surely.
The variance is useful because squared deviations interact neatly with linear combinations. The covariance supplies the cross terms when combining different random variables, and a covariance matrix organizes those terms for many variables. The characterization of variance as the minimum mean squared error of a constant also explains why the expected value is the best constant prediction under squared error.
Variance of a sample mean Created 2026-09-24 Updated 2026-10-14
Let be an IID sample of real-valued random variables with finite expected value and finite variance , where . Its sample mean satisfiesLinearity of expectation gives the first identity. The variance of a sum and vanishing cross covariances give ; scaling by scales the variance by . Pairwise independent random variables with the same expected value and variance suffice for these identities, even without full independence. Grinstead and Snell state the corresponding finite-variance independent-trials result.[ref]
The standard deviation of the sample mean is . Four times as many observations halve this scale; they do not divide it by four. In the fair Bernoulli distribution example, , so sample sizes and give standard deviations and , respectively. The common-coin averaging example shows why merely repeating observations with a common marginal law does not justify this calculation.
Chebyshev's inequality turns the variance identity into a probability bound: for ,This proves convergence in probability of the sample mean to in this finite-variance setting, a form of the weak law of large numbers. It is an upper bound, so values above one convey no improvement over the universal probability bound one. Cauchy sample mean stability lies outside these hypotheses.
Variance of cyclic Bernoulli run counts 2026-10-31
On a cyclic sequence of independent Bernoulli random variables with success probability , count all runs of consecutive successes, allowing overlaps and taking . The count has expected value . Its variance is the displayed expression: each starting indicator has variance ; two starts at cyclic distance have joint probability ; nonoverlapping starts are independent. There are ordered overlapping pairs at each such distance, because the two ranges do not meet when .
For , summing a geometric series gives . Markov's inequality therefore proves absence with high probability when , and Chebyshev's inequality proves existence and relative concentration when . This remains valid for varying probabilities eventually at most one half.
Variance of hypothetical means 2026-10-06
The variance of hypothetical means in the Bühlmann model is the between-risk variance of the conditional claim expected value. It creates the shared covariance between different years of the same risk and determines how much individual experience should influence the premium.
Variance of nested measurements 2026-10-18
For pots per treatment and leaves per pot, the group sample mean decomposes into two averages:The variance of a sum adds the variances of the independent terms. Every pot random effect has weight , whereas each remaining error has weight , giving the short proofThis is also the variance of the arithmetic mean of the pot sample means, each with variance . Equal numbers of leaves per pot make the two averaging procedures identical.
If all leaf measurements were falsely treated as independent, the predicted variance would instead be . The ratio of correct to false variance isThus pseudoreplication can underestimate a standard error by the square root of this ratio. Equality holds when or ; sharing a pot creates an error here precisely when the shared influence has positive variance.
Choose , , and as constructed model parameters in squared length units. These are assumptions rather than fitted experimental values. For each group,The treatment contrast has expected value . Since the group errors are independent conditional on the allocation, its variance is twice the group variance, namely , whereas the false calculation gives . Its correct standard error is length units; the false value is . The variance ratio is .
Constructed variance predictions: adding pots reduces uncertainty faster than adding leaf measurements within four pots
. Each curve uses and ; the horizontal axis counts measurements per treatment. The solid designs agree at four pots with three leaves each. The dashed curve assumes all measurements are independent and therefore illustrates pseudoreplication; none of the curves are observed experimental data. Details.With four pots fixed, increasing drives the error contribution towards zero, but the limit of the group variance remains . Measuring twelve leaves on each of four pots gives . Using the same forty-eight measurements on sixteen pots, with three leaves per pot, gives . More independent experimental units reduce both contributions. Extra nested measurements are useful for characterizing each experimental unit, but cannot average away its shared random effect. This is why sample collection effort and the number of independent treatment replicates answer different questions.[ref]
Pseudoreplication and the Design of Ecological Field Experiments by Stuart H. Hurlbert. Pseudoreplication and the Design of Ecological Field Experiments, p. 201, “Multiple samples per experimental unit”
Variance tensorization Created 2026-10-03 Updated 2026-10-18
Write for all inputs except . Under the Efron–Stein inequality hypotheses, variance tensorization is the equivalent conditional variance formConditioning freezes the other inputs. Then are independent with the same conditional probability distribution, givingTaking expected values explains the factor .[ref]
Lecture 7a: Efron Stein inequality by Purnamrita Sarkar. Lecture 7a: Efron Stein inequality, slides 2 and 7, PDF pp. 3 and 8: conditional variances and the independent-copy identity
For Bernoulli input with parameter , let be the value of with coordinate set to one minus its value with that coordinate set to zero, keeping fixed. The two-point conditional variance isFor the maximum example, and . The two averaged conditional variances are and , precisely half the respective resampling terms. In the dependent example , each other coordinate already determines , so both conditional variances vanish; variance tensorization also fails without independence.
For a short induction proof, separate the last input using the law of total variance. Apply the smaller-dimensional statement to the conditional expectation; Jensen's inequality for the square bounds its coordinate contributions by the original ones. One input gives equality, starting the induction.[ref]
Lecture 7a: Efron Stein inequality by Purnamrita Sarkar. Lecture 7a: Efron Stein inequality, slides 3–6, PDF pp. 4–7: variance decomposition and conditional Jensen step; the induction outline here reorganizes those ingredients
Von Neumann-Morgenstern utility theorem 2026-10-25
For a finite outcome space, complete lottery preferences, a transitive relation, continuity of lottery preferences and the independence axiom for lottery preferences are equivalent to an expected utility representation of the displayed form. The representing outcome utility function is unique up to a positive affine function. The theorem is associated with John von Neumann and Oskar Morgenstern.
A useful proof construction selects a best outcome and a worst outcome . If all outcomes are indifferent, a constant utility function suffices. Otherwise assign , . Continuity of lottery preferences makes each outcome indifferent to a mixture , and mixture monotonicity makes the coefficient unique. Substitution of indifferent lotteries and reduction of compound lotteries turn any lottery into a best–worst mixture with best-outcome probability . Mixture monotonicity then ranks all such mixtures. The reverse direction follows by taking expected values; positive affine functions preserve every comparison.[ref]
Wald's equation Created 2026-10-03 Updated 2026-10-14
Wald's equation turns a random sum into a product of two expected values: the average contribution per step and the average number of steps. Its surprising feature is that the number of steps may depend on what has already happened. A procedure can stop on its first successful Bernoulli trial, for example, while the identity still accounts for its total cost. The crucial restriction is that the decision to take the next step cannot use that step's unobserved outcome.
Let be real independent and identically distributed random variables with , let , and put and . Suppose is a nonnegative integer-valued stopping time for the natural filtration , with . Then is an integrable random variable andThese hypotheses allow statistical dependence between and the increments; they do not allow access to future increments. The finite-expected value requirement is stronger than stopping almost surely.[ref]
For the proof idea, count step only on . This event is determined by the first observations, so its indicator function is independent of . The Proof of Wald's equation by stopping indicators combines this observation with the tail-sum formula for expectation. The same calculation with gives , which justifies interchanging the expected value and the infinite series. This is why the result survives a data-dependent end point without assuming an independent count.
The identity is useful in randomized algorithms and repeated sampling: one can translate an average amount of work into an average number of attempts, or conversely, without first finding the full probability distribution of the total. The examples below separate a permissible stopping rule from a rule that peeks ahead and from a valid rule whose average waiting time is infinite.
Weak law of large numbers Created 2026-09-24 Updated 2026-10-14
Let be real independent and identically distributed random variables with and expected value . The weak law of large numbers states that their sample mean has convergence in probability to : for every fixed ,Thus a large sample is unlikely to give an average with a specified fixed-size error. The strong law of large numbers makes the stronger statement of almost sure convergence along an entire sequence. Under the displayed assumptions both laws apply; their names distinguish the conclusions, not two competing predictions.
When the variance is finite, variance additivity for independent random variables gives . The Chebyshev inequality immediately supplies a useful quantitative form and a brief proof:For independent trials with a Bernoulli distribution of parameter , the expected value is and the variance is . At , the chance of an error of at least is therefore at most . The exact binomial distribution gives a much smaller probability, as the figure under the strong law of large numbers shows. The bound is conservative, but it is valid for every sample size under these assumptions and does not require a normal approximation.
The weak law of large numbers addresses a fixed tolerance . The central limit theorem instead resolves errors on the shrinking scale and gives their approximate normal distribution. In particular, the weak law of large numbers alone supplies neither a bell-shaped error law nor a universal rate of approach. For example, a Pareto distribution with minimum one and shape has expected value three but infinite variance: both the weak law of large numbers and strong law of large numbers apply, while the finite-variance statement of the central limit theorem does not.
Weakly stationary process Created 2026-09-28 Updated 2026-10-14
A real stochastic process is a weakly stationary process if it has finite second moments, a constant expected value , and an autocovariance depending only on the lag of a time series:In particular its variance is the same at every time, . This is often called second-order stationarity. It makes observations from different parts of a record comparable through the same autocorrelation function. Bartlett uses this second-order meaning of stationarity in Introduction to Time Series Analysis, lecture 2: mean, covariance, and stationarity.
For a worked contrast, let be centered white noise of variance . The process has mean , variance , and zero autocovariance at nonzero lags, so it is weakly stationary. The process has exactly the same covariance structure, but its mean is , so it is not weakly stationary. Constant variance alone is insufficient.
Weak stationarity need not imply strict stationarity. For example, choose independent random variables at all integer times, using a standard normal distribution at even times and a Rademacher distribution at odd times. Every coordinate has zero mean and unit variance, and distinct coordinates have zero covariance. Nevertheless a shift by one changes the marginal probability distribution from continuous to two-point. This also illustrates why weak white noise need not be identically distributed.
Let be independent and identically distributed random variables with expected value zero, variance one, and a moment-generating function finite in a neighborhood of zero. Each row of deterministic real weights is finite. If and , then the weighted sums converge in distribution to a normal distribution with mean zero and variance ; denotes the constant zero.
By the quadratic expansion of a cumulant-generating function, write with . For a fixed real , put , with the supremum taken as zero if its range is empty. Then andThus the log moment-generating function of the sum tends to . The convergence theorem for moment-generating functions proves the conclusion. The supremum is the step that makes the remainder estimate uniform across the row; a separate little-o assertion for each term would not justify summing an increasing number of terms.
Wire-address position model 2026-10-18
Consider an original idealized track reconstruction model. Let equally spaced wires have positions and assign each event to the nearest wire, reporting . Assume exactly one correct wire address, perfect detection efficiency, exact wire positions and a uniform distribution of true positions within each cell. These assumptions explicitly exclude missed pulses, false addresses and several unresolved tracks.
Writing , the measurement error is , with uniform on . Symmetry gives zero expected value. Its variance and standard deviation follow by integration:For chosen wire pitches and this gives and respectively. These are model standard deviations, not measured chamber spatial resolutions. The largest possible absolute error in this model is , which is a different quantity.
A useful subtlety is that the formula depends on the illumination. For an unresolved pencil beam fixed at , every reconstructed position is . The repeated estimates have zero variance, but every error is . Small repeat-to-repeat spread can coexist with a biased position. The uniform-cell result therefore cannot be transferred to an arbitrary beam profile or detector selection.
The wire address supplies one transverse coordinate in this model. Combining several separated measurements supports track reconstruction; a single address does not specify a complete trajectory. If two charged particles enter the same cell during one accepted interval, an address-only record can be identical to that from one particle. No reconstruction of that record can recover the lost multiplicity without additional information.
X-ray effective area 2026-10-18
X-ray effective area is the area that converts an incident photon arrival rate per unit area into an accepted count rate. For a fixed direction and a sufficiently narrow energy interval, writeHere is projected geometric area, is transmittance through windows or optics, is quantum efficiency, is the probability that a detected source event passes event selection, and is live observing time. is an expected value, not a guarantee of an integer count. Multiplication follows by counting incident photons over area and time, then applying the successive conditional acceptance probabilities. Live time already excludes intervals when the instrument cannot record events; multiplying by a live-time fraction again would count the same loss twice.
For an invented narrow-band example, choose , , , and . Then . A source with observed for gives . here counts photons; converting it into observed radiative flux requires their energies. If all have energy , the corresponding radiative flux is .
Zero-capital survival probability 2026-10-06
In a classical risk model with positive relative safety loading, zero initial capital has ultimate survival probability , where is the claim-arrival rate, the claim expected value and the premium rate. It depends on the claim law through its mean alone. It is not the event of never receiving a claim: premium accumulates between arrivals.
Zeta bounds from rounded Pareto variables Created 2026-10-25 Updated 2026-10-31
Let have survival function for , with . Its expected value is . The tail-sum formula for expectation givesThe absolutely continuous probability distribution gives zero mass to the integers, so almost surely and . Taking expectations of gives , which rearranges to the displayed bounds on the Riemann zeta function. Finiteness is justified by and .

