Session Ready
Exercise

Quadrat count test for uniformity

Humans tend to see patterns in random arrangements, so we need statistical tests. The quadrat count test was one of the earliest developed spatial statistics methods. It can be used to check if points are completely spatially random; that is, they are uniformly random throughout the area of interest. By running a quadrat count test on the points generated in the previous exercise, you can confirm they were generated uniformly on the circle.

Quadrat count tests are implemented using quadrat.test(), which takes a planar point pattern, ppp() object. "Planar point pattern" is jargon for a set of points in a region of a 2D plane.

Instructions
100 XP

The variables x, y, and radius are set for you.

  • Create a new spatstat planar point-pattern object
    • Pass the pre-defined x and y values.
    • Use a disc() of the right radius as the window.
  • Run the quadrat count test.
  • Plot and print the results. In the plot you'll see the observed and expected number of points in each quadrat as well as a measure of how far above or below the expected number is.
    • Does the p-value let you reject the null hypothesis?