Ripley’s K Function

8/17/16 last edited 7/09/18

Point processes appear in a wide variety of contexts. Such as making grids on spheres,generating textures,astronomy, ecology, and more. So lets get a feel for different points processes. Below you can generate samples from 4 different points processes.

Clearly we can see that random points (a Poisson process) are very different from the points from Poisson disk noise. But we want to be able to quantitatively show that they are different. A general tool analyzing this difference is the Ripley K function $K(t)=\mathrm{E}(number\ of\ other\ points\ within\ distances\ t)/\beta$ [1]. Where $\beta$ is the expected number of points per unit area of the point process. So now to benchmark various point processes we want to derive what $K(t)$ should be for a Poisson process.

A Poisson process has two conditions [1].

  • For every set B, N(B) is a Poisson distribution with mean \(Area(B)* \beta\).
  • For disjoint sets B and C, N(B) and N(C) are independently distributed.

Where N(B) is the number of points of the process within the set B. So to calculate K(t) for a Poisson process in two dimensions we see the numerator is the area within distance t of a point times beta or $\pi t^2 * \beta $. So it follows that $K(t)= \pi t^2$.

Here you can see K(t) plotted for the process above. Deviations from $\pi t^2 $ go a long way in characterizing point processes.

Now in the above graphic we are calculating $K(t)$ as

, where W is our viewing window. However this calculation has a problem. The point process is defined outside the viewing window, but points outside the window cannot be included in our sum, and so our estimation of K is biased. One potential way to correct this bias is to use reduced viewing window $W’$ such that the distance from $\partial W$ to any point within $W’$ is less than t.

If you plot \(K\) and then \(K'\) for a Poisson process you would expect a straight line. However for the naive calculation we can see that \(K'\) tapers off as \(t\) increases.