Question 1

The ants data consists of the total number of ants, the coordinates of each ant nest, the species each ant is, the boundary containing the ant nests, and the total area the polygonal boundary occupies. There are 97 ants

Question 2

The data is marked. Each point is marked by the species the ant is, and in this case it is either Cataglyphis or Messor.

Question 3

Based on the Chi-squared test, the null hypothesis would be accepted, as 0.5417 is greater than 0.05.

Question 4

mytest <- quadrat.test(ants)

Residuals <- residuals(mytest)
hist(Residuals)

Question 5

ant_species <- split(ants)
cataglyphis <- ant_species$Cataglyphis
messor <- ant_species$Messor
quadrat.test(cataglyphis)
quadrat.test(messor)

For Cataglyphis species, the p-value is 0.1575, meaning the data is random. The Messor species’ p-value is 0.22199, meaning the data is also random.

Question 6

G_env_ants <- envelope(ants, Gest, nsim = 95, alpha = 0.05)
plot(G_env_ants)

The ants are randomly dispersed because the G-function line falls within the confidence band.

Question 7

envelope(lansing, Gcross, nsim = 99, i = 'maple', j = 'hickory') |> plot()

envelope(lansing, Kcross, nsim = 99, i = 'maple', j = 'hickory') |> plot()

envelope(lansing, pcfcross, nsim = 99, i = 'maple', j = 'hickory') |> plot()

The Gcross observed curve was under the theoretical curve meaning maples have an aversion to hickory trees. The Kcross observed curve was under the theoretical curve meaning there is some spatial aversion and they are over dispersed. The pcfcross observed curve falls below 1, also indicating some spatial aversion. They all give the same message that maples and hickory trees repel each other.

Question 8

The Gcross observed line was within the theoretical curve meaning the species are spatially independent of each other. The Kcross curve is also within the theoretical curve indicating spatial independence. The pcfcross observed line is around 1 also indicating spatial independence. Each test gives the same message.

Question 9

Yes, there does appear to be a deviation from the null hypothesis, specifically at smaller distances. It becomes consistent at around 15 meters.

Question 10

The deviation suggests a negative association because is dips below the theoretical curve.

Question 11

This means when trees are very close together, they tend to be around trees that are a different size, but when they are around 15 meters or more apart, the size of the tree does not matter because it is random.

Question 12

At distances shorter than 10, the observed line falls below the theoretical line, meaning different size sea anemones tend to be closer together, and once it passes that 10 meter mark, there is no size to distance correlation because it falls within the theoretical line. Sea anemones can reproduce asexually, so this situation could be explained by one splitting and making clones, resulting in a small colony of differnt size sea anemones.