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. PACS: 03.75.Fi, 32.80.Pj The broadening and shifting of spectral lines of a gas by collisions was among the earliest discoveries in the development of high precision spectroscopy [1]. The pressure shift, which originates in interatomic perturbations [2], is particularly simple to interpret at low temperatures where the thermal de Broglie wavelength1/2 is much larger than the scattering length a [3] and the interactions arise only through s-wave scattering. In this cold collision regime, the frequency shift is much larger than the level broadening.The theory of the cold collision shift has been developed to interpret hyperfine transitions in cryogenic hydrogen masers and laser cooled atomic fountains [4]. In this work we study the shift for optical excitation in a system that can be quantum degenerate, and apply the results to data on 1S−2S two-photon excitation of trapped atomic hydrogen [5].For the case of a homogeneous sample of density n, and a coherent, weak excitation that couples two inner states of the atoms, we findHere g 2 is the equal point value of the second order correlation function [6], g 2 ≡ g (2) ( r = 0), the state 1(2) is the ground(excited) state, and a αβ is the s-wave scattering length for α − β collisions.Equation (1) shows that quantum correlations in the system are manifest in the collision shift. For a uniform Bose gas in thermal equilibrium, where n BEC is the density of condensed atoms. Above the condensation temperature, when n BEC = 0, g 2 equals 2, in which case Eq.(1) is in agreement with previous work [4]. At zero temperature, for a pure condensate with n BEC = n, the collision shift is half of the shift for a noncondensed gas. Equation (1) generalizes the result [4] to T < T BEC and relates the spectral shift to the condensate fraction.It is quite remarkable that the factor g 2 in Eq.(1) multiplies both λ 12 and λ 11 . This results from correlations between an excited atom and other atoms. During the excitation, the internal states of the atoms are rotated: cos θ(t)|1S + e −iφ(t) sin θ(t)|2S . The angles θ(t), φ(t) depend on laser power and on the atom's trajectory in the laser field, specific for each atom. However, for small excitation power, the angle θ(t) is small, and thus the internal states of all atoms remain nearly identical while the laser is on, even if the excitation field is spatially nonuniform. Therefore, during the excitation the atoms interact as identical particles. This causes the short range statistical correlations in the initial state to be replicated in the excited state of the gas, which results ...