  We present a statistical method for measuring the average HI spin temperature
in distant galaxies using the expected detection yields from future wide-field
21cm absorption surveys. As a demonstrative case study we consider a simulated
all-southern-sky survey of 2-h per pointing with the Australian Square
Kilometre Array Pathfinder for intervening HI absorbers at intermediate
cosmological redshifts between $z = 0.4$ and $1$. For example, if such a survey
yielded $1000$ absorbers we would infer a harmonic-mean spin temperature of
$\overline{T}_\mathrm{spin} \sim 100$K for the population of damped Lyman
$\alpha$ (DLAs) absorbers at these redshifts, indicating that more than $50$
per cent of the neutral gas in these systems is in a cold neutral medium (CNM).
Conversely, a lower yield of only 100 detections would imply
$\overline{T}_\mathrm{spin} \sim 1000$K and a CNM fraction less than $10$ per
cent. We propose that this method can be used to provide independent
verification of the spin temperature evolution reported in recent 21cm surveys
of known DLAs at high redshift and for measuring the spin temperature at
intermediate redshifts below $z \approx 1.7$, where the Lyman-$\alpha$ line is
inaccessible using ground-based observatories. Increasingly more sensitive and
larger surveys with the Square Kilometre Array should provide stronger
statistical constraints on the average spin temperature. However, these will
ultimately be limited by the accuracy to which we can determine the HI column
density frequency distribution, the covering factor and the redshift
distribution of the background radio source population.
