GLOBAL KNOWLEDGE ARK

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 Physics

After 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.
01

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.

Complete microscopic probabilities for two independent localized spins; p is the up probability at each site.
OutcomeMPreparation A: p = 1/2Preparation B: p = 4/5
DD00.2500000.040000
DU10.2500000.160000
UD10.2500000.160000
UU20.2500000.640000
02

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.

03

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

Microscopic outcomes at two distinguishable sitesSite outcomes are independent within each assigned preparation; no equilibrium law is inferred. Both probability panels have the same true-zero ordinate from 0 to 1. DD, DU, UD, UUProbability (dimensionless)00.250.50.751DDDUUDUU0.2500.2500.2500.2500.0400.1600.1600.640Microscopic outcome

Number of up spins M

Number of up spins MSite outcomes are independent within each assigned preparation; no equilibrium law is inferred. Both probability panels have the same true-zero ordinate from 0 to 1. M = 0, 1, 2Probability (dimensionless)00.250.50.7510120.2500.5000.2500.0400.3200.640Up count M (dimensionless integer)
  • 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.

Complete macrostate probabilities from summing the microscopic outcomes; multiplicity alone does not fix the biased column.
MMultiplicity Ω(M)P(M), p = 1/2P(M), p = 4/5
010.2500000.040000
120.5000000.320000
210.2500000.640000
04

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.

05

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

One-spin binary entropyp = 1/2: h = ln 2 p = 0 and 1: h = 0 by the limiting convention Bits = nats / ln 2; the ordinate here is nats. Samples at Δp = 0.01; lines join adjacent samples.h(p) (nats; natural logarithms)00.250.50.7500.20.40.60.81Up probability p (dimensionless)
  • 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
Complete101-point binary entropy grid; one spin, natural-log nats and converted bits.
p_uph(p) (nats)h(p) (bits)
0.0000000.0000000.000000
0.0100000.0560020.080793
0.0200000.0980390.141441
0.0300000.1347420.194392
0.0400000.1679440.242292
0.0500000.1985150.286397
0.0600000.2269680.327445
0.0700000.2536390.365924
0.0800000.2787690.402179
0.0900000.3025380.436470
0.1000000.3250830.468996
0.1100000.3465150.499916
0.1200000.3669250.529361
0.1300000.3863870.557438
0.1400000.4049630.584239
0.1500000.4227090.609840
0.1600000.4396700.634310
0.1700000.4558860.657705
0.1800000.4713930.680077
0.1900000.4862230.701471
0.2000000.5004020.721928
0.2100000.5139570.741483
0.2200000.5269080.760168
0.2300000.5392760.778011
0.2400000.5510800.795040
0.2500000.5623350.811278
0.2600000.5730570.826746
0.2700000.5832590.841465
0.2800000.5929530.855451
0.2900000.6021520.868721
0.3000000.6108640.881291
0.3100000.6191010.893173
0.3200000.6268690.904381
0.3300000.6341790.914926
0.3400000.6410350.924819
0.3500000.6474470.934068
0.3600000.6534180.942683
0.3700000.6589560.950672
0.3800000.6640640.958042
0.3900000.6687480.964800
0.4000000.6730120.970951
0.4100000.6768590.976500
0.4200000.6802920.981454
0.4300000.6833150.985815
0.4400000.6859300.989588
0.4500000.6881390.992774
0.4600000.6899440.995378
0.4700000.6913460.997402
0.4800000.6923470.998846
0.4900000.6929470.999711
0.5000000.6931471.000000
0.5100000.6929470.999711
0.5200000.6923470.998846
0.5300000.6913460.997402
0.5400000.6899440.995378
0.5500000.6881390.992774
0.5600000.6859300.989588
0.5700000.6833150.985815
0.5800000.6802920.981454
0.5900000.6768590.976500
0.6000000.6730120.970951
0.6100000.6687480.964800
0.6200000.6640640.958042
0.6300000.6589560.950672
0.6400000.6534180.942683
0.6500000.6474470.934068
0.6600000.6410350.924819
0.6700000.6341790.914926
0.6800000.6268690.904381
0.6900000.6191010.893173
0.7000000.6108640.881291
0.7100000.6021520.868721
0.7200000.5929530.855451
0.7300000.5832590.841465
0.7400000.5730570.826746
0.7500000.5623350.811278
0.7600000.5510800.795040
0.7700000.5392760.778011
0.7800000.5269080.760168
0.7900000.5139570.741483
0.8000000.5004020.721928
0.8100000.4862230.701471
0.8200000.4713930.680077
0.8300000.4558860.657705
0.8400000.4396700.634310
0.8500000.4227090.609840
0.8600000.4049630.584239
0.8700000.3863870.557438
0.8800000.3669250.529361
0.8900000.3465150.499916
0.9000000.3250830.468996
0.9100000.3025380.436470
0.9200000.2787690.402179
0.9300000.2536390.365924
0.9400000.2269680.327445
0.9500000.1985150.286397
0.9600000.1679440.242292
0.9700000.1347420.194392
0.9800000.0980390.141441
0.9900000.0560020.080793
1.0000000.0000000.000000

