Probability generating function of an independent random sum Created 2026-10-18 Updated 2026-10-25
Let be a nonnegative integer-valued random variable, and let be nonnegative integer-valued independent and identically distributed random variables, with common probability generating function . Require the whole sequence to be independent of , so are jointly independent. Set the random sum
with the empty sum equal to zero. Given , the probability generating function of an independent sum yields the conditional expectation . By the law of total expectation,
The composition is valid because . Merely making the independent of each other does not preserve their conditional laws when depends on them. This is the probability generating function version of transform composition for an independent random sum.
For a Poisson distribution count with mean , substitution into gives a compound Poisson distribution with
If the jumps have finite second moment, conditioning also gives mean and variance . The extra spread comes from randomness in the count as well as randomness in the jumps.[ref]
For an original example, choose and jumps taking values one and two with equal probability. Keep the independence assumptions above. Then
Here , , and . The law of total expectation and law of total variance give
Thus the aggregate is not itself a Poisson distribution, whose mean and variance would coincide.
To recover the probability mass function without repeated differentiation, use and compare coefficients:
For example, . As an independent check, expanding gives
Figure 1.
A random number of one-or-two jumps gives a compound Poisson count
. The upper diagram separates the Poisson distribution count, the independent and identically distributed jumps, and their random sum. Below are calculated coefficients of for , with the omitted tail probability reported explicitly. They are exact model probabilities evaluated numerically, not observed data; the displayed masses have not been renormalized. Details.
The plotted probability masses stop at 20, although the support of a probability distribution is unbounded. The omitted tail probability is
This model has bounded jumps and an unbounded count. Its entire probability generating function does give a finite moment-generating function at every real argument, but the general random sum composition only guarantees the stated domain.
Probability mass 2026-10-14
The probability mass at an outcome is the probability of its singleton, . It equals the jump of the cumulative distribution function. For a discrete probability distribution these masses form the probability mass function; a continuous probability distribution gives every individual outcome mass zero. Positive probability mass at a point is distinct from the height of a probability density function.
Probability mass function Created 2026-09-24 Updated 2026-10-14
For a discrete probability distribution, the probability mass function of its random variable is
The sum ranges over its finite or countable set of possible values. An event's probability is the sum of the masses of the included values. For the example under probability distribution, . The cumulative distribution function sums masses below a threshold; its jump at a value equals that value's probability mass. This differs from a probability density function, whose height is not a point probability.
A profile hidden Markov model represents the position-dependent structure of a sequence alignment using an ordered series of match states and optional insertion states, commonly with silent deletion states as well. An emitting state chooses one character from its probability mass function; transitions describe which profile position comes next. If deletion states are forbidden, an alignment column containing gaps cannot be a compulsory match state.
Random variable Created 2026-09-24 Updated 2026-10-14
A real-valued random variable is a measurable function from a probability space to the real numbers with their Borel sigma-algebra. More general targets give random elements. For every Borel set , measurability ensures that is an event, so the question "does the observed value lie in ?" has a defined probability.
The function is fixed; its input outcome is uncertain. This separates what we measure from how the uncertainty is modeled. A probability distribution is the resulting pushforward measure, . A cumulative distribution function, probability mass function, or probability density function describes that measure in an appropriate setting. The random variable and its probability distribution are different objects: the former also retains its relationship to other measurements on the same sample space.
For two independent uniform dice, let record their results and define and . The 36 ordered pairs are equally likely, but the resulting probability mass functions differ:
For the sum, count the diagonal of the outcome grid having total . For the maximum, subtract the pairs with both results below from the pairs with both results at most . These examples show how a deterministic function transforms a simple input probability distribution into a nonuniform output one.
Figure 1.
Different random variables on the same equally likely dice outcome space
. Details.
The corresponding expected values are and . The first follows immediately from linearity of expectation; the second follows from . Neither number must be an attainable result. An expected value describes an average under the probability measure, not a prediction that the next observation will equal it.
The distinction between a random variable and its probability distribution matters for dependence. and have the same discrete uniform distribution and are independent random variables. and a second copy of also have that same marginal probability distribution, but they always agree. Their joint probability distribution is concentrated on the diagonal; the marginals alone cannot say which relationship holds. This is why a model for several measurements must specify their joint law or an appropriate independence assumption.
Indicator random variables turn events into numbers: equals one on and zero elsewhere, and . This connects event counting with expected value and variance, and lets tools for random variables answer questions about probabilities. More complicated functions of observations can describe totals, waiting times, or estimation errors using the same framework.
Rate-distortion function Created 2026-09-24 Updated 2026-10-14
Fix a finite source alphabet , a probability mass function , a finite reconstruction alphabet , and a nonnegative distortion measure . The information rate-distortion function is
The source probability distribution stays fixed; the conditional distribution of the reconstruction is what we optimize. Each feasible test channel must keep expected distortion at most . The objective is mutual information, measured in bits when the logarithms have base two. If no test channel satisfies the constraint, the infimum is .[ref]
Consider independent and identically distributed fair bits and Hamming distortion, which charges one for an incorrect bit. At zero expected distortion, every bit must be reconstructed correctly, and . If an average fraction of incorrect bits is allowed, the binary rate-distortion function gives
Here is binary entropy. This is an asymptotic limit for long block codes, rather than a claim that a single bit can be stored in physical bits. The three-bit lossy Hamming code gives a small, fully explicit version of the same tradeoff, with rate and expected distortion .
Figure 1.
Allowing more incorrect fair bits lowers the asymptotic information rate
. The curve is the exact binary rate-distortion function. The marked three-symbol code has rate at expected distortion ; its gap above the curve shows that a small explicit block code need not attain the asymptotic bound. Rates count bits per original source symbol. Details.
Rate-distortion theory separates the question of what is possible from the design of a practical encoder and decoder. It also forces the fidelity criterion to be explicit. Hamming distortion treats all symbol mismatches alike; mean squared error instead penalizes larger numerical errors more strongly. Those objectives can favor different reconstructions of the same data. An average error criterion does not by itself control the error on every individual input.
Claude Shannon's Coding Theorems for a Discrete Source With a Fidelity Criterion by Claude Shannon was published in 1959. Its formulation fixes a cost for replacing one source letter by another and studies the communication rate compatible with the allowed average cost. The important shift is to quantify which distinctions may be discarded, rather than requiring exact recovery of every letter.[ref]
Let be a probability mass function on a finite alphabet with numerical outcomes . Prescribe a mean strictly between the smallest and largest outcomes. Exponential tilting gives
with chosen so that . For any other feasible law , direct substitution yields
Relative entropy nonnegativity therefore proves optimality and uniqueness. At an extreme prescribed mean, feasible laws may have zero probabilities; a finite tilting parameter need not realize them, although a limit can.
For a parameter-independent integrand , the displayed score-function gradient estimator follows by differentiating the sampling probability density function or probability mass function, using . It requires conditions permitting differentiation under the integral sign, or the corresponding sum, and control of support changes. It applies to discrete choices without pretending that their sampled values are differentiable paths. If , add .
Draw one random variable , taking values zero and two with equal probabilities. Conditional on , generate a Poisson point process on the real line with constant rate . This is a Cox process directed by the random measure : the same rate is shared by every window. It is a locally finite simple point process and a stationary point process. The law of total expectation gives ; the law of total variance and law of total covariance give, for bounded Borel sets with ,
The conditional covariance vanishes by independence, but the shared conditional means fluctuate together. This distinguishes conditional from unconditional independence.[ref]
For a window of length , the exact probability mass function is
In particular, its void probability functional is , compared with for the unit-rate Poisson point process. Whole realizations can be empty or comparatively crowded, while their mean density remains one. This example demonstrates shared-rate statistical dependence, rather than a model of short-range offspring clusters.
Simple random walk on the integer line Created 2026-09-24 Updated 2026-10-14
A simple random walk on the integer line starts at and takes independent and identically distributed random variables as unit increments, with
The simple symmetric random walk has ; a biased random walk has . At or every step is deterministic, giving or respectively.
Count the rightward steps using indicator functions:
Thus the endpoint is a shifted and rescaled random variable with a binomial distribution. For a worked example, at the endpoint means exactly three rightward steps and one leftward step. There are possible orders, so its probability is , equal to in the fair case. More generally the binomial coefficient counts the orders, giving the exact probability mass function
In particular, the endpoint must have the same integer parity as : . For the support of a probability distribution is exactly . At only even integers in are reachable; at only odd integers are reachable. This restriction is easy to lose if one draws a smooth curve instead of discrete probability masses. The fair-walk counting argument is also presented in Grinstead and Snell, Introduction to Probability, section 12.1.
Figure 1.
Exact binomial endpoint probabilities for fair walks of 20 and 80 steps and a biased walk of 80 steps; only even endpoints are possible.
Details.
The endpoint identity and the binomial distribution give the expected value, variance, and standard deviation
A short direct check gives and , hence . Then apply linearity of expectation and the variance of a sum of independent random variables.
The absolute width and the width relative to the number of steps answer different questions. In the fair case the standard deviation grows from to , while shrinks from to . At , the standard deviation is , or times the fair width, and . Centering and dividing by each walk's own standard deviation gives, for ,
This rescaling equalizes the variances, not the entire probability distributions. The spacing between reachable endpoints is two, so its rescaled spacing is : approximately for the fair -step walk, for the fair -step walk, and for the biased -step walk.
The positions themselves are dependent. For , , where the second term is independent of . Their covariance is therefore
For example, in the fair case allows or , whereas allows or . Nevertheless the position process is a Markov chain: given its current position, the next fresh increment has no dependence on its past. Its transition probabilities are
These transition probabilities are the same at every time and every integer position: shifting both and by the same integer leaves unchanged. Thus the Markov property and independent increments coexist with dependent positions.
Tail-sum formula Created 2026-09-24 Updated 2026-10-18
The tail-sum formula expresses an expected value as the area under a survival function. For every nonnegative random variable ,
This Lebesgue integral and the expected value may both be ; a probability density function is unnecessary. For a random variable taking values in the nonnegative integers, the corresponding sum is
The events and coincide because takes integer values. Thus the strict sum starts at zero, while the inclusive sum starts at one.[ref]
For an original example, let the probability mass function of be
Its expected value computed directly is . The strict tail probabilities at thresholds are : their sum is again . There is no probability mass at two, yet the event still has probability . The survival function has heights on the successive intervals ; each interval has length one, so its integral is the same sum.
Figure 1.
The same expected value from probability masses and survival columns
. The exact constructed probability mass function assigns to . The contribution appears in one survival column, while the contribution appears in three. Filled endpoints give the strict survival function at its jumps; open endpoints show the preceding height. The shaded area is . Details.
The indexing matters numerically. Starting the inclusive sum at zero adds , giving for this example. Starting the strict sum at one omits , giving . For a general nonnegative random variable, replacing with inside the integral is harmless: the difference is , nonzero at only a countable set of thresholds. For each positive integer , at most thresholds can have probability mass at least ; their countable union contains all thresholds with positive probability mass and has Lebesgue measure zero. This reasoning concerns an integral, not equality of the two survival function conventions at every point.
For a continuous original example, take the uniform distribution on the interval . Its survival function is for and zero for . The area is a triangle of base four and height one:
Directly integrating against the probability density function gives the same expected value, . The integral of the probability density function alone is one; it is the survival function whose area is the expected value.
Figure 2.
A uniform density has total probability one and survival area two
. Exact curves for the uniform distribution on . The probability density function has integral one, while the survival function has integral two. Splitting the survival area at gives before the cap and beyond it, the expected values of and the positive part , respectively. Details.
The proof counts layers of each outcome. For a realized value , the indicator function equals one over an interval of length , so
Tonelli theorem permits the interchange because the indicator function is nonnegative; no finite expected value is assumed. Similarly, an outcome contributes one indicator random variable for each of the events that occur:
Again Tonelli theorem applies to the nonnegative sum, or equivalently the monotone convergence theorem applies to its partial sums. This exchanges counting layers within each outcome with averaging across outcomes. The existing integer-valued hypothesis in the tail-sum formula explains what changes when the values are not integers; the tail integral formula for moments weights the layers to obtain higher moments.
For an integrable random variable that can have either sign, apply the nonnegative formula separately to its positive part and negative part :
Integrability makes both integrals finite. More generally the difference defines an extended expected value when at least one is finite; if both are infinite, subtraction does not define an expected value.[ref]
Tail probabilities are often easier to measure or bound than a whole probability density function. For a device's survival time, the survival function records the probability of still operating at each threshold; its integral gives the mean operating time. A finite observation window naturally gives the expected value of a capped nonnegative random variable. For a mathematical bound, for all implies . The tail-sum formula turns control of a whole family of events into control of an average.
Let be independent random variables, each with the Bernoulli distribution of parameter , and let . Multiplying their characteristic functions and expanding by the binomial theorem gives
The coefficients are exactly the probability mass function of the binomial distribution with parameters : the sum takes with probabilities . Direct outcome counting verifies them: an outcome with ones has probability , and there are such outcomes. The coefficients sum to one, recovering .
At , . This is also : the complex exponential now records parity. The moments agree by two routes: linearity of expectation gives , while the variance of a sum of independent random variables gives . Summing gives the second moment , also recovered as .
Figure 1.
Independent products and the different limits of averages and variance-normalized sign sums
. Top: exact real parts and imaginary parts of and its cube, the characteristic function of the three-variable binomial distribution. Bottom: for independent symmetric signs, approaches one under averaging, whereas approaches under variance normalization. All curves are exact model formulas; the finite curves illustrate the two limits rather than proving a general central limit theorem. Details.
Consider the probability mass functions and on the finite set . Their difference is . Thus
The event attains this difference: and . Combining and gives the same absolute discrepancy with the opposite sign. Adding to either event changes nothing, because its probability mass agrees under both probability distributions.
Figure 1.
Total variation distance as the largest event discrepancy
. An illustrative four-outcome example. The positive and negative excesses each total ; summing both without the factor counts the same redistribution twice. Details.
The factor is necessary because : every unit of excess probability mass must match a unit of deficit. For any event, including a negative term cannot increase its signed discrepancy, while omitting a positive term cannot increase it either. Therefore attains the positive maximum. This is a short way to compute an apparent optimization over subsets using one pass through .
For probability density functions relative to the same measure , the corresponding identity is . Such densities can always be taken as Radon-Nikodym derivatives relative to . Beware the notation: the total variation norm of a measure applied to the signed measure equals . A formula using that norm without its factor is using a different normalization.
Type (information theory) Created 2026-09-24 Updated 2026-10-14
A type summarizes a string by how often each symbol occurs. Fix a finite alphabet of cardinality and a positive length . For a string , its empirical distribution is the probability mass function
The empirical distribution forgets order. The strings and both assign probability to each binary symbol; assigns to zero and to one. Thus a long string can have a short summary even though that summary does not reconstruct the original order.
For independent and identically distributed symbols, this loss of order has a useful consequence: all strings with the same empirical distribution have the same probability. The method of types uses this symmetry to turn questions about exponentially many strings into counting questions about relatively few frequency profiles.[ref]
Weakly typical sequence Created 2026-10-05 Updated 2026-10-14
For an IID random variable source with probability mass function , a word is weakly typical when . It has probability on the scale . The weak law of large numbers makes the typical set probable, but does not make every word in it representative: for a uniform source every possible word is weakly typical.
A Poisson distribution conditioned on a positive count has probability mass function for and .