A theory of the electron mobility in compensated semiconductors for ionized-impurity scattering is developed. It differs from the existing theory due to Brooks and Herring in that it avoids the expansion of Fermi functions in powers of the electrical potential over the temperature. The mobility depends essentially on the pair correlation function between acceptors and donors. A simple model for this correlation is presented as an example, and an attempt is made to extract the pair-correlation function from the experimentally measured values of the mobility. Strong screening and antiscreening effects are obtained from an analysis of the experiment.