I am testing the hypothesis: $H_0: \mu \leq 1$ against $H_1: \mu>1$. I've found the UMP test, which rejects the null hypothesis based on $ \bar{x}$:
reject when $$\bar{x} \geq \left(\dfrac{1.65}{\sqrt{n}}\right)+1.$$
I'm at a loss to find rejection probability given true $\mu$. At first I thought that it would be based on the CDF of the normal distribution (denote $F_{\mu}$ as CDF associated with $\sim N(\mu,1)$:
$$R(\mu) = 1-F_{\mu}\left(\dfrac{1.65}{\sqrt{n}} + 1 \right).$$
However, this is clearly incorrect since it is based on the CDF of drawing only one observation (i.e., $n=1$).
How do I solve this? Maybe there is a CDF that takes $n$ into account in some way?
I assume that the level of the test is $\alpha = 0.05$, hence the critical value for a one-sided test is $$z_\alpha^* = \Phi^{-1}(0.95) \approx 1.64485.$$ Then the rejection region as stated is correct.
The probability of rejecting $H_0$ given $\mu$ is therefore $$\Pr\left[\bar x \ge \frac{z_\alpha^*}{\sqrt{n}} + 1 \,\Bigl| \,\mu\right],$$ and since $\bar x$ is now normally distributed with mean $\mu$ and variance $1/n$, we compute this probability with the usual standardization technique: $$\begin{align} \Pr\left[\bar x \ge \frac{z_\alpha^*}{\sqrt{n}} + 1 \,\Bigl| \,\mu\right] &= \Pr\left[\frac{\bar x - \mu}{\sqrt{1/n}} \ge \frac{1}{\sqrt{1/n}}\left( \frac{z_\alpha^*}{\sqrt{n}} + 1 - \mu \right) \, \Bigl| \, \mu \right] \\ &= \Pr\left[Z \ge z_\alpha^* + (1-\mu)\sqrt{n}\right] \\ &= \Phi\left((\mu-1)\sqrt{n} - z_{\alpha}^*\right), \end{align}$$ where $\Phi$ is the standard normal CDF. Notice how once we standardized and wrote $Z$, we can drop the conditional statement, since that step is valid precisely when the conditional assumption is true (i.e., $(\bar x - \mu)\sqrt{n}$ is standard normal, given that $\mu$ is the true mean).
So for instance, for a sample size of $n = 16$ and $\alpha = 0.05$, for a true mean of $\mu = 2$, the rejection probability will be approximately $$\Phi\left((2-1)\sqrt{16} - 1.64485\right) = \Phi(2.35515) \approx 0.990742.$$ Our formula makes intuitive sense: The larger $\mu$ is, the larger the quantity $(\mu - 1)\sqrt{n} - z_\alpha^*$ and thus the more likely we are to reject $H_0$; similarly, the larger the sample size, the more precision we have for the sample mean reflecting the true value $\mu$, so if $\mu < 1$, increasing $n$ makes the rejection probability smaller, and if $\mu > 1$, increasing $n$ makes the rejection probability larger. Finally $z_\alpha^*$, being fixed for a given level $\alpha$, is a constant chosen such that when $\mu = 1$, the rejection probability is equal to the Type I error.