I am interested in computing an upper confidence bound for the rate parameter, $\lambda$, in a Poisson process. Specifically, I have a set of observations $$ X_\text{obs} = \{(n_1,t_1), \ldots, (n_N,t_N)\} $$ where $n_k$ is the number of successes in the $k$'th trial which ran for a duration of length $t_k$.
For a given a confidence level $1 - \alpha$, I assume that what I want to do is solve for $$ \lambda_{\text{upper}} = \max \{ \lambda : P(X_\text{obs} ; \lambda) \ge \alpha \}. $$ However, this doc http://faculty.washington.edu/fscholz/Reports/poissonconfbd6.pdf suggests that I want to find something like $$ \lambda_{\text{upper}} = \max \{ \lambda : P(x \le X_\text{obs} ; \lambda) \ge \alpha \} $$ for all datasets "$x$" whose sufficient statistic is less than or equal to the sufficient statistic of the observed data.
Specifically, equation (1) in the doc sums over possible outcomes, $i = 0 \ldots k$, less than or equal to the observed number of successes, $k$. And it doesn't just compute the largest $\lambda$ for which the likelihood of the observed data is at least $\alpha$.
What is the correct way to define the upper confidence bound so that I can solve for it (either in closed form, or by numerical methods)?
Btw, I am aware that $\lambda$ is the mean number of counts per period, and so one could use deviation bounds based on the CLT to derive a UCB. However, I will be dealing with sparse counts (including zeros), so I am not sure that using deviation bounds will give me good performance. And regardless, I would like to see how to derive the UCB using the definition and/or first principles.