Which is the correct solution to the hypothesis testing: $H_0 : \lambda =65, H_1 : \lambda >65$ , $X$ is a Poisson ($\lambda$) ,$\alpha=0.05$ Given the following hypothesis test:
$H_0 : \lambda =65, H_1 : \lambda >65$ ,  where $\lambda$ is the parameter of an $X$ distributed as a Poisson  $\alpha=0.05$ . We have n=10 samples. Using as statistics the mean $\bar X$ Find the  rejection region.
I did this:
Let $S = \bar Xn$ , $S $ is distributed as a $Poiss(n\lambda=650)$
Let the rejection region be $R= \{\underline X: T(\underline X)=\bar X \ge  c \}$
Since the test has level $\alpha$
$\mathbb{P}(  \bar X\ge \gamma|\lambda=65)\le \alpha$
$\mathbb{P}(S \ge n\gamma|\lambda=65)\le \alpha$
$\mathbb{P}(S \ge \gamma^*|\lambda=65)\le \alpha$
$nc=c^*=\min\{\gamma^* : \mathbb{P}(S \ge \gamma^*|\lambda=65)\le  \alpha  \}$
Can I claim $c$ is the quantile of level $1-\alpha=0.95$ ?
With R:
> qpois(0.95,650)
[1] 692
> 1-ppois(692,650)
[1] 0.0488844
> 1-ppois(691,650)
[1] 0.05290045

Since  1-ppois(692,650) is the probability from 692 onwards, not including 692. I claim $c^*=693 $ as oposed to the result of the qpois command qpois(0.95,650).
So the answer is $R= \{\underline X: T(\underline X)=\bar X \ge  69.3 \}$
My lecturer did this:
Let $S = \bar Xn$ , $S $ is distributed as a $Poiss(n\lambda=650)$
Let the rejection region be $R= \{\underline X: T(\underline X)=\bar X \ge  c \}$
Since the test has level $\alpha$
$\mathbb{P}(  \bar X\ge \gamma|\lambda=65)\le \alpha$
$\mathbb{P}(S \ge n\gamma|\lambda=65)\le \alpha$
$\mathbb{P}(S \ge \gamma^*|\lambda=65)\le \alpha$
$nc=c^*=\min\{\gamma^* : \mathbb{P}(S \ge \gamma^*|\lambda=65)\le  \alpha  \}$
$nc=c^*=\min\{\gamma^* : 1- \mathbb{P}(S \le \gamma^*|\lambda=65)\le  \alpha  \}$
$nc=c^*=\min\{\gamma^* : \mathbb{P}(S \le \gamma^*|\lambda=65)\ge  1-\alpha  \}$...(1)
And said that (1) was the definition of the $0.95$-quantile and that therefore $c^*$=qpois(0.95,650)$=692$ and therefore that the answer was
$R= \{\underline X: T(\underline X)=\bar X \ge  69.2 \}$?
But I disagree, I think (1) is wrong  and it should be
$nc=c^*=\min\{\gamma^* : \mathbb{P}(S \le \gamma^*-1 |\lambda=65)\ge  1-\alpha  \}$...(1')
in addition to my different answer
So I claim:
1 The R output proves (1) is not the definition of the 0.95-quantile? It's just somefing else, but I can't called it the 0.95-quantile, can I?. Of course in the continuous case it would certainly be definition of the 0.95-quantile
2  (1) is incorrect, it should be (1')
3  The answer to the problem  is $R= \{\underline X: T(\underline X)=\bar X \ge  69.3 \}$?
Are my claims correct? If not, why?
 A: Preliminary. For samples and discrete distributions, there are various definitions
of quantile. Here it seems useful to show the values returned by qpois, a Poisson quantile function. The 95th quantile of the random variable  $X\sim \mathsf{Pois}(\lambda=5)$ is $9$ because that is the smallest value $q$ such
that $P(X \le q) \ge 0.95.$ For a discrete distribution this is
intended to be the closest useful inverse of the CDF.
qpois(.95, 5)
[1] 9
ppois(9, 5)
[1] 0.9681719  # just above 0.95, but exact unavailable
ppois(8, 5)
[1] 0.9319064  # just below 0.95.

Let's look at the graph of the CDF of $\mathsf{Pois}(5).$ (Open circles show the exact values of the CDF at relevant integer values.
k = 0:15;  CDF = ppois(k, 5)
plot(k, CDF, type="s");  points(k, CDF)
 abline(h = .95, col="red")
  abline(v = 9, col="red")
 abline(h = 0, col="green2")
  abline(v = 0, col="green2")


A graph for $\lambda = 65$ would be similar, but harder to
read accurately.
For your question: You have the distributions of $S = \sum_{i=1}^{10} X_i \sim \mathsf{Pois}(65)$ and of the related discrete distribution $\bar X = S/n.$ You want to find $c$ such that the rejection
region for $H_0: \lambda = 65$ against $H_1: \lambda > 65$
has level $\alpha = 0.05 = 5\%$ without exceeding $5\%.$
You have proposed a solution different from the one given in class; in terms of your work, @whuber has given you a fine clue as to the
correct answer. Without going into details of your derivation,
I will show relevant simulations. Then I hope you can finish the
problem.
In the R code rej is a logical vector containing a million TRUEs and FALSEs, and mean(rej) gives the proportion of TRUEs, which
is an approximation to the rejection probability when $H_0$ is true (accurate to two or three places).
set.seed(2022)
rej = replicate(10^6, mean(rpois(10,65)) >= 69.1)
mean(rej)
[1] 0.056708   # 69.1 gives answer that's too large

rej = replicate(10^6, mean(rpois(10,65)) >= 69.2)
mean(rej)
[1] 0.052556  # 69.2: still too large

rej = replicate(10^6, mean(rpois(10,65)) >= 69.3)
mean(rej)
[1] 0.04865    # 69.3: largest value below 5%

rej = replicate(10^6, mean(rpois(10,65)) >= 69.4)
mean(rej)
[1] 0.045184   # below 5%, but too low