Keep the curve near its readable design size and scroll this panel locally if needed.

One-spin binary entropy; endpoints use the exact limiting convention and no logarithmic plot scale.
Up probability ph(p) (nats)h(p)/ln 2 (bits)
0.0000000.0000000.000000
0.1000000.3250830.468996
0.2000000.5004020.721928
0.5000000.6931471.000000
0.8000000.5004020.721928
0.9000000.3250830.468996
1.0000000.0000000.000000
06

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.

Gibbs entropy of the complete two-spin preparation distribution, with the same physical states in both rows.
PreparationH_micro (nats)H_micro (bits)S_G (J/K)
p = 0.51.3862942.0000001.913985923e-23
p = 0.81.0008051.4438561.381760211e-23
07

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.

08

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.

Two distributions with the same fair marginals; all entropy and information entries are in nats.
PreparationH(X)H(Y)H(X,Y)H(Y|X)I(X;Y)
Independent0.6931470.6931471.3862940.6931470.000000
DD/UU correlated0.6931470.6931470.6931470.0000000.693147
09

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.

All four original cells and their groups; the reconstruction keeps each group probability and assigns equal weight within that group.
CellGroupOriginal p_iReconstructed q_i
1A0.1000000.150000
2A0.2000000.150000
3B0.3000000.350000
4B0.4000000.350000
10

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

Original and reconstructed weights on the same four cellsA={1,2}: P_A=0.30 B={3,4}: P_B=0.70 Equal reconstruction probabilities assume equal physical reference weights within each group.Cell probability (dimensionless)00.250.50.75112340.1000.2000.3000.4000.1500.1500.3500.350Original microscopic cell

Entropy accounting across explicitly named descriptions

Entropy accounting across explicitly named descriptionsH(p)=H(P)+Σ P_a H(i|a) Grouping reduces label entropy; reconstruction raises microscopic entropy. These are different comparisons, not a time path.Entropy or information (nats)00.511.5H(p)H(P)HiddenH(q)D(p||q)1.2800.6110.6691.3040.024Named quantity; not elapsed time
  • 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.

Entropy accounting for one fixed partition; category entropy and reconstructed microscopic entropy refer to different outcome spaces.
QuantityOutcome space or meaningValue (nats)
H(p)Original four microscopic cells1.279854
H(P)Two reported group labels0.610864
Σ P_a H(i|a)Hidden within-group conditional entropy0.668990
H(q)Reconstructed four microscopic cells1.304011
H(q) − H(p) = D(p||q)Information discarded by uniform reconstruction0.024157
11

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

Binary KL relative entropy against fixed referencesD(p||q)=0 at p=q=1/2 D(p||q)=0 at p=q=4/5 Positive p where q=0 gives +∞; this separate support mismatch is not a finite plotted point. Samples at Δp = 0.01; lines join adjacent samples.D(p||q) (nats; natural logarithms)00.511.51.700.20.40.60.81Preparation up probability p (dimensionless)
  • 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
Complete101-point binary KL grid; p is the preparation, fixed reference up probabilities are1/2 and4/5, all entries nats.
p_upD(p||q_up=1/2) (nats)D(p||q_up=4/5) (nats)
0.0000000.6931471.609438
0.0100000.6371461.539573
0.0200000.5951081.483673
0.0300000.5584051.433107
0.0400000.5252031.386042
0.0500000.4946321.341608
0.0600000.4661801.299293
0.0700000.4395081.258758
0.0800000.4143781.219765
0.0900000.3906091.182134
0.1000000.3680641.145726
0.1100000.3466321.110430
0.1200000.3262221.076158
0.1300000.3067601.042833
0.1400000.2881841.010393
0.1500000.2704380.978785
0.1600000.2534770.947961
0.1700000.2372610.917882
0.1800000.2217540.888511
0.1900000.2069240.859819
0.2000000.1927450.831777
0.2100000.1791910.804359
0.2200000.1662390.777545
0.2300000.1538710.751314
0.2400000.1420670.725647
0.2500000.1308120.700529
0.2600000.1200900.675944
0.2700000.1098880.651880
0.2800000.1001940.628322
0.2900000.0909950.605261
0.3000000.0822830.582685
0.3100000.0740470.560586
0.3200000.0662780.538954
0.3300000.0589690.517782
0.3400000.0521120.497062
0.3500000.0457010.476788
0.3600000.0397290.456954
0.3700000.0341910.437553
0.3800000.0290830.418582
0.3900000.0243990.400035
0.4000000.0201360.381909
0.4100000.0162890.364199
0.4200000.0128550.346902
0.4300000.0098320.330016
0.4400000.0072170.313539
0.4500000.0050080.297467
0.4600000.0032030.281799
0.4700000.0018010.266533
0.4800000.0008000.251670
0.4900000.0002000.237207
0.5000000.0000000.223144
0.5100000.0002000.209481
0.5200000.0008000.196218
0.5300000.0018010.183356
0.5400000.0032030.170895
0.5500000.0050080.158837
0.5600000.0072170.147183
0.5700000.0098320.135935
0.5800000.0128550.125095
0.5900000.0162890.114666
0.6000000.0201360.104650
0.6100000.0243990.095050
0.6200000.0290830.085871
0.6300000.0341910.077117
0.6400000.0397290.068791
0.6500000.0457010.060900
0.6600000.0521120.053448
0.6700000.0589690.046442
0.6800000.0662780.039888
0.6900000.0740470.033794
0.7000000.0822830.028168
0.7100000.0909950.023017
0.7200000.1001940.018353
0.7300000.1098880.014184
0.7400000.1200900.010523
0.7500000.1308120.007382
0.7600000.1420670.004774
0.7700000.1538710.002715
0.7800000.1662390.001220
0.7900000.1791910.000309
0.8000000.1927450.000000
0.8100000.2069240.000317
0.8200000.2217540.001283
0.8300000.2372610.002927
0.8400000.2534770.005281
0.8500000.2704380.008379
0.8600000.2881840.012261
0.8700000.3067600.016975
0.8800000.3262220.022574
0.8900000.3466320.029121
0.9000000.3680640.036690
0.9100000.3906090.045372
0.9200000.4143780.055278
0.9300000.4395080.066545
0.9400000.4661800.079354
0.9500000.4946320.093943
0.9600000.5252030.110651
0.9700000.5584050.129990
0.9800000.5951080.152830
0.9900000.6371460.181005
1.0000000.6931470.223144

