Try it · Thermometer
Change the inputs and compare the recalculated curves with the preceding derivation and baseline figure. The axes give the units; the numerical readout states the model assumptions and any limiting cases. Reset the inputs to return to the reference setting.
Download the corresponding editable notebook. The browser recalculates the reduced equations directly; the notebook exposes the full calculation and its checks.
Python runs on this device. The first run loads the scientific libraries.
A thermometer estimates a bath temperature by counting excitations of a small system with a calibrated gap. Select a gap, generate a repeatable data set and determine whether a count of zero means zero temperature.
Derive the likelihood from the canonical occupations
For independent preparations the event count follows a binomial law. We use a stable logarithm for each outcome to compare temperatures, including when one outcome was never recorded.
Compare the probability, thermal response and experimental likelihood
The sensitivity of an energy reading is governed by its variance together with the rate at which its mean changes. A gap that is very large gives almost identical readings on every trial. A very small gap produces many transitions but their probability barely changes with temperature.
Find the optimum and inspect a boundary outcome
The optimum solves x tanh(x/2) = 2. Bisection uses the monotonicity on the positive axis. If no excitations were seen, calculate an exact one-sided 95% upper limit on the excitation probability, then invert it if that limit lies below one half.