Lecture notes
Lecture notes
2 / 172
The notes are self-contained, however, should you desire extra
reading, I recommend
3 / 172
Bioimaging
An intro to fluorescence microscopy
See other slides
4 / 172
Spatial data and spatial point
patterns
5 / 172
Introduction to spatial data
6 / 172
(i) Continuous domain data
Data sampled over a continuous domain are those that observe a
continuous process. They could be sampled anywhere in the
domain (hence the term continuous). Examples include
I Temperature recorded at weather stations, i.e.,
{T (s 1 ), T (s 2 ), ...},
where s 1 , s 2 , ... ∈ R2 are the grid coordinates of the weather
stations.
7 / 172
(i) Continuous domain data
I Wind velocity at weather stations, i.e.
{V (s 1 ), V (s 2 ), ...},
8 / 172
(i) Continuous domain data
I Air pollution recorded at pollution sensors, i.e.
9 / 172
(ii) Event data
10 / 172
(ii) Event data
11 / 172
(ii) Event data
japanesepines
12 / 172
(ii) Event data
I Location of SrcN15-mEos2 on the plasma membrane of HeLa
cells.
From: P Annibale, Investigating the Impact of Single Molecule Fluorescence Dynamics on Photo Activated
13 / 172
Spatial Point Patterns
14 / 172
Question:
15 / 172
Spatial Point Patterns
I Here are two spatial point patterns in a square region of
interest (ROI).
(a) Completely Spatially Random (b) Clustered
They are distributed more or less regularly over the ROI. This
would be highly improbable, unless there is some underlying
mechanism which promotes an even distribution.
17 / 172
Question
18 / 172
Objectives of statistical analysis
19 / 172
Point processes
20 / 172
Poisson distribution
Before we move forward, it will be necessary for us to define the
Poisson distribution.
Definition
A discrete random variable X is said to have a Poisson distribution
with parameter µ > 0, X ∼ Poisson(µ), if for k = 0, 1, 2, ...
µk exp(−µ)
P(X = k) = .
k!
NOTE: 0! = 1 by convention.
21 / 172
Poisson distribution
0.1 0.05
0.2 0.15
0.08 0.04
0.15
0.1 0.06 0.03
0.1 0.04 0.02
0.05
0.05 0.02 0.01
0 0 0 0
0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10 0 5 10 15 20 0 10 20 30 40
k k k k
22 / 172
Poisson distribution
23 / 172
Simulating Poisson Data
To simulate n Poisson random variables with expected value µ in R
we use the function rpois(n,mu).
For example:
X = rpois(10,5)
which gives me
3 5 7 3 6 5 8 6 6 3
X = rpois(500,5)
hist(X,freq=F,breaks = seq(0,20,1)
24 / 172
Question
25 / 172
Solution
26 / 172
Question
27 / 172
Solution
28 / 172
Stochastic processes
29 / 172
Examples
Stochastic process (Markov Stochastic process (Random
chain) walk)
250
200
150
100
Realisations (starting in A)
50
A, B, B, C , A, C , C , A, B, A, ... -50
A, C , C , A, B, C , C , C , A, C , ... -100
-150
0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000
A, C , A, B, A, B, A, C , A, B, ... t
30 / 172
Point processes
I Point processes (also called event processes), are a type of
stochastic process.
I They are used to model event data, in either the temporal
domain, the spatial domain, or both.
I Temporal examples:
I The times at which you receive an email
I The times at which children are born in a maternity unit.
I The times at which a bus arrives at a bus-stop
I Spatial examples:
I where a particular species of trees grow in a forest
I where protein molecules position themselves on a cellular
membrane
I where crimes happen in a city
I Spatio-temporal examples:
I The time and location of earthquake events
31 / 172
STOCHASTIC MECHANISM REALIZATIONS
BIVARIATE DISCRETE
UNIFORM DISTRIBUTION ON
{1,2,3,4,5,6} x {1,2,3,4,5,6}
CLATHARIN COATED
PITS ON CELL MEMBRANCE
POISSON PROCESS
WITH INTENSITY !
32 / 172
STOCHASTIC MECHANISM REALIZATIONS
BIVARIATE DISCRETE
UNIFORM DISTRIBUTION ON
{1,2,3,4,5,6} x {1,2,3,4,5,6}
CLATHARIN COATED
PITS ON CELL MEMBRANCE
POISSON PROCESS
WITH INTENSITY !
33 / 172
Point process in 1D
We will begin our exploration into point processes with temporal
point processes (1D point processes).
I We will represent an event process as N(A), where A ⊂ R.
N(A) is a random number describing the number of events
that occur in A.
I We will also use the notation N(t) to denote the number of
events that have occurred in the interval (0, t]. I.e., for an
June 28, 2019
Abstract
Definition (Simple)
N is called a simple point process if no two events can occur at
exactly the same time.
I We will make use of the incremental process
dN(t) = N(t + dt) − N(t).
I Essentially this tells us the number of events that occur in the
interval (t, t + dt] and for simple processes is Bernoulli (i.e.
takes a value of 0 or 1).
35 / 172
Intensity
Definition (Intensity)
The intensity λ(t) of a point process is the expected number of
events per unit time, i.e.
E {dN(t)}
λ(t) = .
dt
36 / 172
Poisson process in 1D
37 / 172
Homogeneous process
Definition (Homogeneous)
A Poisson process N is called homogeneous is λ(t) = λ for all t.
That is to say, it has a constant intensity for all time.
Processes that have a variable intensity are called inhomogeneous.
inhomogeneous intensity homogeneous intensity
100 100
80 80
60 60
40 40
20 20
0 0
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
time time
inhomogeneous events homogeneous events
38 / 172
Properties of Poisson Processes
39 / 172
Question
40 / 172
Solution
41 / 172
Question
42 / 172
Solution
43 / 172
Question
44 / 172
Solution
45 / 172
Simulating temporal Poisson processes
Suppose we wish to simulate a homogeneous Poisson process with
intensity λ on some interval (0, T ]. How might we go about doing
so?
I We know that the number of events in (0, T ], i.e.
N(T ) = N((0, T )) ∼ Poisson(λT ), so we first simulate a
Poisson random variable with expected value λT . This will
give us the total number of events in our realization.
n = rpois(1,lambda*T)
I Then we wish to distributed these events uniformly in the
region.
E = runif(n,min=0,max=T)
I It will probably be convenient to order these events in
increasing order.
E = sort(E)
I We could plot these with
plot(E,rep(0,length(E),type="p",pch=19,cex=0.3)
46 / 172
Realisations of a homogeneous Poisson process on (0,10]
with intensity λ = 2
0 2 4 6 8 10 0 2 4 6 8 10
time time
0 2 4 6 8 10 0 2 4 6 8 10
time time
0 2 4 6 8 10 0 2 4 6 8 10
time time
47 / 172
Spatial Point Processes
I The concept of a point process extends to higher dimensions
(space).
48 / 172
Spatial Point Process
49 / 172
Intensity
! = 10 on [0,10]x[0,10]
N
Definition (Intensity)
The intensity λ(s) of a point process is
the expected number of events per unit
area, i.e.
! = 1 on [0,10]x[0,10]
E {N(ds)}
λ(s) = lim .
|ds|→0 |ds|
50 / 172
Intensity
Therefore
and
P(N(ds) = 1) = λ(s)|ds|.
51 / 172
Poisson Process
2. For any disjoint pair of sets A and B, N(A) and N(B) are
independent events.
52 / 172
1
53 / 172
Homogeneous
Definition (Homogeneous)
A Poisson process N is called homogeneous is λ(s) = λ for all
s ∈ X . That is to say, it has a constant intensity over all space.
54 / 172
Question
55 / 172
Complete spatial randomness
56 / 172
Complete spatial randomness
0 0 1 0 0 0 1 1 0 0 1 1 0 1 0 1 1 0 0 0 1 1 1 1 1 0 1 1 0 0 1 1 1 1 0 0 0 1 1 1 0
1 0 0 1 0 1 1 0 0 0 0 1 0 1 0 0 0 1 0 0 1 0 0 0 1 0 1 0 1 1 0 0 1 0 0 0 1 1 0 1 1
0 0 0 0 1 1 1 1 0 0 1 0 1 0 1 0 1 0 0 1 0 1 1 0 1 0 1 0 0 0 1 0 0 1 1 0 0 1 1 1 1
1 1 1 1 1 0 1 0 1 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 0 0 1 0 0 0 0 1 1 0 1 0 0 0 1 1
1 1 0 0 0 1 1 0 1 0 0 1 0 0 0 0 0 0 0 0 1 1 0 0 1 0 0 0 1 0 0 0 0 1 0 1 1 0 0 0 1
0 1 0 0 0 1 1 1 0 0 0 0 0 1 0 1 1 0 0 0 1 0 0 1 1 1 0 1 0 0 1 1 0 0 0 0 1 1 0 0 0
1 0 1 1 1 0 1 1 1 1 0 0 1 1 0 0 0 0 1 0 1 1 1 1 1 1 1 0 1 1 0 0 0 0 0 0 0 1 1 1 1
0 1 1 0 1 0 0 0 0 1 1 0 0 0 0 0 0 1 1 1 0 0 0 0 1 0 0 1 0 0 1 0 0 1 1 1 0 0 1 0 0
0 0 1 1 0 1 1 1 0 1 0 1 0 0 1 0 1 0 0 1 1 1 1 1 0 0 0 0 1 0 1 0 1 0 1 0 0 0 0 0 1
1 0 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 0 1 1 0 0 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0
1 0 1 1 1 1 1 1 1 1 1 1 0 0 0 1 1 1 0 1 1 1 1 1 0 1 0 0 1 0 0 0 0 1 0 1 1 0 0 1 1
0 0 0 0 1 0 1 0 1 0 0 1 1 1 1 1 0 1 0 1 1 1 1 0 0 0 0 1 1 1 1 1 0 0 0 1 1 0 0 0 0
0 0 1 0 1 1 1 1 0 1 0 1 1 0 1 0 0 1 1 0 0 0 1 1 0 0 0 0 0 1 0 1 1 0 1 0 0 1 1 1 0
1 1 1 1 1 1 1 1 0 1 0 0 1 1 0 1 1 0 1 0 0 0 0 1 0 1 0 0 0 1 1 1 0 0 0 0 1 0 0 1 0
1 1 0 1 0 0 0 0 0 0 1 1 0 1 1 1 0 0 0 1 1 0 0 0 1 1 0 0 0 1 0 1 0 1 1 1 0 0 1 1 1
0 0 1 1 1 0 0 1 1 0 1 1 0 1 0 0 0 1 0 0 1 0 1 1 1 0 0 1 0 1 0 0 1 0 1 0 1 1 0 0 1
1 0 1 0 0 0 1 1 0 0 0 0 0 1 0 1 1 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 1 0 0 1 0 1 1 1 1
0 1 1 1 1 1 0 1 1 1 0 1 0 0 1 0 0 1 0 0 1 1 0 0 0 1 0 0 0 0 1 1 1 1 1 1 0 0 1 1 1
1 1 1 0 1 0 1 1 1 1 1 0 1 0 0 0 1 1 1 0 0 1 1 0 0 1 0 0 1 0 1 1 0 0 1 0 0 0 1 1 1
0 1 1 0 0 1 1 1 0 1 1 0 1 0 0 1 1 0 0 0 0 1 0 1 1 1 0 0 0 0 1 0 1 0 0 0 1 1 0 0 0
0 0 0 0 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 1 1 1 0 1 0 0 0 0 1 1 0 1 0 0 0 1 0 1 1 1 0
0 0 0 1 0 1 0 0 0 0 0 1 1 0 1 1 1 1 0 0 0 1 0 0 0 0 1 0 1 0 0 0 1 0 1 1 0 0 1 0 0
57 / 172
Different types of process
It again forms the dividing live between two other broad classes of
process:
I Cluster processes tend to have events occur in groupings.
What real-life spatial point processes exhibit clustering?
I Regular processes tend to have events that are well separated
in time. What real-life spatial point processes exhibit
regularity?
CSR Clustered Inhibited
58 / 172
Obvious
59 / 172
Not obvious
60 / 172
Simulating spatial Poisson processes
I Suppose we wish to simulate a homogeneous Poisson process
with intensity λ on some rectangular/square ROI
A = (a, b) × (c, d).
I How might we go about doing so?
I We know that the N(A), the number of events in A is
Poisson(λ|A|), so we first simulate a Poisson random variable
with expected value λ|A|. This will give us the total number
of events in our realization.
I Then we wish to distributed these events uniformly in the
region.
I You could write your own piece of code to do this, or you
could just use the function rpoisspp in spatstat.
I E.g.
N = rpoispp(10,win=c(0,10,0,10))
plot(N,type="p",pch=19,cex=0.3)
61 / 172
Second-order intensity and covariance intensity
62 / 172
Second-order intensity
E {N(ds)N(du)}
γ(s, u) = lim .
|ds||du|→0 |ds||du|
63 / 172
Covariance intensity
64 / 172
Covariance intensity for homogeneous Poisson
, and hence
E {N(ds)N(du)} E {N(ds)} E {N(du)}
c(s, u) = lim − lim lim
|ds||du|→0 |ds||du| |ds|→0 |ds| |du|→0 |du|
E {N(s)}E {N(u)} E {N(ds)} E {N(du)}
= lim − lim lim
|ds||du|→0 |ds||du| |ds|→0 |ds| |du|→0 |du|
= λ(s)λ(u) − λ(s)λ(u) = 0.
65 / 172
Covariance intensity for homogeneous Poisson
I This demonstrates that an homogeneous Poisson process has
a covariance intensity of zero between any two distinct points,
i.e. there is no covariance between N(s) (indicating whether
an event occurs at s) and N(u) (indicating whether an event
occurs at u).
66 / 172
Pair correlation function
cov(X , Y )
ρ= p .
var(X )var(Y )
67 / 172
Pair correlation function
Note that in the case of uncorrelated data (i.e. CSR), the pair
correlation function is 1 (not zero) for all s 6= u.
68 / 172
Stationarity and Isotropy
Two key properties of a point process are stationarity and isotropy.
Definition (Stationary)
A point process N is called stationary if λ(s) = λ for all s ∈ X and
γ(s, u) is a function only of s − u.
Definition (Isotropic)
A stationary point process N is called isotropic if γ(s, u) is a
function only of the radial distance r = ks − uk.
Recall back to module 2, where you were taught about the concept of
stationarity in time series. The definitions given here are in the same spirit.
I Stationarity tells us that no matter where we are in the X , the second
order structure of the process looks the same.
I Isotropy (not defined for time series) tells that it looks the same in all
directions.
69 / 172
Stationarity and Isotropy
This now means we can simplify the functions we’ve just presented
for the stationary setting.
I Second order intensity: γ(s, u) = γ(r ).
I Covariance intensity: c(s, u) = c(r ) = γ(r ) − λ2 .
I Pair correlation function: ρ(s, u) = ρ(r ) = γ(r )/λ2 .
70 / 172
1
71 / 172
Ripley’s K -function
72 / 172
Ripley’s K-function
In this section, we will give a detailed treatment of what is quite
possibly the most commonly used analysis tool for spatial point
patterns.
Definition
Ripley’s K-function Let N be a stationary isotropic process, and let
N0 (r ) represent the random number of events within a distance r
of an arbitrarily chosen event (not including that event). Ripley’s
K -function is defined as
Figure: Ripley’s
1
K -function
74 / 172
Ripley’s K -function for Poisson process
K (r ) = λ−1 λπr 2 = πr 2 .
75 / 172
Question
(a) 50π.
(a) 4π.
(c) 0.4π.
(d) 40π.
(e) π.
76 / 172
Assessing CSR
77 / 172
L(r ) − r
78 / 172
1
79 / 172
Theoretical consideration (tricky)
Let us consider the relationship between the K function and the
second-order intensity γ(r ) of a stationary, isotropic point process
N on R2 .
Let a(0, dh) be the annulus of width dh of a circle of radius h
centred at 0. Then
2π r
Z
λK (r ) = sγ(s)ds; r > 0.
λ 0
80 / 172
Estimating Ripley’s K -function
81 / 172
Estimating Ripley’s K -function
82 / 172
Edge Correction
83 / 172
1
Figure: Edge
1 correction
84 / 172
Edge correction
Therefore, an unbiased estimator for E (r ) is
n X
X
Ê (r ) = n−1 wij−1 I (dij ≤ r ).
i=1 j6=i
86 / 172
R implementation
87 / 172
Simple tests for complete spatial
randomness
88 / 172
Hypothesis tests and Monte Carlo
89 / 172
Hypothesis tests
90 / 172
Null and alternative hypothesis
I The null hypothesis H0 states that the sampled data comes
from a specified model. It is typically associated with a
contradiction to a theory one would like to prove.
I Examples:
I H0 : The Higgs Boson does not exist
vs
HA : The Higgs Boson does exist
91 / 172
Test statistic
I i.e. if, assuming the null hypothesis is true, this value of test
statistic would be very strange/extreme then I reject the null
hypothesis.
92 / 172
p-value and significance level
93 / 172
Example 1
I think a coin I have is unfair. That is to say, I don’t think the
probability it lands heads (H) and the probability it lands tails (T)
are both equal to 0.5. In fact, I think it favours heads.
95 / 172
Example 1
I now observe some data.
H H T H H T H T H H H H H T T H H H
0.16
0.12
0.1
0.08
0.06
0.04
0.02
0
0 2 4 6 8 10 12 14 16 18
k
For this test, the critical region is C = {13, 14, 15, 16, 17, 18}
97 / 172
Example 2
Consider a population with X ∼ N(µ, σ 2 ), with both µ and σ 2
unknown. I wish to test the null hypothesis
H0 : µ = 0
HA : µ 6= 0.
X̄
T = √
Ŝ/ n
99 / 172
Example 2
pdf for t
9
0.4
0.35
0.3
0.25
p T(t)
0.2
0.15
0.1
0.05
0
-6 -4 -2 0 2 4 6
t
101 / 172
Statements of inference
102 / 172
Type I and Type II errors
103 / 172
Type I and Type II errors
104 / 172
Question
105 / 172
Monte Carlo testing
106 / 172
Example
107 / 172
Example: Method
108 / 172
Example: Implementation
3 3 4 5 5 6 6 6 6
s = 99 6 6 6 6 6 6 7 7 7
7 7 7 7 7 8 8 8 8
S = rep(0,s) 8 8 8 8 8 8 8 8 8
8 8 8 9 9 9 9 9 9
for(ii in seq(1,s,1)) 9 9 9 9 9 9 9 9 9
{ 9 9 9 9 9 9 10 10 10 10
S[ii] = sum(rbinom(1,18,0.5)) 10 10 10 10 10 10 10 10 11 11
} 11 11 11 11 11 11 11 11 11 12
12 12 12 12 13 13 13 13 13 13
S = sort(S)
13 14 14 14 16
109 / 172
Example: Implementation
Histogram of S
s = 999
0.15
S = rep(0,s)
Density
0.10
for(ii in seq(1,s,1))
0.05
{
S[ii] = sum(rbinom(1,18,0.5))
0.00
0 5 10 15
} S
S = sort(S) S[950] = 12
110 / 172
Testing for complete spatial randomness
An immediate question a data analyst will ask when presented with
event data is:
Are these events completely spatially random? If not, do they
exhibit clustering or regularity?
1
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
111 / 172
Testing for complete spatial randomness
or, equivalently
112 / 172
Sampling
X
I Typically, we will observe
the point pattern on a
A
limited region.
I When testing, we have to
take into account that the
point pattern continues
outside of the region.
113 / 172
Testing for complete spatial randomness
114 / 172
Nearest Neighbour Distances
I For n events in a ROI A, let di denote the distance from the
ith event to the nearest other event in A.
I The set {d1 , d2 , ..., dn } are called the nearest neighbour
distances.
June 28, 2019
I Typically, the n nearest neighbour distances will contain
Abstract
116 / 172
Computing G (t) in R
% estimate G(d)
G = Gest(N)
% plot G(d)
plot(G)
117 / 172
Testing
118 / 172
Large n approximation‘
I If we, for the moment, ignore edge effects, then by noting |A|
denotes the area of A, then πd 2 |A|−1 is the probability under
CSR that an arbitrary event is within distance d of a specified
event. Since the events are located independently, the
distribution of D can be approximated as
G (d) = 1 − exp(−λπd 2 ) : d ≥ 0.
119 / 172
Testing G(r)
120 / 172
Simulation envelopes
121 / 172
Formation of 1envelope plots
122 / 172
Producing envelope plots in R
^
G ob s (r )
G t h eo (r )
0.8
^
G h i (r )
^
G l o (r )
0.6
G (r )
0.4
Genv = envelope(N, fun = Gest)
0.2
plot(Genv)
0.0
0.00 0.01 0.02 0.03 0.04
123 / 172
Question
statement of inference?
^
G ob s (r )
0.8
^
G h i (r )
0.6
(b) The process is not completely
G (r )
spatially random.
0.4
(c) The data is not consistent with
0.2
complete spatial randomness.
0.0
(d) The process is clustered. 0.00 0.01 0.02 0.03 0.04
124 / 172
I Simulation envelopes are not a rigorous test, but instead
intended to be a visual aid to assess how well the the data
matches the hypothesis of CSR.
125 / 172
Monte Carlo test 1
I For the observed point pattern compute the sample mean of
the n nearest neighbour distances {d1 , ..., dn }
n
X
d¯0 = di .
i=1
I Sort them and relabel such that d¯(1) < d¯(2) < ... < d¯(s) .
I To obtain the critical region for an α level test, take the αs/2
and (1 − α)s/2 elements of this list.
126 / 172
Monte Carlo test 2
127 / 172
Point to nearest event distances
I The EDF
F̂ (x) = m−1 #(xi ≤ x)
measures the empty spaces in A.
128 / 172
1
129 / 172
Point to nearest event distances
F (x) = 1 − exp(−πλx 2 ) x ≥ 0,
130 / 172
Producing envelope plots in R
1.0
The following code will produce
0.8
envelope plots for F̂ (r ) in R
0.6
F (r )
0.4
Fenv = envelope(N, fun = Fest) ^
F ob s (r )
0.2
F t h eo (r )
plot(Genv) ^
F h i (r )
^
F l o (r )
0.0
0.00 0.01 0.02 0.03 0.04
131 / 172
Quadrat counts
I The methods discussed thus far are what we call distance
based approaches (as they analyse the distances to or between
events).
I An alternative to a distance-based approach is to partition A
into m sub-regions, or quadrats, or equal area and use the
event counts in each of the m quadrats to test for CSR.
I How we go about choosing the m quadrats is completely
arbitrary, but if we have aJunesquare
28, 2019
ROI, it makes sense to chop
this up into a k × k grid of square sub-regions, so that
Abstract
m = k 2. 1
132 / 172
Quadrat counts
I Denote n1 , n2 , ..., nm to be the event counts in each quadrant.
Let n̄ = n/m, the sample mean of ni . A sensible statistic with
which to test for departures from the uniform distribution,
implied by CSR, is
m
X
2
X = (ni − n̄)2 /n̄.
i=1
133 / 172
I However, if we also note that this is m − 1 times the ratio of
the sample variance to the sample mean, we can obtain more
insight.
134 / 172
1
135 / 172
Example
136 / 172
Ripley’s K -function
137 / 172
Simulation envelopes
The first exploratory data technique is to consider simulation
envelopes. The procedure is as follows:
I Compute K̂0 (r ), the estimate of Ripley’s K -function for the
point pattern under analysis.
I Estimate the intensity of the point process as λ̂ = |A|/n.
I Simulate s (s typically 99) Poisson processes with intensity
λ = λ̂.
I For each one, compute K̂i (r ), i = 1, ..., s on a vector of values
for r .
I Compute the upper and lower simulation envelopes
Kenv = envelope(N,Kest)
plot(Kenv,sqrt(./pi)-r ∼ r)
Kenv
0.015
^
K ob s (r ) π − r
K t h eo (r ) π − r
^
K h i (r ) π − r
^
K l o (r ) π − r
0.010
K (r ) π − r
0.005
0.000
−0.005
r
139 / 172
Hypothesis test
TS = sup |L̂0 (r ) − r |
r
140 / 172
1
Figure: Test
1
statistics
141 / 172
Alternative models of spatial point
processes
142 / 172
Clustered processes
143 / 172
1
144 / 172
First and second order properties
Proposition
Let N be a Thomas process with parent intensity λp and offspring
rate ξ, then N is both stationary and isotropic.
145 / 172
First and second order properties
Proposition
Let N be a Thomas process with parent intensity λp and offspring
rate ξ, the second order intensity is given by
r
γ(r ) = λ2 + λp ξ 2 exp(−r 2 /4σ 2 ); r > 0,
2σ 2
and consequently, the K -function is given as
K (r ; σ 2 , λp ) = πr 2 + λ−1 2 2
p (1 − exp(−r /4σ )); r > 0.
146 / 172
Model fitting
147 / 172
Model fitting
148 / 172
Inhibited processes
149 / 172
First order properties
Let us consider the first order properties of this process.
Proposition
Let NI be a Matérn I process generated from a Poisson process N0
with intensity ρ and hardcore distance δ. The intensity is given as
λ = ρ exp(−ρπδ 2 ).
Proof.
The probability that an arbitrary event in N0 is retained is the
same as the probability that an arbitrary event as no other events
within distance δ of it. This is equal to exp(−ρπr 2 ). Therefore,
150 / 172
Second-order properties
Proposition
Let NI be a Matérn I process generated from a Poisson process N0
with intensity ρ and hardcore distance δ. The second order
intensity is given as
2
ρ exp{−ρUδ (r )} r ≥ δ
γ(r ) =
0 r <δ
151 / 172
Second-order properties
Proof.
Let us consider three cases for assessing P(NI (ds) = 1, NI (ds) = 1|N0 (ds) = 1, N0 (ds) = 1):
1. If r = ks − uk < δ then they will definitely both be deleted, therefore
2. If r = ks − uk > 2δ then we just need to know the probability there are no further events in either circle.
This is given as
2 2 2
exp(−ρπδ ) exp(−ρπδ ) = exp(−2ρπδ ).
3. if δ ≤ r = ks − uk < 2δ, then we need to know the probability that there are no further events in the
area Uδ (r ). This is given as exp(−ρUδ (r )).
152 / 172
Pair-correlation function and Ripley’s K -function for
Matern I
Following from this result we have the following identity for the
pair correlation function takes the form
153 / 172
Matérn II
154 / 172
First order properties of Matern II
Proposition
Let NII be a Matérn II process generated from a Poisson process N0
with intensity ρ and hardcore distance δ. The intensity is given as
1 − exp(−ρπδ 2 )
λ= .
πr 2
155 / 172
Second-order properties of Matern II
Proposition
Let NII be a Matérn II process generated from a Poisson process
N0 with intensity ρ and hardcore distance δ. The second order
intensity is given as
2Uδ (r )(1−exp(−ρπδ 2 ))−2πδ 2 (1−exp(−ρUδ (r )))
(
γ(r ) = ρ2 πδ 2 Uδ (r )(Uδ (r )−πδ 2 )
r ≥δ
0 r <δ
156 / 172
Multivariate Point Processes and
Point Patterns
157 / 172
Multivariate Point Processes and Point Patterns
We now turn our attention to the case where we have two (or
more) spatial point processes.
Some examples of this include
I two different types of protein molecule in an image. One is
tagged with a green fluorophore and the other red.
I two different species of plant in a forest.
I the location of nuclear power plants and the location of
leukaemia sufferers.
159 / 172
Theoretical framework for bivariate point processes
160 / 172
Cross-intensity
Definition (Cross-intensity)
The cross intensity between N1 and N2 at points s and u is
defined as
E {N1 (ds)N2 (du)}
γ12 (s, u) = lim .
|ds||du|→0 |ds||du|
161 / 172
Cross-covariance intensity
162 / 172
I This function provides a measure of dependency between the
two point processes.
I Let us consider the case where the two processes are
independent. Recall, that for two independent random
variables X and Y we have E {XY } = E {X }E {Y }.
I With this in mind, we have
E {N1 (ds)N2 (du)}
γ12 (s, u) = lim
|ds||du|→0 |ds||du|
E {N1 (ds)}E {N2 (du)}
= lim
|ds||du|→0 |ds||du|
E {N1 (ds)} {N2 (du)}
= lim lim
|ds|→0 |ds| |du|→0 |du|
= λ1 (s)λ2 (u)
c12 (s, u) = 0
163 / 172
Joint stationarity and isotropy
164 / 172
Cross-K -function
The cross-K -function provides a natural extension to Ripley’s
K -function.
Definition (cross-K-function)
Let N1 and N2 be a pair of jointly stationary and isotropic
processes, and let Nij (r ) represent the random number of type j
events within a distance r of an arbitrarily chosen type i event
(i, j = 1, 2, not including that event). The cross-K -function is
defined as
Kij (r ) = λ−1
j E {number of type j events
within a distance r of an arbitrary type i event}
= λ−1
j E {Nij (r )}.
165 / 172
Cross-K -function for independence
and therefore
K12 (r ) = πr 2 .
I Therefore, irrespective of the type of process N1 and N2 are, if
they are independent then K12 (r ) = πr 2 . This therefore
means that we can use K12 (r ) to test for independence.
166 / 172
Question
(a) 18π.
(b) 45π.
(c) 9π.
(d) π.
(e) 4.5π
167 / 172
I Note also that analogously to the standard Ripley’s
K -function, we have the relationship
Z r
2π
K12 (r ) = r 0 γ12 (r 0 )dr 0 .
λ1 λ2 0
168 / 172
Estimating the cross-K-function
I Let uij be the distance between the ith event of type 1 and
jth event of type 2, wij are the weights as used before, and
the number of events of type 1 and type 2 are n1 and n2 ,
respectively.
169 / 172
We can construct an estimator of K12 (r ) as
n1 X
X n2
λ̂2 K̃12 (r ) = n1−1 wij I (uij ≤ r )
i=1 j=1
170 / 172
Question
171 / 172
Testing for independence
is somewhat troublesome.
I This is because the distribution of K̂12 (r ) is dependent on the
type of processes that are being tested. E.g. the distribution
of K̂12 (r ) when N1 and N2 are Poisson is different to when
they are Thomas.
I Monte Carlo methods exist.
172 / 172