This is Casella and Berger statistical inference textbook Example 9.2.5.
As a more difficult example of a one-sided confidence interval, consider putting a $1-\alpha$ lower confidence bound on p, the success probability from a sequence of Bernoulli trials. That is, we observe $X_1,..., X_n$, where $X_i $ ~ Bernoulli(p), and we want the interval to be of the form $(L(x_1,...,x_n),1]$, where $P_p (p \in (L(x_1,...,x_n),1]) \geq 1-\alpha$.
I have two questions.
First, from our goal is to construct a one-sided lower confidence bound interval, how do we know we should specify $H_0, H_1$ in this way? (My understanding is $H_0$ doesn't matter, $H_1$ matters.) To be specific, how should I know $H_1$ is > rather than < ?
Second, why $k(p_0)$ is a nondecreasing function of $p_0$?

