Law of total probability Created 2026-09-24 Updated 2026-10-18
Let be a countable measurable partition of the sample space, with positive probabilities. For any event , the law of total probability gives
The pieces are disjoint events, so add their masses and use the definition of conditional probability. Zero-mass partition pieces can be omitted without changing the answer.
For the coin selection in probability, let mean the -head coin was selected and let mean the first toss was heads. Then . Each conditional answer describes one possible hidden situation; its weight describes how often that situation occurs under the model. This decomposition is useful whenever a simple conditional model sits behind a more complicated marginal probability distribution.
The law of total probability combines local conditional probabilities into one overall probability. The measurable partition must cover the sample space with pairwise disjoint events: every elementary outcome belongs to exactly one part. Its probabilities are the weights of a weighted mean, and they sum to one.[ref]
For an original constructed example, make a finite set of 1,000 items: 600 belong to and 400 to . Mark exactly 60 items in and 100 in , and let the event mean that the selected item is marked. Select an item using the uniform distribution on a finite set. These are prescribed counts, so the resulting probabilities are exact properties of this construction:
The conditional probability uses only the 600 items in as its denominator. The probability of the intersection uses all 1,000 items instead: . Similarly, . Adding the two disjoint events gives
Figure 1.
A partition turns within-group rates into whole-population areas
. An original constructed finite set with 1,000 items, represented by area rather than measured data. The two widths encode probabilities and ; the shaded heights encode conditional probabilities and . The shaded intersection areas encode 60 and 100 marked items, totaling 160. Details.
An unweighted arithmetic mean of the two conditional probabilities would give . That is the answer to a different selection rule: choose either group with probability , then select uniformly within that group. Here the first group contains more items, so selecting uniformly among all items gives it weight . In fact, if its weight were , the overall probability would be . Moving the weight from to lowers the result by , explaining exactly why is too large for the original model.
The same construction is a mixture distribution: first select a group with its mixture weight, then select an item within that group. Multiplying the weight by its conditional probability gives the probability of reaching through that group; adding the contributions gives the law of total probability. For example, an item in has selection probability , and an item in has selection probability , recovering the original uniform distribution on a finite set.
Figure 2.
Multiply along each route and add the routes ending in the event
. The original constructed model expressed through group selection and a marked-or-unmarked result. First-stage weights are probabilities; second-stage weights are conditional probabilities. The four final probabilities sum to one. The two routes to the event contribute . Details.
No assumption of independent events is needed. In this construction differs from , so and are not independent events. Also and are disjoint events with positive probabilities, so they cannot be independent events: their intersection has probability zero, whereas . The measurable partition supplies exclusive alternatives, not an independence assumption.
For a short proof, the intersection pieces have union and are pairwise disjoint events. Apply countable additivity, then substitute the definition of conditional probability on every positive-mass part:
A zero-probability event has . Omit it: writing would divide by zero. Countability ensures that the union of the omitted zero-probability events also has probability zero. Overlapping parts would double-count their intersections, and incomplete coverage would omit the probability of in the uncovered region.[ref]
Reversing the question gives one compact application of Bayes' theorem. Among the 160 marked items, 100 belong to , so its conditional probability after observing is
The law of total probability supplied the denominator by collecting every way that can occur. Its usefulness lies in choosing a measurable partition where the conditional probabilities are simple, then combining them without losing the relative sizes of the alternatives.
Law of total variance Created 2026-09-24 Updated 2026-10-14
The law of total variance separates the spread of a population into spread inside groups and spread between their means. For a real square-integrable random variable , so that , and another random variable on the same probability space,
The first term averages the conditional variance over the possible information ; the second measures how much the conditional mean changes with that information. There is no independence assumption, and need not be numerical or have finite variance. Conditioning is useful precisely when knowing tells us something about . See MIT tutorial on using conditional expectation and variance.
More generally, the available information can be a sub-sigma-algebra of the ambient probability space. With , the existing conditional expectation definition gives
Taking recovers the displayed formula. The conditional mean and conditional variance are themselves random variables: before learning the group, we do not yet know which group average or group spread will apply. Their outer expectation and variance turn these varying quantities into numbers.
For a fully explicit mixture distribution, choose a group or with equal probabilities. In group , choose or with equal conditional probabilities; in group , choose or with equal conditional probabilities. Thus the complete joint probability distribution consists of , each with probability , and no other outcomes. The conditional means are and . Squaring the deviations and gives conditional variances and , respectively. The law of total expectation gives the overall mean .
The within-group contribution to variance is
For the between-group contribution, the conditional mean takes values and , each three units from the overall mean. Consequently,
We can check this without any conditioning: the discrete random variable takes values with equal probabilities, so
Equivalently, its second moment is , and subtracting the squared mean gives . These are population variances, with the stated probabilities as weights, rather than estimates using the corrected denominator of a sample variance.
Figure 1.
Four equally likely outcomes split total variance into within-group 5 and between-group 9
. Details.
The figure makes the two sources of spread visible. The outcomes in group cluster tightly around , while those in group sit farther apart around . Replacing every outcome by its conditional mean removes the internal spread but leaves the separation between groups. Conversely, subtracting each group's conditional mean aligns the two groups around zero. Averaging only the conditional variances would miss nine units of variance; retaining only the conditional means would miss five. Neither summary alone describes the whole population.
Two modifications clarify what each contribution measures. Shift group to outcomes and group to outcomes , keeping all four probabilities equal. Both conditional means are now , while the conditional variances remain . The between-group contribution vanishes, and total variance is just . Group membership still tells us how uncertain an outcome is, even though the best point prediction stays the same. Alternatively, let every outcome in group equal and every outcome in group equal . Now both conditional variances vanish, and all nine units of total variance come from group separation. Knowing the group predicts the outcome perfectly. These limiting cases distinguish differences in average outcome from differences in internal spread; the original mixture distribution contains both.
The same calculation answers a prediction question. If the group is hidden, the best constant prediction is the overall mean , with mean squared error , by variance as the minimum mean squared error of a constant. If the group is revealed, predict for and for . The errors become , and their mean squared error is . Knowing the group therefore improves the best achievable mean squared error by , exactly the between-group contribution. This is an interpretation relative to the information available: the remaining uncertainty could shrink further if additional information were revealed.
For any square-integrable measurable function used as a predictor, write . The prediction identity is
Thus predicting with the regression function gives the conditional expectation and minimizes mean squared error over every permitted predictor, including nonlinear ones. This minimizes average squared error, not the error for each individual outcome. See Berkeley Statistics 201A notes, sections 36–37.
Why do the two pieces add cleanly? Put . Its conditional expectation given is zero, so and for every square-integrable measurable function . In particular, and are uncorrelated random variables. Splitting and squaring therefore leaves no cross term after taking expectation. Geometrically, the conditional expectation is an orthogonal projection in the L2 space, and the law of total variance is its Pythagorean theorem for centered random variables.
Figure 2.
Conditional prediction leaves zero group means but different residual spreads
. Details.
In our example, the four products are , which average to zero. Yet and are not independent: observing identifies group , while observing identifies group . This is a concrete instance of heteroscedasticity, with different conditional variances despite zero conditional means of the errors. A group can predict uncertainty even when it cannot predict the error's sign.
The law of total variance is useful whenever aggregated data conceal distinct groups. Changing mixture weights changes both contributions, so the weighting must match the population being described. For example, giving group weight changes the overall mean to , the within-group variance contribution to , and the between-group contribution to , making the total . Group differences account for spread and prediction gains; assigning them a causal explanation requires a separate causal inference argument.
Leaf depth in a code tree 2026-10-14
The number of edges on the graph path from the root of a tree to the leaf for symbol in a code tree. The root of a tree has depth zero. Each edge contributes one bit to a binary codeword, so this depth equals the codeword length; weighting these depths by probabilities gives expected codeword length.
Leaky scanning 2026-10-20
Bypass of a potential initiation site by a scanning small-subunit complex, allowing initiation farther downstream. Local context and factor availability affect the probability of selection.
Lebesgue integral Created 2026-09-29 Updated 2026-10-14
For a nonnegative measurable function on a measure space, define
The supremum may be infinite. A simple function assigns finitely many heights to measurable sets, so its integral is height times measure, summed over those pieces. This definition groups points by their values rather than requiring a partition into short intervals. See MIT lecture 11, Definition 108.
A real-valued function is Lebesgue integrable when . Its integral is , where is its positive part and . This finiteness requirement avoids subtracting two infinities. For functions taking values in the complex numbers, integrate the real part and imaginary part separately.
Consider the Dirichlet function on . It is a simple function, and
Its Riemann integral does not exist. For every partition of an interval , each nondegenerate contains both rational numbers and irrational numbers, by their respective density of the rational numbers and density of the irrational numbers. Thus its infimum there is and its supremum is . The lower Darboux sum is , whereas the upper Darboux sum is . Refinement never closes this gap. A finite scatterplot cannot represent this behavior: the assertion concerns every subinterval and every partition of an interval.
Another view builds the Lebesgue integral from horizontal layers. For any nonnegative measurable function, the layer cake representation states
Both sides may be infinite. The right side integrates the measure of a superlevel set against Lebesgue measure in the height variable . See Gautam Iyer's measure theory notes, Theorem 9.5.
For on with Lebesgue measure, the superlevel set at is , of Lebesgue measure ; for it is empty. Consequently
At height , the layer extends from to , a width of . The picture shows why the same area can be accumulated vertically or horizontally. In a probability space, the identical formula expresses the expected value of a nonnegative random variable through its exceedance probabilities.
Figure 1.
Integrating by horizontal layers and their widths
. Details.
A proof outline avoids extra assumptions on the measure space. For a nonnegative simple function with disjoint measurable sets , the superlevel set has measure . Integrating this finite sum gives . Next use approximation by nonnegative simple functions . For every , the superlevel sets increase to . Continuity from below of a measure and the monotone convergence theorem on the height variable give the formula for .
Likelihood function Created 2026-09-24 Updated 2026-10-14
For a fixed observed sample , a likelihood function is
where is the probability mass function or probability density function of the observations under the statistical parameter . All densities must be defined relative to the same parameter-independent dominating measure. The sample is fixed; the parameter is the function's argument. With independent and identically distributed random variables, the joint mass or density factors as . This definition and the distinction between sampling probability and parameter uncertainty are explained in MIT 18.05, Reading 10b, sections 3 and 3.2.
For an observed ordered sequence of ten independent Bernoulli trials containing eight successes and two failures, each success contributes and each failure contributes , giving
If the observation is instead only the total count , its binomial distribution probability mass function sums over the possible ordered sequences:
The raw heights differ: at they are approximately and . Their maximum-likelihood estimates are identical. More generally, multiplication by any finite positive constant independent of leaves the maximizing parameter values and all likelihood ratios unchanged. Multiplication by a parameter-dependent factor can change the MLE; dropping such a factor is not justified. Relative likelihood height sets the peak to one, without making the area under the curve one.
Normalization of is over possible data values for each fixed parameter. It imposes no requirement that . For example, the ordered Bernoulli trials likelihood above has
Its integral is not one, and its values are not posterior probabilities for . When the Bayesian posterior is defined, Bayes' theorem multiplies the likelihood by a prior density and normalizes that product. Choosing to normalize a likelihood function alone is an additional choice, such as using a uniform prior in those parameter coordinates, rather than part of the definition of likelihood.
For observations with a probability density function, the probability of an exact sample point is zero. If a scalar density is continuous at the observed value , then
Thus the density compares probabilities of small, equal observation intervals at different parameter values; it is not itself the probability of that exact real number. The equal-width factor is independent of the parameter. This gives visual intuition for density likelihoods, as in MIT 18.05, Reading 10b, section 4. The normal distribution example in maximum-likelihood estimator makes the comparison explicit. If only rounded intervals are recorded, their integrated probabilities give the exact observation likelihood; using midpoint densities is an approximation.
For two independent statistical samples from exponential distributions with positive means and , write , and . The unconstrained maximum-likelihood estimators are and ; under equality of the means the common fitted mean is . Dividing the constrained maximum likelihood function by its unrestricted maximum gives the displayed likelihood ratio. Its maximum is one at , so the likelihood-ratio test rejects for sufficiently small values, in either tail of .
Under the null hypothesis, the sums have independent gamma distributions with a common rate, so by beta sampling by gamma ratios. This permits exact calibration. For large samples with , the Wilks theorem gives . Its upper-tail probability is the asymptotic p-value. The one statistical degree of freedom is the difference between the unrestricted and constrained parameter dimensions.
Limsup of events 2026-10-14
For events in a probability space, the infinitely-often event is
Its complement of an event is : after some outcome-dependent index, no more events occur.[ref]
Deleting finitely many events leaves the limsup of events unchanged. It is therefore a tail event of the sequence of indicator random variables , whether or not those random variables are independent. For independent events, the Kolmogorov zero-one law restricts its probability to zero or one; the Borel-Cantelli lemmas determine which alternative holds from the series of probabilities. Also precisely when only finitely many events occur, connecting the First Borel-Cantelli lemma to almost sure convergence and the existing complete convergence criterion.
Linearity of expectation Created 2026-09-24 Updated 2026-10-14
For integrable random variables on the same probability space and fixed real numbers , linearity of expectation states
The random variables can be dependent random variables. The formula follows by the linearity of integration; a finite linear combination of integrable random variables remains integrable. For example, if takes with probabilities , then and are dependent random variables, yet .
An especially useful application counts how many events occur. Put , an indicator random variable, and . Since , we get . There is no need to compute the whole probability distribution of , or to assume independence. For a uniform random permutation of objects, each object stays fixed with probability , so the fixed point count of a uniform random permutation has expected value one for every . [ref].
Linearity of expectation concerns addition and multiplication by fixed scalars. Products instead satisfy under the hypotheses of expectation of a product of independent random variables. For the example above, , whereas . Applying a nonlinear function before averaging can therefore change the answer substantially; use the law of the unconscious statistician to compute that average.
Linearized chord diagram model Created 2026-10-14 Updated 2026-10-20
Start with one self-loop, and at step add one vertex and one edge. An old vertex is chosen with probability , and the new vertex is chosen with probability , producing a self-loop. Self-loops contribute two to the degree of a vertex. There are edges and total vertex degree at time . This exact normalization is distinct from treating the total vertex degree as the number of edges.
Linear probability score Created 2026-10-07 Updated 2026-10-14
The linear probability score pays the reported probability of whichever binary outcome occurs. With report and observed , its reward is
It looks sensible: assign more probability to what happens and receive more reward. But the expected value under a Bernoulli distribution with true success probability is
This is an affine function of the report. When , the maximum over is at ; when , it is at . At , every report ties. Thus the linear probability score encourages reporting certainty about the more likely outcome and is not a proper scoring rule.
For the stipulated , the expected value of the reward is . Honest reporting earns in expectation, whereas earns . The forecaster improves expected reward by replacing a 70% forecast with a 100% forecast. The Brier score and logarithmic scoring rule avoid this incentive, as the expected-score diagram under proper scoring rule shows.
Count just the equality tests between the target and an entry, excluding loop conditions and index updates. If the first match is at index , linear search uses exactly equality tests. If the target is absent, it uses exactly . Thus for the best successful case costs one equality test, and the worst case costs , attained by absence or a first match at the last index. For , the sole outcome is absence with .
Figure 1. . For length , a first match at index costs equality tests; absence costs eight. The dashed mean assumes a successful unique target uniformly located over the eight positions. It does not include absent queries. Details.
An expected value needs a specified probability distribution. For , condition on success, assume the target occurs exactly once, and assume its position has a uniform distribution on a finite set of indices . Then the expected value of the linear search comparison count is
This is the average of the costs under those assumptions, with no assumption that the array is sorted. It is not a universal average for arbitrary queries. For example, with , a unique successful target at index with probability and at index with probability has expected value , rather than .
Duplicates also require care about what is sampled. Choose a position uniformly in , then search for its value. All queries succeed, but the five possible sampled positions give costs : both positions holding cause an immediate match at index . The expected value is , not . Uniformly choosing an occurrence does not uniformly locate the first match.
More generally, let the success probability be and let be the conditional probability that the first matching index is , allowing duplicates. Since , the expected value is
Under the unique, uniformly located successful-target assumptions this becomes . If every query is absent, and without needing conditional probabilities. When , success is impossible and ; the successful-search conditional formula is undefined.
Converting the linear search comparison count to execution time needs a cost model. Under constant-cost equality tests, next-entry access, and loop bookkeeping, worst-case time complexity is in Big O notation for , with constant overhead even for the empty sequence. Variable-length entries can make an equality test expensive. On a linked list, advance along its links; repeatedly restarting at the head to obtain the next numeric index adds work that the comparison count does not capture. These are exact operation counts and conditional mathematical averages, not runtime measurements.
L-infinity norm 2026-10-14
On a measure space of positive total measure, the L-infinity norm of an essentially bounded measurable function is . The absolute value matters: a constant function has L-infinity norm three, even though its essential supremum is . The norm belongs to the equivalence class in Lp space; different representatives equal almost everywhere give the same answer. [ref].
For the function in essential infimum and essential supremum, under Lebesgue measure, whereas its supremum norm is four. Replacing the exceptional values by the ordinary values leaves every finite Lp norm unchanged as well: . This tends to one as . That agreement explains why the endpoint with exponent uses an essential bound rather than a pointwise bound.
A finite probability space makes the distinction between zero and small measure explicit. Let , , and . Assign weights , , , where . For ,
When , the singleton is a null set and . For every , however small, . For example, gives and , yet the large- Lp norms approach ten. The ordinary pointwise supremum norm is ten in both cases.
Figure 1.
A zero-weight value disappears from every Lp norm, while a rare positive-weight value determines the limiting L-infinity norm
. The original three-point example has values . The curves use weights and , respectively. Dashed levels show the limiting norms three and ten; the plotted finite exponents do not themselves reach those limits. Details.
Why can a rare value dominate? For a bounded function on a probability space, an almost everywhere bound gives . If , the set has positive probability, so . As , the factor tends to one. These two bounds squeeze the limit to . The probability measure assumption keeps total measure finite; this explanation does not assert the same finite- integrability on arbitrary infinite-measure spaces.
Linkage disequilibrium 2026-10-13
Linkage disequilibrium means that knowing an allele at one genetic locus changes the probability of an allele at another genetic locus in population haplotypes. It compares their joint probability distribution with the product of their marginal distributions. This is useful because a genetic marker can carry information about another genetic locus: tag SNPs exploit this redundancy, without establishing a causal genetic association.
Consider two genetic loci with alleles and . Sample one haplotype, rather than an unphased diploid genotype. Write its four haplotype frequencies as , summing to one, and set the marginal allele frequencies to and . The linkage disequilibrium coefficient is
The second expression follows by substituting . The entire two-locus joint probability distribution is then
Every row and column sum is unchanged when varies. Linkage equilibrium means : all four haplotype frequencies equal products of allele frequencies, so the two allele indicators are independent random variables. For , the conditional probability shows directly how positive enriches among copies carrying , while negative depletes it. Positive also enriches ; negative enriches and . Swapping the labels and reverses the sign of , so neither sign is intrinsically favorable.
For example, fix the allele frequencies at . At linkage equilibrium, the haplotype frequencies in the order are . Positive linkage disequilibrium instead gives , with ; negative linkage disequilibrium gives , with . Counting each allele separately would miss the difference.
Nonnegative haplotype frequencies constrain . Define the nonnegative bounds and . The four entries above give
Thus globally, but a particular pair of allele frequencies usually permits a smaller, asymmetric interval. The standardized linkage disequilibrium convention used here retains the sign:
This convention requires ; if either genetic locus has only one allele in the population, but normalized measures are undefined. Some presentations report only . At or , at least one of the four haplotypes has zero frequency; this alone does not prove that genetic recombination has never occurred.
For the indicator random variables and , their covariance is , and their variances are and . The allelic correlation measure is their squared correlation coefficient,
The subscript distinguishes it from the recombination fraction in linkage-disequilibrium decay under recombination. Squaring loses the association's sign. In the illustrated positive and negative examples, in both, whereas and , respectively. For another original example, take : then , yet . Every carries , but most copies carrying lack . The frequency constraints and the distinction between these normalizations are analyzed in Mathematical properties of the r² measure of linkage disequilibrium by Jenna M. VanLiere and others (sections 2.1 and 2.5, pp. 131–132 and 135–136).
Genetic linkage describes transmission through meiosis; linkage disequilibrium describes a population's haplotype frequencies. Nearby genetic loci on a chromosome can be in linkage equilibrium. Conversely, mixing populations can create linkage disequilibrium even between genetic loci on different chromosomes. For example, mix equal numbers of independently sampled haplotypes from two populations, each internally at linkage equilibrium, with in one and in the other. The pooled allele frequencies are , but , giving . This is a consequence of population stratification, not a measurement of the recombination fraction.
Measured haplotype frequencies also depend on the sample. Finite sample size, related individuals, genetic-study ascertainment, genotyping error and uncertain haplotype estimation can change an estimate. A missing rare haplotype can give empirical without demonstrating its absence from the population. Report the sample definition and allele frequencies alongside the association measure; a nonzero sample estimate alone does not establish nonzero population linkage disequilibrium.
A concrete dataset is the 2005 A haplotype map of the human genome by The International HapMap Consortium. The International HapMap Consortium used genotyping platforms including Illumina BeadArray to obtain SNP genotype calls from 269 DNA samples across four collections: 30 parent–offspring trios from Ibadan, 30 trios from Utah, 45 unrelated individuals from Beijing and 44 from Tokyo. Parent–offspring trios and the PHASE algorithm supplied haplotype estimation, rather than direct observation of every chromosome. In Figure 7, 36 SNPs resolve seven haplotypes in a chromosome 2 region in the Utah panel; seven tag SNPs capture the 36 SNPs at . The readout demonstrates reusable allelic correlation, not causal effects.
Controls required over 80% complete calls, at most one discordance among five duplicate genotypes, at most one Mendelian segregation error per trio panel, and a Hardy-Weinberg equilibrium test with ; blind reassessment checked performance. Minor allele frequencies of at least 0.05 were targeted, the collections were not population-representative, and inferred haplotypes retain phase uncertainty. These limits restrict extrapolation of linkage disequilibrium.[ref]
If a uniform index has possibilities and every proposed success neighbourhood contains at most possibilities, then any estimator has failure probability at least the displayed expression. Condition on its success indicator: conditional entropy is at most . Subtract this from to bound the mutual information and rearrange. A metric Hamming ball gives approximate recovery rather than exact index decoding.
Load factor of a hash table Created 2026-10-13 Updated 2026-10-18
The number of stored records divided by the number of hash buckets. For separate chaining, this is the mean chain length over all hash buckets, including empty ones.
Consider two original separate chaining placements using the deterministic hash function on nonnegative integer keys. With , keys give the balanced chain lengths . Instead, keys all select hash bucket , giving . Both store records, so both have . The maximum chain lengths are and . These are constructed placements, not measured workloads.
Figure 1.
The same hash table load factor permits balanced and concentrated hash bucket occupancies
. Both original examples use eight hash buckets and twelve distinct integer keys. Every outlined column counts towards , including empty ones; each colored square represents one record. The dashed line marks the arithmetic mean , not the maximum chain length. Details.
For an absent query, separate chaining inspects every record in the selected hash bucket. Key selects hash bucket in both examples but is stored in neither, so it takes two key equality comparisons in the balanced placement and twelve in the concentrated placement. Key selects hash bucket and instead takes one comparison in the balanced placement and zero in the concentrated placement. If an absent query's bucket index has the uniform distribution on a finite set of eight indices, its mean comparison count is in either fixed placement. That average does not limit the cost of a particular query.
For successful lookups, suppose each of the twelve stored keys is queried with equal probability, with fixed chain order and no rearrangement on access. A chain of length contributes comparison counts , irrespective of its order. Thus
The balanced placement gives comparisons; the concentrated placement gives . Even this average depends on more than : concentration appears through the squared chain lengths. These exact counts exclude computing the hash function, locating the hash bucket, and allocating records. Elapsed lookup time also depends on the cost of key equality, key length, and memory access latency; alone specifies none of them.
The expected time complexity bound for separate chaining needs a probabilistic assumption. Fix distinct stored keys and a query independently of the random choice of hash function, and require for every unequal pair, where is a constant independent of . With constant-cost hashing, array access and key equality, this suffices. The authored chaining analysis cited here uses this pairwise-collision argument; its multiplicative construction has , rather than the of simple uniform hashing.[ref]
For the proof outline, let be the indicator random variable that stored key shares an absent query 's hash bucket. By linearity of expectation,
A present query's full chain contains itself plus at most other records, giving . Stopping at the match can only improve this bound. Full independence is unnecessary for this calculation, but fixed known hash functions and keys chosen adaptively to collide are outside the stated assumption. Keeping bounded then controls expected lookup work, while the concentrated example still explains why it gives no worst-case guarantee.
For the balanced twelve-record map, put(3,new_value) replaces a value, so and remain unchanged. An absent key such as instead adds a thirteenth record, giving if capacity stays fixed. Under a policy that stores every repeated-key record separately, another record with key would also increase ; all equal-key records necessarily share a hash bucket when the hash function respects key equality. State the map policy before interpreting the count.
The appeal of the hash table load factor is that one number helps tune a space-versus-search tradeoff: more hash buckets require more array storage and can reduce expected search work under the stated assumptions. The actual chain lengths and query choices still matter.
In open addressing, counts record slots and counts live records, so . A policy retaining at least one genuinely empty slot requires ; being below one is not itself a speed guarantee. For deletion using a tombstone in open addressing, also track , the number of marked slots: counts slots that cannot terminate an unsuccessful probe. For example, gives live occupancy but nonempty-or-marked occupancy . These ratios answer different questions.[ref]
In an independent random two-colouring of , a given -vertex set is monochromatic with probability . Events on sets intersecting in at most one vertex use disjoint edges. Thus dependency degree is at most . The Lovász local lemma gives a colouring avoiding all monochromatic when . For the expression is , by Stirling's approximation. Taking tending sufficiently slowly to proves .
Logarithmic loss 2026-10-14
The loss function assigning to a predicted probability distribution and observed outcome . It is the negative logarithmic scoring rule; its expected value under the true probability distribution is cross-entropy. Predicting zero probability for an observed outcome gives infinite loss.
Logarithmic scoring rule Created 2026-10-07 Updated 2026-10-14
The logarithmic scoring rule rewards the natural logarithm of the reported probability mass or probability density at the observed outcome. The title uses the reward convention. For a binary report , its negative is the logarithmic loss:
For this is ; for it is . At an endpoint, use these outcome-specific forms: assigning zero probability to the outcome incurs infinite loss, while assigning it probability one gives zero. The natural logarithm therefore makes a confidently wrong binary forecast far more costly than the bounded Brier score does.
Under the stipulated Bernoulli distribution with , the expected logarithmic loss is
Its unique minimum is at , where the expected loss is approximately . At it is approximately . More generally, the excess expected logarithmic loss over truthful reporting is the Kullback-Leibler divergence in the order true law first, reported law second:
For , this Kullback-Leibler divergence is nonnegative and vanishes only at , explaining why the logarithmic scoring rule is a strictly proper scoring rule. The same Kullback-Leibler divergence identity applies to probability density functions relative to a common measure when the truthful expected logarithmic loss is finite and the comparison expected value is well defined.[ref] For sequential forecasts, the existing prequential log score identity explains how logarithmic rewards add over observations.
Assume that each physical qubit undergoes an independent quantum bit-flip channel with probability during one storage interval, and that encoding, error syndrome extraction, recovery and decoding are all ideal. Use the three-qubit bit-flip syndrome table to apply the indicated minimum-weight recovery. Zero or one bit flips are corrected. Two bit flips have the same error syndrome as the complementary one-site error: for example, gives , so recovery leaves . Three bit flips give and also leave . This exchanges and , and therefore acts as a logical Pauli X gate after decoding.
The number of physical bit flips has a binomial distribution with three trials, hence the logical-error probability is
For a logical density operator , the decoded quantum channel is exactly . Here logical failure means a nontrivial logical Pauli X gate error; a particular input such as can be invariant under that error. At , exactly two flips have probability and three flips have probability , giving . The block succeeds with probability compared with for an unencoded qubit. At , , illustrating the quadratic suppression of rare independent bit flips.
Factoring the improvement gives
Thus one level reduces logical-error probability for , is equal at , and makes it worse for under this same decoder. The suppression arises because a logical error requires at least two physical bit flips. With independent disjoint inner blocks, the same noise model and ideal correction at every level, a concatenated quantum error-correcting code has , with . At , two levels use nine data qubits and give .
Figure 1.
Ideal repetition-code correction suppresses independent bit flips below one half
. Details.
This calculation describes ideal correction of stored information with the specified quantum bit-flip channel. Repeated correction in time additionally requires a fresh specified noise model for each interval; imperfect quantum gates, faulty measurements and correlated errors change the calculation. The timed bit flip during repetition-code syndrome extraction and exact encoded-state failure with a faulty parity check show concretely why this storage calculation alone is not a fault-tolerance result.