Use local horizontal scrolling to retain readable axes and curve distinctions.

Binary KL relative entropy in nats; both fixed references are positive on both outcomes, so the displayed endpoint values are finite.
Preparation up probability pD(p||q = 1/2)D(p||q = 4/5)
0.0000000.6931471.609438
0.1000000.3680641.145726
0.2000000.1927450.831777
0.5000000.0000000.223144
0.8000000.1927450.000000
0.9000000.3680640.036690
1.0000000.6931470.223144
12

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.

13

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.

Same uniform physical position model expressed with two coordinates or two bin resolutions; these rows deliberately describe different entropy conventions.
DescriptionDensity or cell probabilitiesEntropy value (nats)Convention
y = x/(1 m), support [0,1/2]Density 2−0.693147Differential h_y
z = 100y, support [0,50]Density 0.023.912023Differential h_z
Bins Δy = 1/4Two occupied bins, probability 1/2 each0.693147Discrete histogram H
Bins Δy = 1/8Four occupied bins, probability 1/4 each1.386294Discrete histogram H
14

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.

15

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.

  1. There are two one-up states, DU and UD. Each has probability (1/5)(4/5) = 4/25.
  2. Sum disjoint outcomes: P(M = 1) = 8/25 = 0.32.
  3. 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.

  1. Down has probability 1/5, so its surprisal is −ln(1/5) = ln 5 ≈ 1.609438 nats.
  2. Up has surprisal −ln(4/5) ≈ 0.223144 nats.
  3. 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.

  1. Independence makes the microscopic joint entropy 2h(4/5) = 1.000804847… nats.
  2. Multiply by k_B = 1.380649 × 10⁻²³ J/K.
  3. 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.

Recover the omitted conditional entropy

For fair independent opening spins, how much entropy is omitted when only M is reported?

  1. The complete microscopic distribution is uniform over four states: H_micro = ln 4.
  2. M has probabilities (1/4,1/2,1/4): H(M) = 1.039720771… nats.
  3. Only M = 1 hides a two-way choice. Its probability is 1/2, so H_hidden = (1/2)ln 2 = 0.346573590… nats.

H_micro = H(M) + H_hidden. Reporting only M omits 0.346574 nats of microscopic label information.

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.

  1. Group probabilities are (0.30,0.70), with label entropy 0.610864 nats.
  2. Uniform conditional reconstruction gives q = (0.15,0.15,0.35,0.35) on the original four cells.
  3. 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.

  1. Against q_up = 4/5, D = (1/5)ln(1/4)+(4/5)ln 4 = (3/5)ln 4.
  2. This gives 0.831776617… nats.
  3. 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.

  1. The dimensionless y-density is 2 and h_y = −ln 2.
  2. The z-density is 0.02 on [0,50], so h_z = ln 50.
  3. 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).

  1. Both marginals are fair, with entropy ln 2 each.
  2. Only two joint states have nonzero probability, so H(X,Y) = ln 2.
  3. 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

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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.

  7. 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.

  8. 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.

  9. 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.

  10. 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.

  11. 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.

  12. 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.

  13. 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.

  14. 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.

  1. 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 distributionpeople.math.harvard.edu
  2. Statistical Physics: The Fundamentals of Statistical MechanicsDavid TongCourse notesdamtp.cam.ac.ukRead source
  3. 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 distributionsmath.ucr.edu
  4. The International System of Units: Defining constants and the kelvinNational Institute of Standards and TechnologyReference guidenist.govRead source