Solution (source code)

= Solution

For fixed $\theta>0$, the <central limit theorem> gives
$$
\frac{\sqrt n(\overline X-\theta)}{\sqrt\theta}\ \xrightarrow{d}\ N(0,1).
$$
The <weak law of large numbers> gives $\overline X\to\theta$, so <Slutsky theorem> permits replacing $\theta$ in the standard error by $\overline X$. With $z=z_{0.025}\approx1.96$, an approximate 95% <confidence interval> is
$$
\boxed{\left[\overline X-z\sqrt{\frac{\overline X}{n}},\quad
\overline X+z\sqrt{\frac{\overline X}{n}}\right].}
$$
The lower endpoint may be truncated at zero because the parameter is nonnegative. This is a large-sample normal approximation for fixed positive $\theta$; an all-zero or very sparse sample does not justify the plug-in normal approximation. At the degenerate parameter value zero, every observation is zero almost surely.