  We develop an exact sum rule that relates the spectral shift of a trapped gas
undergoing cold collisions to measurable quantities of the system. The method
demonstrates the dependence of the cold collision frequency shift on the
quantum degeneracy of the gas and facilitates extracting scattering lengths
from the data. We apply the method to analyzing spectral data for magnetically
trapped hydrogen atoms and determine the value of the $1S-2S$ scattering
length.
