*Solution. * *No*. The interarrival times between two blue points is given by the sum of *two* exponential random variables, and is no longer an exponential.

**Exercise 2 (Shop keeper) **Suppose we model the number of customers that arrive at a high street shop on at particular day by a Poisson process of intensity \(\lambda >0\), where \(\lambda\) is measured in customers per hour. We wish to estimate \(\lambda\). Suppose the shop is really high-end and on some days has no customers, on its \(6\) hours of operations. The shop keeper only keeps track of whether she had has any customers are not; that is, her records \(x = (x_1, \ldots, x_n)\) are a binary sequence. Find a consisent estimtor for \(\lambda\)

Since \(X_1\) and \(X_2\) are independent, we have \[\begin{eqnarray*} \mathbb{P}(X_1 < x, X_2+X_1 >1) &=& \int_0 ^x \lambda e^{- \lambda x_1} \Big( \int_{1-x_1} ^{\infty} \lambda e^{ -\lambda x_2} dx_2 \Big)dx_1 \\ &=&\int_0 ^x \lambda e^{-\lambda x_1} e^{-\lambda(1-x_1)}dx_1 \\ &=& x \lambda e^{-\lambda}. \end{eqnarray*}\] Hence, using this formula in the numerator, and also in the denominator with \(x=1\), we have \[\mathbb{P}(U \leq x | X_1 < 1, X_2+X_1 >1) = \frac{x \lambda e^{-\lambda}}{ \lambda e^{-\lambda}} =x\] as desired.

```
inter=rexp(10000, 2)
arr = cumsum(inter)
coin = rbinom(length(arr), 1, 0.5)
for (i in 1:length(arr)) if (coin[i]==0){arr[i]<- 0}
arr<-setdiff(arr, 0)
interthin = arr[1]
for (i in 1: length(arr)-1){interthin <- c(interthin, arr[i+1] - arr[i]) }
x = seq(0, max(interthin)+1, by=0.1)
hist(interthin, prob=T, x)
curve(dexp(x), add=T)
```

*Solution. * We simulate a single point on the disc, by simulating a uniform point on a square, and keep it if lands inside an inscribed disc, or repeat otherwise. Then we implent the characterization of Poisson point processes as a Poisson number of uniform points. Note a disc has area \(\pi r^2\).

```
point <- function(){
z=2
while(length(z)==1){
x = 2*runif(1) -1
y = 2*runif(1) -1
if (x^2 + y^2 <1) { z<-c(x,y)}
}
z
}
re=replicate(rpois(1,100*pi), point())
plot(re[1,], re[2,], xlim=c(-1.1,1.1), ylim=c(-1.1,1.1), asp=1)
```

- Version: 02 November 2020
- Rmd Source