  One of the major goals of cosmological observations is to test theories of
structure formation. The most straightforward way to carry out such tests is to
compute the likelihood function L, the probability of getting the data given
the theory. We write down this function for a general galaxy survey. The full
likelihood function is very complex, depending on all of the $n$-point
functions of the theory under consideration. Even in the simplest case, where
only the two point function is non-vanishing (Gaussian perturbations), L cannot
be calculated exactly, primarily because of the Poisson nature of the galaxy
distribution. Here we expand L about the (trivial) zero correlation limit. As a
first application, we take the binned values of the two point function as free
parameters and show that L peaks at $(DD - DR + RR)/DD$. Using Monte Carlo
techniques, we compare this estimator with the traditional $DD/DR$ and Landy &
Szalay estimators. More generally, the success of this expansion should pave
the way for further applications of the likelihood function.
