# Use the central limit theorem to give an approximate 95% confidence interval for $c.$

Assume that the traffic at a certain point at a certain road is a Poisson process with intensity $$c$$. After $$30$$ minutes, you have observed $$214$$ vehicles pass.

(a) Make a maximum likelihood estimate of the intensity $$c.$$

(b) Use the central limit theorem to give an approximate $$95$$% confidence interval for $$c.$$

(a) We have that $$X_k(t)$$ number of vehicles that pass upp to time $$t$$ minutes. Then $$X_k(t)\sim\text{Poi}(ct)$$. In our case $$t=30,$$ so

$$L(c)=\prod_{k=1}^1f_X{(X_k(30))}=f_X(X_1(30))=e^{-30c}\frac{(30c)^{X_1(30)}}{X_1(30)!}.$$

For ease of notation, let $$x=X_1(30).$$ We then have

$$L(c)=f_X(x)=e^{-30}\frac{(30c)^x}{x!}\Rightarrow l(c)=\ln(L(c))=-30c+x\ln{(30c)}-\ln{x!},$$

$$l'(c)=\frac{x}{c}-30=0 \Leftrightarrow\hat{c}=\frac{x}{30}=\frac{X_1(30)}{30}=\frac{214}{30}\approx 7.13.$$

(b) The CLT says that $$X(30)\sim\text{Poi}(30c)$$ has the approximate distribution of $$N(\lambda,\lambda),$$ where $$\lambda=30c.$$ This is because for the Possion distribution it follows that $$\mu=\sigma^2=\lambda.$$ Standardization gives that

$$\frac{X(30)-\lambda}{\sqrt{\lambda}},$$

is approximately standard normal. Here is where I get stuck. The book says that we can replace $$\lambda$$ in the denominator by $$\hat{\lambda}=30\hat{c}=219$$ This gives the $$95$$% confidence interval

$$30c=X(30)\pm1.96\sqrt{219}$$

i.e

$$c=\frac{X(30)}{30}\pm1.96\frac{\sqrt{219}}{30}=7.3\pm0.97.$$

Why replacing $$\lambda$$ only in the denominator? Can I choose to replace both or only the one in the numerator? I don't follow what's heppening after the standardization is done.

Good question. Here is my opinion. Generally when we use normal approximation for the estimator of mean value, we are saying $$\frac{\bar{X} - \mu}{\hat{\sigma}(\bar{X})}\approx N(0,1),$$ where $\bar{X} = \sum_{i=1}^n X_i$, and $\hat{\sigma}(\bar{X})$ is the estimated variance of $\bar{X}$. So in the left hand side, we use estimated version of $\mu$, which is $\bar{X}$, and the square root of the estimated version of the variance, $\hat{\sigma}(\bar{X})$, but use the true parameter $\mu$. Then the CI is given by $$q_{\alpha/2}\leq \frac{\bar{X} - \mu}{\hat{\sigma}(\bar{X})}\leq q_{1-\alpha/2} \Rightarrow \bar{X} -q_{1-\alpha/2}\hat{\sigma}(\bar{X})\leq \mu\leq \bar{X}-q_{\alpha/2}\hat{\sigma}(\bar{X}).$$ So as you can see, in this approximated CI, we need to estimate the true parameter and the variance of that estimator; or, the quantity on the denominator, the variance, should be the estimated version.
For this problem, $\lambda$ is the true parameter, $X(30)$ is the estimator and we need to estimate the variance, $\sqrt{\hat{\lambda}}$, of $X(30)$, to give the CI. So it is confused here we treat the $\lambda$ on the numerator and denominator differently just because of the property of Poisson distribution $\mu = \sigma^2 =\lambda$.
Actually the CLT applies here because $X(30) = X_1+\cdots+X_{30}$ where $X_i$ is the number between time interval $[i-1,i)$. Then $X_i$ are iid Poisson$(c)$ and the approximation is $$\frac{X(30)/30 - c}{\sqrt{\hat{c}/30}}\approx N(0,1).$$