# Likelihood for a log Gaussian Cox process (LGCP)

Suppose I have a log Gaussian Cox process (LGCP) $$X$$ with log intensity function $$\lambda(x)=S(x)$$ where $$S$$ follows a Gaussian process. Since LGCP still falls under the umbrella of inhomogeneous Poisson processes, the likelihood of an observed point process $$(x_1,...,x_n)$$ should be proportional to the following density

$$p(X|S) \propto \prod_{i=1}^n \exp[S(x_i)] \exp[-\exp[S(x_i)]]$$

However I've seen an alternative formulation which replaces the double exponent term dependent on $$i$$ with a constant equal to the average number of events in the study region.

$$p(X|S) \propto \prod_{i=1}^n \exp[S(x_i)] \exp\left( -\int_\mathcal{D} \exp[S(x)]dx \right)$$

Which one is correct?

Found the answer in 4.168 of "Statistics for Spatio-temporal data" by Cressie and Wikle. The information in $$X$$ represents both $$n$$ the number of points observed AND the exact locations of each of those points. So the likelihood is technically that of $$[Z(D_x), \{x_1,...,x_{Z(D_x)}\}]$$.