Four interactive figures for the lectures. Move a slider, then predict what will change before you look. Every simulation uses a fixed seed, so everyone starts from the same picture.
Henry is reported eating at McDonald's about 16 times a term. Where should you wait to catch him? Treat each sighting as a point and model the sightings as an inhomogeneous Poisson process: the intensity λ(s), the expected number of sightings per km², falls with the distance d(s) to the nearest restaurant.
Lecture 4 · the four restaurants sit in an illustrative 8 × 8 km town; they are not real locations.
Pick a process, then check it two ways. The quadrat test counts points in a grid of squares and compares the counts with what complete spatial randomness (CSR) predicts. Ripley's K, shown here as L(r) − r, asks how many other points lie within distance r of a typical point. The grey band is the range of 39 CSR simulations with the same number of points.
Lecture 4 · unit square window, translation edge correction
Each square is an area with one value. Neighbours are defined by a weights matrix W: rook neighbours share an edge, queen neighbours share an edge or a corner. W is row-standardised, so the spatial lag Wz is the mean of a cell's neighbours. Moran's I is the slope of the line in the scatterplot of the lag against the value.
Lecture 2 · 12 × 12 grid, values simulated from a spatial autoregressive model y = ρWy + ε
A smooth surface is measured with noise at a few sites. Predict it everywhere else, then judge each method by leave-one-out cross-validation: drop one site, predict it from the rest, and repeat for every site. In real data you never see the truth, so cross-validation is the error you can actually compute.
Lecture 3 · click the prediction map to add a site