  Least-squares fits are an important tool in many data analysis applications.
In this paper, we review theoretical results, which are relevant for their
application to data from counting experiments. Using a simple example, we
illustrate the well known fact that commonly used variants of the least-squares
fit applied to Poisson-distributed data produce biased estimates. The bias can
be overcome with an iterated weighted least-squares method, which produces
results identical to the maximum-likelihood method. For linear models, the
iterated weighted least-squares method converges faster than the equivalent
maximum-likelihood method, and does not require problem-specific starting
values, which may be a practical advantage. The equivalence of both methods
also holds for binomially distributed data. We further show that the unbinned
maximum-likelihood method can be derived as a limiting case of the iterated
least-squares fit when the bin width goes to zero, which demonstrates a deep
connection between the two methods.
