```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

# Playing with renewal processes

In this exercise, we will demonstrate what happens when we look at a renewal process $N(t)$ for a large value of $t \approx 150$.  Consider the following simple *checks*:


Estimate by simulations the distribution of $D_1=N(1) - N(0)$,  $D_2=N(151) - N(150)$, and $D_3=N(161)  - N(160)$.  If $N$ is stationary, then $D_1, D_2, D_3$ should all have the same distribution


**Exponential random variables**


  * Run this check on a Poisson process, generated by exponential inter-arrival times

**A simple case of Uniforms**

* Run this check on a the renewal process with inter-arrival times where $X_i = 1+ U_i$, where $U_i$ are uniformly distributed on $[0,1]$.  What do you notice?
  
* Consider
$$F^d(y):=\frac{1}{\mu} \int_0 ^y [1-F(x)]dx,$$
where $F$ is the cdf for $1+U_1$.  Let $Y$ have cdf $F$.  Now consider independent inter-arrival times, $Y, X_2, X_3, \ldots$.  Check,   $D_1=N(1) = N(0)$ and $D_2' =N(2)- N(1)$; what do you observe?







#  Endnotes

* Version: `r format(Sys.time(), '%d %B %Y')`
* [Rmd Source](https://tsoo-math.github.io/ucl5/week13-2024-inclass.Rmd)
<br>
<br>
<br>