3. [Marks: 3+3]. Let X be homogenous spatial Poisson point processes in R2 with intensity / (a) Write a function in R to do the following (submit the code only – no outputs) (i) to generate N realisations of X in the window (0, 2] x [0, 2], where N & dare arguments to the function. (ii) For each realisation, * count the number of random points that fall in the square [0, 1] x [0, 1]. * calculate the value of Fbord(0.01), ”border corrected” estimate of F function for the data at p = 0.01(hint: get help ?Fest and ?as.function). * store these count and Fbord(0.01) in vectors (iii) find the average of the counts and Fbord(0.01) (iv) print averages. (v) plot a histogram of the counts (b) Run the function in (a) for N = 100 and 1 = 2. Report the outputs of (a)[(iv)] and [(v)] and comment (what do you expect as the results, why; are the results consistent with what you expect, why/why not) on these outputs.