Exact Confidence Interval for Poisson using Gamma-Poisson Relationship I'm reading Casella-Berger's Statistical Inference and trying to follow along in example 9.2.15, which constructs an exact confidence interval for a Poisson rate. In this example, the authors solve the sum
$$
\frac{\alpha}{2}=\sum_{k=0}^{y_0} \frac{e^{-n\lambda}(n\lambda)^k}{k!}
$$
by using a link between the gamma and Poisson distributions. Namely, they use the fact
$$
P(Y\geq \alpha)=P(X\leq x)
$$
for $Y\sim Poisson(\frac{x}{\beta})$ and $X\sim Gamma(\alpha, \beta)$. Additionally, it helps to note $Gamma(p/2,\beta=2)$ is a $\chi^2$ random variable with $p$ degrees of freedom.
They then conclude
$$
\sum_{k=0}^{y_0} \frac{e^{-n\lambda}(n\lambda)^k}{k!}=P(Y\leq y_0)=P(\chi^2_{2(y_0+1)}>2n\lambda).
$$
My question is why this is true. Using the link between the Poisson and Gamma mentioned above, I keep finding the degrees of freedom of the $\chi^2$ to be $2y_0$ and not $2(y_0+1)$. I feel like this might just be a simple calculation mistake, but I'm not seeing it.
 A: Given
\begin{equation}
 X \sim {{\chi}_{2n}}^2
\end{equation}
and
\begin{equation}
 Y \sim P(\lambda)
\end{equation}
Let's prove (the complement of your expression)
\begin{equation}
 P(X < 2\lambda) = P(Y \ge n)
\end{equation}
Notice that $X \sim \chi_{2n}^{2}=\Gamma(n,2)$. In addition, 
\begin{equation}
P(X<2\lambda)=\frac{1}{\Gamma(n)2^n} \displaystyle\int_{0}^{2\lambda}x^{n-1}e^{-\frac{x}{2}}dx
\end{equation}
and
\begin{equation}
P(Y\geq n)=1-P(Y \leq n-1)=1-\displaystyle\sum_{i=0}^{n-1}\frac{e^{-\lambda}\lambda^i}{i!}
\end{equation}
Do the derivative on both sides with respect to $\lambda$
\begin{equation}
 \frac{\partial}{\partial \lambda}P(X<2\lambda)
 =
 \displaystyle\frac{2}{\Gamma(n)2^n}(2\lambda)^{n-1}e^{-\lambda}=\frac{\lambda^{n-1}e^{-\lambda}}{(n-1)!}
\end{equation}
and
\begin{equation}
 \frac{\partial}{\partial \lambda} P(Y \ge n)
 =
 \displaystyle\sum_{i=0}^{n-1}\frac{e^{-\lambda}\lambda^i}{i!}-\displaystyle\sum_{i=1}^{n-1}\frac{e^{-\lambda}\lambda^{i-1}}{(i-1)!}=\frac{\lambda^{n-1}e^{-\lambda}}{(n-1)!}
\end{equation}
Notice that the derivatives are the same, hence
\begin{equation}
 P(X<2\lambda) = P(Y \ge n) + C
\end{equation}
where $C$ is a constant. Plug $\lambda = 0$, you'll get $C =0$. This means that ( by inverting both inequalities)
\begin{equation}
 P(X>2\lambda) = P(Y < n)
\end{equation} 
or
\begin{equation}
 P(X>2\lambda) = P(Y \leq n-1)
\end{equation}
You've got an $n \lambda$ instead of my $\lambda$ and a $y_0+1$ instead of my $n$
