Physics · Article
Probability and statistical entropy
Follow two localized spins from microscopic weights to entropy. Separate state counting from probability, correlations from independence, and coarse observation from reconstruction; then compare distributions with a stated reference and measure.
Previous article: Microstates, macrostates, and multiplicity
Back to PhysicsAfter reading, you can
- Compute event, conditional and macrostate probabilities from a specified microscopic distribution.
- Explain Gibbs and Boltzmann entropy, logarithm units, independence and correlations under their stated physical conditions.
- Distinguish merging labels from reconstructing on the same microscopic state space.
- Use relative entropy with correct reference, support and stochastic-map conditions.
- Explain why continuous entropy needs a measure and why probability entropy alone does not prove irreversible thermodynamic evolution.
Two spins, one count, two preparations
Two localized spins are measured along a fixed axis. Each gives down (D) or up (U). The sites are distinguishable, so DU and UD are different microscopic outcomes. In preparation A each spin has up probability p = 1/2; in preparation B it has p = 4/5. Within each preparation the two outcomes are independent. These are assigned preparation probabilities, without assuming a thermal reservoir or an equilibrium law.
A detector reports only M, the number of up spins. Which is more likely: one up spin or two? Does counting the configurations settle the question? There are two configurations with M = 1 and only one with M = 2, but their individual weights matter. The table lists every microscopic outcome; every column sums to one.
For A, M = 1 is most probable. For B, M = 2 is most probable even though it has smaller multiplicity. The aim is to understand this change and give a precise meaning to the entropy of a probability distribution.
| Outcome | M | Preparation A: p = 1/2 | Preparation B: p = 4/5 |
|---|---|---|---|
| DD | 0 | 0.250000 | 0.040000 |
| DU | 1 | 0.250000 | 0.160000 |
| UD | 1 | 0.250000 | 0.160000 |
| UU | 2 | 0.250000 | 0.640000 |
Choose a reading path
On a first reading, follow the two-spin probabilities, the definition of entropy, the difference between microstate and macrostate entropy, and the two coarse-graining operations. Use their tables before the algebra. Then compare two reference distributions using relative entropy. Sections headed “Further” supply proofs and continuous-variable cautions; return to them after the finite examples.
The published preparation “Algebra, functions, graphs, and logarithms” explains the logarithms and function notation used here. “Physical systems, states, boundaries, and environments” helps identify what the system includes. The optional advanced path uses “Integrals and multivariable calculus” and “Hamiltonian mechanics and phase space”. The preparation links above lead to those existing English lessons.
Here a microstate is one outcome at the chosen microscopic resolution; a macrostate is a set of microstates sharing a specified coarse description. Probability is a normalized assignment to mutually exclusive outcomes. An ensemble is the distribution describing a repeated preparation or a statistical model; it does not require many physical copies to be present at once. A single observed outcome is distinct from the distribution used to predict it.
Sum events and condition on information
For a finite, exhaustive list, p_i ≥ 0 and Σ_i p_i = 1. An event is a subset of that list. Sum p_i over the subset to obtain its probability. Add probabilities directly only for disjoint events; in general P(A ∪ B) = P(A) + P(B) − P(A ∩ B).
For events with P(B) > 0, P(A|B) = P(A ∩ B)/P(B). Conditioning changes the question. Given M = 1 in either opening preparation, DU and UD each have conditional probability 1/2. This follows from their equal assigned weights, not merely their different names. No conditional probability on a zero-probability event is defined by this quotient.
Independence means P(X,Y) = P(X)P(Y), not just that the sites are separated. The opening preparation explicitly grants it, giving P(DD) = (1−p)² and P(DU) = P(UD) = p(1−p). For N independent identical two-outcome sites, P(M = m) = C(N,m)p^m(1−p)^(N−m), where C(N,m) = N!/[m!(N−m)!] and m = 0,…,N. Its mean is Np and its variance is Np(1−p). Correlations or nonidentical site probabilities require a different distribution.
Same spin configurations, different probability weights
Compare all four microscopic outcomes and all three up-count outcomes for the same two independent localized spins. Equal and biased preparations use identical outcome spaces.
- p_up = 1/2 at each independent site
- p_up = 4/5 at each independent site
Microscopic outcomes at two distinguishable sites
Number of up spins M
- DD, DU, UD, UU
- M = 0, 1, 2
- Site outcomes are independent within each assigned preparation; no equilibrium law is inferred.
- Multiplicity does not fix probability when individual states carry unequal weights.
- Both probability panels have the same true-zero ordinate from 0 to 1.
Read both complete original microscopic and macrostate probability tables.
Complete text and table equivalents
Each panel keeps readable labels; scroll locally on a narrow screen.
| M | Multiplicity Ω(M) | P(M), p = 1/2 | P(M), p = 4/5 |
|---|---|---|---|
| 0 | 1 | 0.250000 | 0.040000 |
| 1 | 2 | 0.500000 | 0.320000 |
| 2 | 1 | 0.250000 | 0.640000 |
State the weighting before counting
Equal a priori probability is a physical modeling assumption for accessible microstates under specified constraints and a specified measure. For W equally weighted discrete states, p_i = 1/W and an event containing Ω of them has probability Ω/W. Equal counts of arbitrary coordinate bins need not have equal physical weight.
The opening states have equal weights only in preparation A. In B, UU has probability 0.64 while DD has 0.04. For a system exchanging energy with a reservoir, different energy states generally carry different equilibrium weights. The later ensemble lesson derives those weights. Neither the word “random” nor lack of a measured trajectory establishes uniformity, independence or dynamical exploration of every accessible state.
In classical phase space, specify the volume measure and the conserved constraints before assigning weights. Equal phase-space volumes are the relevant equal cells under that model, not equal widths in every possible coordinate. For indistinguishable particles, arbitrary particle labels must not create spurious extra physical states. The preceding multiplicity lesson develops state counting; the present two-site example avoids exchanging identical particles by using distinguishable localized sites.
Average surprisal defines entropy
For an outcome with p_i > 0, its surprisal is I_i = −ln p_i. A rare outcome has larger surprisal than a common one. Shannon entropy is the probability-weighted average H = Σ_i p_i I_i = −Σ_i p_i ln p_i. H describes the whole distribution, not the surprise of the one outcome that happened.
We use natural logarithms: H is a dimensionless number reported in nats. For bits, divide by ln 2: H_bits = H/ln 2. A definite distribution has H = 0. Use the limit 0 ln 0 = 0 for zero-probability terms; do not ask a calculator for ln 0 or replace zero probabilities by arbitrary small numbers.
For one spin, h(p) = −p ln p − (1−p)ln(1−p). Its endpoint values are zero, and h(p) = h(1−p). The maximum is ln 2 at p = 1/2. Bias lowers the average uncertainty even though the unlikely outcome is individually more surprising. The curve and samples refer to one spin, whereas the opening microscopic entropy describes two.
Binary entropy averages the two possible surprises
The one-spin entropy is zero at either definite outcome and maximal for an equal probability of up and down. It is not the surprisal of an individual rare outcome.
- h(p) = −p ln p − (1−p) ln(1−p)
One-spin binary entropy
- p = 1/2: h = ln 2
- p = 0 and 1: h = 0 by the limiting convention
- Bits = nats / ln 2; the ordinate here is nats.
- This curve is for one spin; independent two-spin microscopic entropy is 2h(p).
- The endpoint entropy is finite even though its derivative is not.
- Samples at Δp = 0.01; lines join adjacent samples.
Read the original complete binary sample table; full grid data are supplied separately.
Complete text and table equivalents
Open the complete plotted grid
| p_up | h(p) (nats) | h(p) (bits) |
|---|---|---|
| 0.000000 | 0.000000 | 0.000000 |
| 0.010000 | 0.056002 | 0.080793 |
| 0.020000 | 0.098039 | 0.141441 |
| 0.030000 | 0.134742 | 0.194392 |
| 0.040000 | 0.167944 | 0.242292 |
| 0.050000 | 0.198515 | 0.286397 |
| 0.060000 | 0.226968 | 0.327445 |
| 0.070000 | 0.253639 | 0.365924 |
| 0.080000 | 0.278769 | 0.402179 |
| 0.090000 | 0.302538 | 0.436470 |
| 0.100000 | 0.325083 | 0.468996 |
| 0.110000 | 0.346515 | 0.499916 |
| 0.120000 | 0.366925 | 0.529361 |
| 0.130000 | 0.386387 | 0.557438 |
| 0.140000 | 0.404963 | 0.584239 |
| 0.150000 | 0.422709 | 0.609840 |
| 0.160000 | 0.439670 | 0.634310 |
| 0.170000 | 0.455886 | 0.657705 |
| 0.180000 | 0.471393 | 0.680077 |
| 0.190000 | 0.486223 | 0.701471 |
| 0.200000 | 0.500402 | 0.721928 |
| 0.210000 | 0.513957 | 0.741483 |
| 0.220000 | 0.526908 | 0.760168 |
| 0.230000 | 0.539276 | 0.778011 |
| 0.240000 | 0.551080 | 0.795040 |
| 0.250000 | 0.562335 | 0.811278 |
| 0.260000 | 0.573057 | 0.826746 |
| 0.270000 | 0.583259 | 0.841465 |
| 0.280000 | 0.592953 | 0.855451 |
| 0.290000 | 0.602152 | 0.868721 |
| 0.300000 | 0.610864 | 0.881291 |
| 0.310000 | 0.619101 | 0.893173 |
| 0.320000 | 0.626869 | 0.904381 |
| 0.330000 | 0.634179 | 0.914926 |
| 0.340000 | 0.641035 | 0.924819 |
| 0.350000 | 0.647447 | 0.934068 |
| 0.360000 | 0.653418 | 0.942683 |
| 0.370000 | 0.658956 | 0.950672 |
| 0.380000 | 0.664064 | 0.958042 |
| 0.390000 | 0.668748 | 0.964800 |
| 0.400000 | 0.673012 | 0.970951 |
| 0.410000 | 0.676859 | 0.976500 |
| 0.420000 | 0.680292 | 0.981454 |
| 0.430000 | 0.683315 | 0.985815 |
| 0.440000 | 0.685930 | 0.989588 |
| 0.450000 | 0.688139 | 0.992774 |
| 0.460000 | 0.689944 | 0.995378 |
| 0.470000 | 0.691346 | 0.997402 |
| 0.480000 | 0.692347 | 0.998846 |
| 0.490000 | 0.692947 | 0.999711 |
| 0.500000 | 0.693147 | 1.000000 |
| 0.510000 | 0.692947 | 0.999711 |
| 0.520000 | 0.692347 | 0.998846 |
| 0.530000 | 0.691346 | 0.997402 |
| 0.540000 | 0.689944 | 0.995378 |
| 0.550000 | 0.688139 | 0.992774 |
| 0.560000 | 0.685930 | 0.989588 |
| 0.570000 | 0.683315 | 0.985815 |
| 0.580000 | 0.680292 | 0.981454 |
| 0.590000 | 0.676859 | 0.976500 |
| 0.600000 | 0.673012 | 0.970951 |
| 0.610000 | 0.668748 | 0.964800 |
| 0.620000 | 0.664064 | 0.958042 |
| 0.630000 | 0.658956 | 0.950672 |
| 0.640000 | 0.653418 | 0.942683 |
| 0.650000 | 0.647447 | 0.934068 |
| 0.660000 | 0.641035 | 0.924819 |
| 0.670000 | 0.634179 | 0.914926 |
| 0.680000 | 0.626869 | 0.904381 |
| 0.690000 | 0.619101 | 0.893173 |
| 0.700000 | 0.610864 | 0.881291 |
| 0.710000 | 0.602152 | 0.868721 |
| 0.720000 | 0.592953 | 0.855451 |
| 0.730000 | 0.583259 | 0.841465 |
| 0.740000 | 0.573057 | 0.826746 |
| 0.750000 | 0.562335 | 0.811278 |
| 0.760000 | 0.551080 | 0.795040 |
| 0.770000 | 0.539276 | 0.778011 |
| 0.780000 | 0.526908 | 0.760168 |
| 0.790000 | 0.513957 | 0.741483 |
| 0.800000 | 0.500402 | 0.721928 |
| 0.810000 | 0.486223 | 0.701471 |
| 0.820000 | 0.471393 | 0.680077 |
| 0.830000 | 0.455886 | 0.657705 |
| 0.840000 | 0.439670 | 0.634310 |
| 0.850000 | 0.422709 | 0.609840 |
| 0.860000 | 0.404963 | 0.584239 |
| 0.870000 | 0.386387 | 0.557438 |
| 0.880000 | 0.366925 | 0.529361 |
| 0.890000 | 0.346515 | 0.499916 |
| 0.900000 | 0.325083 | 0.468996 |
| 0.910000 | 0.302538 | 0.436470 |
| 0.920000 | 0.278769 | 0.402179 |
| 0.930000 | 0.253639 | 0.365924 |
| 0.940000 | 0.226968 | 0.327445 |
| 0.950000 | 0.198515 | 0.286397 |
| 0.960000 | 0.167944 | 0.242292 |
| 0.970000 | 0.134742 | 0.194392 |
| 0.980000 | 0.098039 | 0.141441 |
| 0.990000 | 0.056002 | 0.080793 |
| 1.000000 | 0.000000 | 0.000000 |
Keep the curve near its readable design size and scroll this panel locally if needed.
| Up probability p | h(p) (nats) | h(p)/ln 2 (bits) |
|---|---|---|
| 0.000000 | 0.000000 | 0.000000 |
| 0.100000 | 0.325083 | 0.468996 |
| 0.200000 | 0.500402 | 0.721928 |
| 0.500000 | 0.693147 | 1.000000 |
| 0.800000 | 0.500402 | 0.721928 |
| 0.900000 | 0.325083 | 0.468996 |
| 1.000000 | 0.000000 | 0.000000 |
Connect statistical and physical entropy
For a classical distribution over specified physical microstates, Gibbs entropy is S_G = k_B H = −k_B Σ_i p_i ln p_i. Boltzmann’s constant k_B = 1.380649 × 10⁻²³ J/K is exact in SI, so S_G has units J/K. The two-spin assigned model gives the values below. These are model Gibbs entropies, not calorimetric measurements of an unspecified preparation apparatus.
If a distribution is uniform over W accessible physical microstates, S_G = k_B ln W. Boltzmann macrostate entropy instead assigns S_B(M) = k_B ln Ω(M) to the number or measure of microstates compatible with a particular macrostate, with the cell/measure convention fixed. A macrostate can have large S_B even when its label is known with certainty.
For uniform probabilities within each macrostate, S_G = k_B H(M) + Σ_M P(M)S_B(M). If conditional microstate weights are nonuniform, replace ln Ω(M) by their actual conditional entropy. Therefore −k_B Σ_M P(M)ln P(M) of the detector’s labels is generally not the whole thermodynamic entropy. Thermodynamic identification also requires the appropriate physical state, constraints and degrees of freedom; multiplying an arbitrary message entropy by k_B does not establish that identification.
For the opening spins we treat diagonal, classical outcome probabilities only. In a general quantum system, measurement probabilities depend on the measurement basis; their Shannon entropy need not equal the state’s von Neumann entropy. Quantum states and indistinguishability require the later quantum-statistical treatment.
| Preparation | H_micro (nats) | H_micro (bits) | S_G (J/K) |
|---|---|---|---|
| p = 0.5 | 1.386294 | 2.000000 | 1.913985923e-23 |
| p = 0.8 | 1.000805 | 1.443856 | 1.381760211e-23 |
Further: bounds, concavity and constraints
For a fixed finite W-state space, 0 ≤ H ≤ ln W. The lower bound follows term by term because ln p_i ≤ 0. To see the upper bound, compare p with the uniform reference u_i = 1/W: D(p||u) = ln W − H ≥ 0, using the relative-entropy proof below. Equality at the upper bound requires p = u. Changing W or the state resolution changes the comparison.
For the binary case, h′(p) = ln[(1−p)/p] and h″(p) = −1/[p(1−p)] < 0 for 0 < p < 1. Thus the interior stationary point p = 1/2 is the unique maximum, while the derivative is not finite at the endpoints. More generally −x ln x is concave, so mixing normalized distributions cannot lower entropy below their probability-weighted average. Strictness can fail when the distributions agree; “every averaging strictly increases entropy” is too strong.
Maximum entropy is an inference with explicit constraints and a reference measure, not a mechanism forcing a system to relax. For positive reference weights r_i, maximize −Σ_i p_i ln(p_i/r_i) with normalization and specified averages Σ_i p_i f_ai = F_a. At an interior solution, differentiation gives p_i ∝ r_i exp(−Σ_a λ_a f_ai); multipliers enforce the constraints and make every exponent dimensionless. Zero weights restrict the support. Boundary constraints, unbounded continuous domains or incompatible averages may prevent an interior or normalizable solution. The ensemble lesson supplies physical energy and particle-exchange constraints rather than guessing them here.
Correlations change additivity
A joint distribution p_ij describes two outcomes X and Y together. Marginals are p_i = Σ_j p_ij and p_j = Σ_i p_ij. The conditional entropy H(Y|X) averages the entropy of p(j|i) with weight p_i. Expanding ln p_ij = ln p_i + ln p(j|i) gives the chain rule H(X,Y) = H(X) + H(Y|X). Zero-weight conditions contribute zero.
For independent variables, H(Y|X) = H(Y), so entropies add. Correlations reduce joint entropy below the sum of marginal entropies. Their mutual information I(X;Y) = H(X)+H(Y)−H(X,Y) = D(p_XY||p_X p_Y) is nonnegative and zero exactly at independence. This is classical information, not an assertion about energy exchange or a thermodynamic production rate.
Compare two fair independent spins with a classical preparation that gives DD or UU with equal probability and never DU or UD. Each individual spin is still fair in the correlated preparation, but knowing one reveals the other. Marginal measurements alone do not determine joint entropy or justify an independence approximation.
| Preparation | H(X) | H(Y) | H(X,Y) | H(Y|X) | I(X;Y) |
|---|---|---|---|---|---|
| Independent | 0.693147 | 0.693147 | 1.386294 | 0.693147 | 0.000000 |
| DD/UU correlated | 0.693147 | 0.693147 | 0.693147 | 0.000000 | 0.693147 |
Merge labels without inventing new states
Suppose four distinguishable physical cells have probabilities p = (0.10, 0.20, 0.30, 0.40). A detector reports only A = {1,2} or B = {3,4}. The reported probabilities are P_A = 0.30 and P_B = 0.70. This deterministic many-to-one map replaces four outcome labels by two.
The chain rule gives H(p) = H(P) + Σ_a P_a H(p_i|a). The within-group term is nonnegative, so the entropy of the reported group label is no larger than that of the original microscopic label. Here H(P) = 0.610864 nats while H(p) = 1.279854 nats. Information about which member occurred has been omitted; this statement does not claim the physical system’s thermodynamic entropy fell.
To predict later measurements that depend on the omitted cell, the group probabilities alone are insufficient. One needs the conditional distribution or an explicit reconstruction assumption. Coarse observation and assumed redistribution on the original space are different steps.
| Cell | Group | Original p_i | Reconstructed q_i |
|---|---|---|---|
| 1 | A | 0.100000 | 0.150000 |
| 2 | A | 0.200000 | 0.150000 |
| 3 | B | 0.300000 | 0.350000 |
| 4 | B | 0.400000 | 0.350000 |
Reconstruct on the same microscopic space
Now retain the original four-cell space but replace the unknown conditional distribution inside each group by a uniform one. The reconstruction is q = (0.15,0.15,0.35,0.35). This uses equal physical reference weight for the two cells in each group. For unequal cell measures, uniform density means probabilities proportional to those measures, not equal numerical cell probabilities.
With g_a equally weighted cells in group a, q_i = P_a/g_a. On this same microscopic space, H(q) = H(P) + Σ_a P_a ln g_a. Subtracting H(p) gives H(q)−H(p) = D(p||q) ≥ 0. Reconstruction erases internal information and raises, or leaves unchanged, the microscopic entropy. It is a different comparison from merging labels, which lowers the entropy of the observed label.
Here H(q) = 1.304011 nats, only 0.024157 nats above H(p). The within-group information omitted by merely reporting A or B is 0.668990 nats. These two differences are not interchangeable. The table separates the spaces and the operations so the vertical bars in an entropy comparison cannot be mistaken for a time trajectory.
Grouping labels and smoothing microscopic weights are different operations
Four original cell probabilities are grouped into A={1,2}, B={3,4}. Uniform reconstruction keeps the group probabilities while replacing the within-group weights on the original four-cell space.
- Original p = (0.10,0.20,0.30,0.40)
- Reconstructed q = (0.15,0.15,0.35,0.35)
Original and reconstructed weights on the same four cells
Entropy accounting across explicitly named descriptions
- A={1,2}: P_A=0.30
- B={3,4}: P_B=0.70
- H(p): original four cells
- H(P): two reported labels
- Σ P_a H(i|a): omitted conditional information
- H(q): reconstructed four cells
- D(p||q)=H(q)−H(p): 0.024157 nats
- H(p)=H(P)+Σ P_a H(i|a)
- Equal reconstruction probabilities assume equal physical reference weights within each group.
- Grouping reduces label entropy; reconstruction raises microscopic entropy. These are different comparisons, not a time path.
Read both complete original cell-weight and entropy-accounting tables.
Complete text and table equivalents
Panels stack at narrow widths; scroll each plot locally without shrinking labels.
| Quantity | Outcome space or meaning | Value (nats) |
|---|---|---|
| H(p) | Original four microscopic cells | 1.279854 |
| H(P) | Two reported group labels | 0.610864 |
| Σ P_a H(i|a) | Hidden within-group conditional entropy | 0.668990 |
| H(q) | Reconstructed four microscopic cells | 1.304011 |
| H(q) − H(p) = D(p||q) | Information discarded by uniform reconstruction | 0.024157 |
Relative entropy keeps the reference visible
For normalized p and q on the same discrete space, define the Kullback–Leibler relative entropy D(p||q) = Σ_i p_i ln(p_i/q_i). The first argument supplies the average; the second is the reference model. A zero p_i contributes zero. If p_i > 0 where q_i = 0, D is +∞: the reference excludes an outcome that the preparation allows. This is a support mismatch, not a large finite plotted value.
For positive q on the support of p, −ln x ≥ 1−x gives D(p||q) ≥ Σ_(p_i>0)(p_i−q_i) ≥ 0. Equality requires p = q. D is generally asymmetric and does not satisfy the triangle inequality, so it is not a metric distance. Logarithm base changes its units, not the ordering of its arguments.
For a binary preparation with up probability p and a fixed binary reference with up probability q, D = p ln(p/q)+(1−p)ln[(1−p)/(1−q)]. The two curves use q = 1/2 and q = 4/5. They are zero at their own reference distributions. A biased preparation need not be “further from equilibrium”: equilibrium has not been specified, and the appropriate reference may itself be biased.
Only for the uniform reference on W states is D(p||u) = ln W−H(p). A nonuniform reference requires the full probability ratios. Do not identify the historical phrase “relative entropy” used for a normalized entropy ratio in some early information literature with this KL definition.
The reference distribution changes the KL comparison
Compare a binary preparation with two distinct fixed references. Both references give positive weight to both outcomes, so all displayed endpoint values are finite.
- Fixed reference q_up = 1/2
- Fixed reference q_up = 4/5
Binary KL relative entropy against fixed references
- D(p||q)=0 at p=q=1/2
- D(p||q)=0 at p=q=4/5
- p is averaged; q is the reference. Interchanging them generally changes D.
- Positive p where q=0 gives +∞; this separate support mismatch is not a finite plotted point.
- Neither reference is identified as equilibrium without a physical model.
- Only for q uniform: D(p||q)=ln 2−h(p).
- Samples at Δp = 0.01; lines join adjacent samples.
Read the complete original sample comparison; full grid values are supplied separately.
Complete text and table equivalents
Open the complete plotted grid
| p_up | D(p||q_up=1/2) (nats) | D(p||q_up=4/5) (nats) |
|---|---|---|
| 0.000000 | 0.693147 | 1.609438 |
| 0.010000 | 0.637146 | 1.539573 |
| 0.020000 | 0.595108 | 1.483673 |
| 0.030000 | 0.558405 | 1.433107 |
| 0.040000 | 0.525203 | 1.386042 |
| 0.050000 | 0.494632 | 1.341608 |
| 0.060000 | 0.466180 | 1.299293 |
| 0.070000 | 0.439508 | 1.258758 |
| 0.080000 | 0.414378 | 1.219765 |
| 0.090000 | 0.390609 | 1.182134 |
| 0.100000 | 0.368064 | 1.145726 |
| 0.110000 | 0.346632 | 1.110430 |
| 0.120000 | 0.326222 | 1.076158 |
| 0.130000 | 0.306760 | 1.042833 |
| 0.140000 | 0.288184 | 1.010393 |
| 0.150000 | 0.270438 | 0.978785 |
| 0.160000 | 0.253477 | 0.947961 |
| 0.170000 | 0.237261 | 0.917882 |
| 0.180000 | 0.221754 | 0.888511 |
| 0.190000 | 0.206924 | 0.859819 |
| 0.200000 | 0.192745 | 0.831777 |
| 0.210000 | 0.179191 | 0.804359 |
| 0.220000 | 0.166239 | 0.777545 |
| 0.230000 | 0.153871 | 0.751314 |
| 0.240000 | 0.142067 | 0.725647 |
| 0.250000 | 0.130812 | 0.700529 |
| 0.260000 | 0.120090 | 0.675944 |
| 0.270000 | 0.109888 | 0.651880 |
| 0.280000 | 0.100194 | 0.628322 |
| 0.290000 | 0.090995 | 0.605261 |
| 0.300000 | 0.082283 | 0.582685 |
| 0.310000 | 0.074047 | 0.560586 |
| 0.320000 | 0.066278 | 0.538954 |
| 0.330000 | 0.058969 | 0.517782 |
| 0.340000 | 0.052112 | 0.497062 |
| 0.350000 | 0.045701 | 0.476788 |
| 0.360000 | 0.039729 | 0.456954 |
| 0.370000 | 0.034191 | 0.437553 |
| 0.380000 | 0.029083 | 0.418582 |
| 0.390000 | 0.024399 | 0.400035 |
| 0.400000 | 0.020136 | 0.381909 |
| 0.410000 | 0.016289 | 0.364199 |
| 0.420000 | 0.012855 | 0.346902 |
| 0.430000 | 0.009832 | 0.330016 |
| 0.440000 | 0.007217 | 0.313539 |
| 0.450000 | 0.005008 | 0.297467 |
| 0.460000 | 0.003203 | 0.281799 |
| 0.470000 | 0.001801 | 0.266533 |
| 0.480000 | 0.000800 | 0.251670 |
| 0.490000 | 0.000200 | 0.237207 |
| 0.500000 | 0.000000 | 0.223144 |
| 0.510000 | 0.000200 | 0.209481 |
| 0.520000 | 0.000800 | 0.196218 |
| 0.530000 | 0.001801 | 0.183356 |
| 0.540000 | 0.003203 | 0.170895 |
| 0.550000 | 0.005008 | 0.158837 |
| 0.560000 | 0.007217 | 0.147183 |
| 0.570000 | 0.009832 | 0.135935 |
| 0.580000 | 0.012855 | 0.125095 |
| 0.590000 | 0.016289 | 0.114666 |
| 0.600000 | 0.020136 | 0.104650 |
| 0.610000 | 0.024399 | 0.095050 |
| 0.620000 | 0.029083 | 0.085871 |
| 0.630000 | 0.034191 | 0.077117 |
| 0.640000 | 0.039729 | 0.068791 |
| 0.650000 | 0.045701 | 0.060900 |
| 0.660000 | 0.052112 | 0.053448 |
| 0.670000 | 0.058969 | 0.046442 |
| 0.680000 | 0.066278 | 0.039888 |
| 0.690000 | 0.074047 | 0.033794 |
| 0.700000 | 0.082283 | 0.028168 |
| 0.710000 | 0.090995 | 0.023017 |
| 0.720000 | 0.100194 | 0.018353 |
| 0.730000 | 0.109888 | 0.014184 |
| 0.740000 | 0.120090 | 0.010523 |
| 0.750000 | 0.130812 | 0.007382 |
| 0.760000 | 0.142067 | 0.004774 |
| 0.770000 | 0.153871 | 0.002715 |
| 0.780000 | 0.166239 | 0.001220 |
| 0.790000 | 0.179191 | 0.000309 |
| 0.800000 | 0.192745 | 0.000000 |
| 0.810000 | 0.206924 | 0.000317 |
| 0.820000 | 0.221754 | 0.001283 |
| 0.830000 | 0.237261 | 0.002927 |
| 0.840000 | 0.253477 | 0.005281 |
| 0.850000 | 0.270438 | 0.008379 |
| 0.860000 | 0.288184 | 0.012261 |
| 0.870000 | 0.306760 | 0.016975 |
| 0.880000 | 0.326222 | 0.022574 |
| 0.890000 | 0.346632 | 0.029121 |
| 0.900000 | 0.368064 | 0.036690 |
| 0.910000 | 0.390609 | 0.045372 |
| 0.920000 | 0.414378 | 0.055278 |
| 0.930000 | 0.439508 | 0.066545 |
| 0.940000 | 0.466180 | 0.079354 |
| 0.950000 | 0.494632 | 0.093943 |
| 0.960000 | 0.525203 | 0.110651 |
| 0.970000 | 0.558405 | 0.129990 |
| 0.980000 | 0.595108 | 0.152830 |
| 0.990000 | 0.637146 | 0.181005 |
| 1.000000 | 0.693147 | 0.223144 |
Use local horizontal scrolling to retain readable axes and curve distinctions.
| Preparation up probability p | D(p||q = 1/2) | D(p||q = 4/5) |
|---|---|---|
| 0.000000 | 0.693147 | 1.609438 |
| 0.100000 | 0.368064 | 1.145726 |
| 0.200000 | 0.192745 | 0.831777 |
| 0.500000 | 0.000000 | 0.223144 |
| 0.800000 | 0.192745 | 0.000000 |
| 0.900000 | 0.368064 | 0.036690 |
| 1.000000 | 0.693147 | 0.223144 |
Further: probability maps and irreversibility
A stochastic map has entries K_ji ≥ 0 with Σ_j K_ji = 1 for each input i. It transforms both p and q by the same rule. The log-sum inequality gives D(Kp||Kq) ≤ D(p||q). For one output j, apply Σ_i a_i ln(a_i/b_i) ≥ (Σ_i a_i)ln[(Σ_i a_i)/(Σ_i b_i)] to a_i = K_ji p_i and b_i = K_ji q_i; then sum over j. The log-sum inequality itself follows by setting A = Σ_i a_i, B = Σ_i b_i and subtracting its right side: for positive totals the difference is A D(a_i/A || b_i/B), which is nonnegative by the preceding proof. Zero terms use the support conventions above. This proves that the same probabilistic processing cannot improve distinguishability from the reference.
If q is stationary, Kq = q, the result becomes D(Kp||q) ≤ D(p||q). Ordinary H increases under a doubly stochastic map on the same finite state space because the uniform u is then stationary. An arbitrary stochastic map need not preserve u. For example, a reset map that outputs up with probability 4/5 regardless of its input takes a fair spin to that biased distribution, reducing H from 0.693147 to 0.500402 nats. It is not an isolated reversible Hamiltonian evolution.
For a closed classical Hamiltonian system, Liouville evolution preserves phase-space volume and transports the fine-grained density without changing its value along trajectories. With a fixed dimensionless phase-space reference measure and suitable boundary/integrability conditions, −k_B ∫ρ ln ρ dμ is conserved. Macroscopic entropy increase therefore needs a specified coarse description and physical assumptions about preparation, relaxation, correlations or environment. It does not follow from counting alone, from an observer becoming uncertain, or from a claim that every possible coarse-grained time step is monotone. Small systems also permit fluctuations.
For an open system relaxing toward a thermal reference, relative entropy can connect to an appropriate free-energy difference when the reservoir, energies and equilibrium reference are specified. That thermodynamic identification and the distinction between system and total entropy belong to the later ensembles and nonequilibrium lessons. The probability contraction proved here, by itself, is not a complete entropy-production formula.
Further: continuous probabilities need a measure
For a continuous variable x, probability of an interval is ∫f(x)dx; a density is not a point probability and can exceed one. Its units are inverse units of x. To avoid taking the logarithm of a dimensional density without a convention, first specify a dimensionless coordinate or a physical reference measure. A raw differential entropy h = −∫f ln f is not an absolute state count.
Let y = x/(1 m) be dimensionless and uniform on 0 ≤ y ≤ 1/2, with density f_y = 2. Then h_y = −ln 2 = −0.693147. With z = 100y the support is [0,50], f_z = 0.02 and h_z = ln 50 = 3.912023. The probabilities have not changed, yet h_z−h_y = ln 100. In general an invertible smooth coordinate change gives h_z = h_y + E[ln|dz/dy|], when these quantities exist.
Discrete histogram entropy also depends on resolution. Here equal aligned bins of width Δy = 1/4 give two equal occupied bins and H = ln 2; Δy = 1/8 gives four and H = ln 4. For sufficiently regular densities and small equal bins, H_bins ≈ h_y−ln Δy. This relation is exact in this uniform aligned example, not for arbitrary irregular densities or bins.
Continuous relative entropy D(f||g) = ∫f ln(f/g)dy uses densities with respect to the same measure. A finite value requires f = 0 almost everywhere on the set where g = 0, and f ln(f/g) must be integrable. Changing densities on a set of zero integration measure does not affect these integrals. For this f on [0,1/2] and reference g = 1 on [0,1], D = ln 2. Transforming both densities consistently to z cancels the Jacobians, so D remains unchanged. The physical phase-space cell/reference convention, including quantum state counting when needed, is what permits a statistical entropy to be compared with thermodynamics.
| Description | Density or cell probabilities | Entropy value (nats) | Convention |
|---|---|---|---|
| y = x/(1 m), support [0,1/2] | Density 2 | −0.693147 | Differential h_y |
| z = 100y, support [0,50] | Density 0.02 | 3.912023 | Differential h_z |
| Bins Δy = 1/4 | Two occupied bins, probability 1/2 each | 0.693147 | Discrete histogram H |
| Bins Δy = 1/8 | Four occupied bins, probability 1/4 each | 1.386294 | Discrete histogram H |
Use probability with measurements and models
In repeated spin readout, frequencies estimate the probabilities of the chosen measurement outcomes. Finite data are not the probability law itself: an unobserved outcome can still have nonzero probability. Report the preparation, detection error model, number of samples, time dependence and possible correlations before interpreting an estimated entropy. A finite-record zero is not automatically a physically forbidden state.
In a simulation, a histogram is tied to the bins and sampling procedure. Compare like resolution and like physical measures, check normalization, and account for correlations between samples. Entropy of a few observed categories is not automatically the thermodynamic entropy of all unresolved molecular states. In statistical inference, KL can compare a candidate model with a stated reference; a finite, nonnegative value does not prove either model is physically correct.
Use this sequence: name the physical outcomes and reference measure; justify or estimate their weights; test normalization and independence; say whether entropy concerns a microstate distribution, a macrostate label or a reconstruction; then state the logarithm base and units. Before inferring evolution or equilibrium, supply the dynamics and constraints that support that inference.
Continue with the physical ensemble
“Microstates, macrostates, and multiplicity” develops the state-counting side. “Microcanonical, canonical, and grand canonical ensembles” derives equilibrium probability laws from constraints and exchanges. “Partition functions” makes those laws useful for thermodynamic calculations. “Fluctuations and response functions” and “Non-equilibrium and stochastic thermodynamics” connect probabilities to measurements and dynamics. Follow their permanent map links until their actual English articles are available.
The central result here is usable before those developments: the same list of accessible outcomes can support different probability distributions and different entropies. Counts, weights, correlations, measure and resolution all have physical meaning. Keeping them explicit prevents a mathematically correct entropy calculation from answering the wrong physical question.
Worked examples
More configurations need not mean greater probability
For two independent spins with p = 4/5, compare M = 1 and M = 2.
- There are two one-up states, DU and UD. Each has probability (1/5)(4/5) = 4/25.
- Sum disjoint outcomes: P(M = 1) = 8/25 = 0.32.
- The single state UU has probability (4/5)² = 16/25 = 0.64.
Two up spins is twice as probable as one. Multiplicity did not override the nonuniform preparation weights.
A rare result and an average are different
At p_up = 4/5, compare the surprisal of down with the one-spin entropy.
- Down has probability 1/5, so its surprisal is −ln(1/5) = ln 5 ≈ 1.609438 nats.
- Up has surprisal −ln(4/5) ≈ 0.223144 nats.
- Weight by the probabilities: h = (1/5)ln 5 + (4/5)ln(5/4) ≈ 0.500402 nats.
The rare down result has 1.609438 nats of surprisal; the distribution has only 0.500402 nats of average entropy.
Convert nats to physical Gibbs units
Find the assigned two-spin Gibbs entropy for p = 4/5.
- Independence makes the microscopic joint entropy 2h(4/5) = 1.000804847… nats.
- Multiply by k_B = 1.380649 × 10⁻²³ J/K.
- Keep the physical model: two localized sites with the specified diagonal probability distribution.
S_G ≈ 1.381760211 × 10⁻²³ J/K. This does not include an apparatus or prove a heat-transfer entropy change.
Compare grouping with reconstruction
For p = (0.10,0.20,0.30,0.40), group cells 1–2 and 3–4, then reconstruct uniformly within each group.
- Group probabilities are (0.30,0.70), with label entropy 0.610864 nats.
- Uniform conditional reconstruction gives q = (0.15,0.15,0.35,0.35) on the original four cells.
- H(p) = 1.279854 and H(q) = 1.304011 nats. Their difference is 0.024157 nats, equal to D(p||q).
Merging reduces the entropy of the reported label; reconstruction raises entropy on the original microscopic space. They are different comparisons.
Choose and retain the reference
For a binary p_up = 1/5 preparation, compare it with q_up = 4/5 and with the fair reference.
- Against q_up = 4/5, D = (1/5)ln(1/4)+(4/5)ln 4 = (3/5)ln 4.
- This gives 0.831776617… nats.
- Against the fair reference, D = ln 2−h(1/5) = 0.192744757… nats.
Different references answer different comparisons. Neither reference is called equilibrium without a physical justification.
Changing position coordinates does not change probability
A position is uniform on 0 ≤ x ≤ 0.5 m. Compare y = x/(1 m) and z = 100y.
- The dimensionless y-density is 2 and h_y = −ln 2.
- The z-density is 0.02 on [0,50], so h_z = ln 50.
- h_z−h_y = ln 100 ≈ 4.605170. Every corresponding interval still has the same probability.
The differential entropy changes with the coordinate convention; no physical randomization occurred.
Same marginals, different joint entropy
A classical preparation gives DD and UU with probability 1/2 each. Find H(X,Y) and I(X;Y).
- Both marginals are fair, with entropy ln 2 each.
- Only two joint states have nonzero probability, so H(X,Y) = ln 2.
- I = ln 2 + ln 2−ln 2 = ln 2; H(Y|X) = 0.
The joint entropy is 0.693147 nats and mutual information is 0.693147 nats. Fair marginals do not establish independent spins.
Try it yourself
A proposed four-outcome model assigns (0.1,0.2,0.3,0.5). Can you compute its probability entropy as given?
Show the answer and reasoning
It is not a normalized distribution: the sum is 1.1.
Find the missing assumption or correct the model first. Dividing by 1.1 would define a different model and needs justification; do not silently repair measured or theoretical weights.
In the p = 4/5 opening model, find P(first spin up | M = 1).
Show the answer and reasoning
1/2.
The conditioning event contains DU and UD, each with probability 4/25. Only UD has the first spin up, so the ratio is (4/25)/(8/25) = 1/2.
Do DD and UU have equal probabilities merely because each has multiplicity one?
Show the answer and reasoning
No; in preparation B their probabilities are 0.04 and 0.64.
A count is not a probability law without equal weighting. The preparation fixes a bias that gives different product weights.
What are h(0), h(1) and h(1/2), in nats?
Show the answer and reasoning
0, 0 and ln 2 ≈ 0.693147.
Use the limit 0 ln 0 = 0 at a definite outcome. At p = 1/2 the two equally likely outcomes maximize binary entropy.
Two fair independent spins have two bits of microscopic entropy. What is S_G?
Show the answer and reasoning
S_G = 2 k_B ln 2 ≈ 1.913985923 × 10⁻²³ J/K.
Convert bits to natural-log units before multiplying by k_B. Using 2k_B alone mixes logarithm conventions.
Two fair spin marginals are observed. Is joint entropy necessarily 2 ln 2?
Show the answer and reasoning
No. The DD/UU correlated preparation has joint entropy ln 2.
The sum of marginal entropies is an upper bound. Equality requires independence, which marginal measurements alone do not prove.
If the four-cell distribution already equals (0.15,0.15,0.35,0.35), does uniform reconstruction within A={1,2}, B={3,4} strictly raise its entropy?
Show the answer and reasoning
No; it leaves the distribution and entropy unchanged.
It is already uniform within both groups, so p = q and D(p||q) = 0. Entropy increase is nonnegative, not necessarily strict.
For p=(1/2,1/2) and q=(1,0), is D(p||q) finite?
Show the answer and reasoning
No. It is +∞.
The second outcome is allowed by p but forbidden by q. Replacing q=0 with a small cutoff changes the reference and must not be presented as the exact model.
Compare D(p||q) and D(q||p) for p_up = 1/2, q_up = 4/5.
Show the answer and reasoning
D(p||q) ≈ 0.223144; D(q||p) ≈ 0.192745 nats.
The averaging distribution changes when the arguments are swapped. Relative entropy is not a symmetric distance.
A reset map outputs up with probability 4/5 for every input. Does it raise the entropy of a fair input spin?
Show the answer and reasoning
No. It lowers H from ln 2 to h(4/5), a decrease of about 0.192745 nats.
The map is stochastic but not doubly stochastic. It does not preserve the uniform distribution; physical implementation and environmental entropy require additional modeling.
For the uniform y on [0,1/2], halve the equal bin width from 1/4 to 1/8. What happens to histogram entropy?
Show the answer and reasoning
It rises from ln 2 to ln 4, an increase of ln 2.
The description now distinguishes four equal-probability cells instead of two. This changes the observation resolution without establishing a physical entropy-production process.
A closed Hamiltonian ensemble stretches into fine phase-space filaments. Does this by itself increase its fine-grained Gibbs entropy?
Show the answer and reasoning
No, under volume-preserving Hamiltonian evolution with the stated regularity and boundary conditions it is conserved.
A fixed-resolution reconstruction can omit filament information and have a different entropy. Its growth requires its own coarse-graining and physical assumptions; it is not a contradiction of Liouville’s theorem.
Can a probability density equal 2 while total probability remains one?
Show the answer and reasoning
Yes: f_y=2 on an interval of dimensionless length 1/2 integrates to one.
Densities are not point probabilities. Their magnitude and units depend on the coordinate; interval probabilities, with the integration measure, are the normalized quantities.
A preparation is closer in KL to q_up=4/5 than to q_up=1/2. Does that prove it is closer to thermal equilibrium?
Show the answer and reasoning
No.
A reference is an explicit probability model. To call it thermal equilibrium requires the physical Hamiltonian, constraints and reservoir conditions, which are not supplied by that numerical comparison.
What to carry forward
- Specify the physical state space, measure and probability weights before using multiplicity as a probability.
- H = −Σ p ln p averages surprisal; natural-log Gibbs entropy is S_G = k_B H for the specified physical microstate model.
- Entropy adds for independent variables; correlations require the joint distribution and conditional entropy.
- Merging outcome labels and reconstructing on the original microscopic space are different coarse-graining operations with different entropy comparisons.
- KL relative entropy keeps the reference explicit, is nonnegative and generally asymmetric, and is infinite for a positive-p/zero-q support mismatch.
- Resolution, coordinates, constraints and dynamics determine which statistical entropy can answer a physical thermodynamic question.
References
Sources for the concepts and teaching approaches in this article.
- Statistical Mechanics I: Statistical Mechanics of ParticlesMehran KardarCourse notesStatistical Mechanics I: Probability and Liouville’s theorem (Fall 2013 course notes)Lecture 5: Probability definitions and binomial weightsLecture 6: Joint probabilities, information, entropy and estimationLecture 7: Phase-space probability and Liouville’s theorem
- A Mathematical Theory of Communication (1948; corrected reprint)Claude E. ShannonResearch paper · PDFA Mathematical Theory of Communication (1948; corrected reprint)Section6: Choice, uncertainty and entropySection20: Entropy of a continuous distribution
- Statistical Physics: The Fundamentals of Statistical MechanicsDavid TongCourse notes
- A Bayesian Characterization of Relative Entropy (author-hosted paper)John C. Baez and Tobias FritzResearch paper · PDFA Bayesian Characterization of Relative Entropy (author-hosted paper)Introduction: Definition, support and reference distributions
- The International System of Units: Defining constants and the kelvinNational Institute of Standards and TechnologyReference guide