Two Bernoulli distributions with additional information This question is from Introduction to Mathematical statistics written by Hogg.

*

*Consider two Bernoulli distributions with unknown parameters $ p_1 $ and $ p_2$. If $ Y $ and $ Z $ equal the numbers of successes in two independent random samples, each of size $ n $, from the respective distributions, determine the mles of $ p_1 $ and $ p_2 $ if we know that $ 0\le p_1 \le p_2 \le 1 $.

Let me write two samples as $ X_1 = (x_{11}, x_{12}) $ $X_2 = (x_{21}, x_{22}) $ , $x_{11}$ and $ x_{12} $ mean the numbers of successes from the respective distributions and so does $ X_2 $ .
So I concluded that $ \hat{p_1} = \frac{x_{11} + x_{21}}{2n} $ and $  \hat{p_2} = \frac{x_{12} + x_{22}}{2n} $
But As you can see, There is a additional infromation about relation between $ p_1 $ and $ p_2 $
So is there a change in my answer? Do I have to give a correction on that?
Thanks for your help.
 A: You have misinterpreted the language of the question.  There are not two samples corresponding to each of $Y$ and $Z$; instead, there is one sample $(Y_1, Y_2, \ldots, Y_n)$ where $Y_i \sim \operatorname{Bernoulli}(p_1)$, and one sample $(Z_1, Z_2, \ldots, Z_n)$ where $Z_i \sim \operatorname{Bernoulli}(p_2)$, and each of these samples are independent within and across both distributions.  Consequently, $$Y \sim \operatorname{Binomial}(n, p_1), \\ Z \sim \operatorname{Binomial}(n, p_2),$$ with the added condition $0 \le p_1 \le p_2 \le 1$.  Then the joint PMF is $$\Pr[(Y,Z) = (y,z)] = \binom{n}{y} p_1^y (1-p_1)^{n-y} \binom{n}{z} p_2^z (1-p_2)^{n-z} \mathbb 1 (0 \le p_1 \le p_2 \le 1) \mathbb 1 ((y,z) \in \{0, \ldots , n\}^2).$$  So the joint likelihood function is proportional to $$\mathcal L(p_1, p_2 \mid y,z) \propto p_1^y p_2^z (1-p_1)^{n-y} (1-p_2)^{n-z} \mathbb 1(0 \le p_1 \le p_2 \le 1).$$  We remind ourselves that here, $y, z$ are fixed and for the purposes of finding the MLE, we want to maximize $\mathcal L$ with respect to the joint parameters $p_1, p_2$.  Normally, the unrestricted likelihood is easily maximized since without the restriction $0 \le p_1 \le p_2 \le 1$, the likelihood is separable, with the maximum occurring at $\hat p_1 = y/n$ and $\hat p_2 = z/n$.  If $y \le z$, then this choice falls within the restriction and there is no issue.  However, if $y > z$, then this choice is impermissible.
In this case, we note that if $p_2$ were fixed, then $$\hat p_1 \mid p_2 = \begin{cases} y/n, & y/n \le p_2 \\ p_2, & y/n > p_2 \end{cases} = \max(y/n, p_2).$$  This is because the partial likelihood $\mathcal L(p_1 \mid p_2, y, z)$ is restricted on $0 \le p_1 \le p_2$, so if the unique critical point $y/n$ does not lie in this interval, the global maximum is attained at an endpoint--and it is obviously not at $0$.  Consequently, when $y > z$, the joint restricted MLE is always attained when $\hat p_1 = \hat p_2$, which allows us to maximize $$\mathcal L(p_2, p_2 \mid y,z) = p_2^{y+z} (1-p_2)^{2n-y-z},$$ giving $$\hat p_1 = \hat p_2 = \frac{y+z}{2n}.$$  Thus the restricted MLE is $$(\hat p_1, \hat p_2) = \begin{cases} \left(\frac{y}{n}, \frac{z}{n}\right), & y \le z \\ \left(\frac{y+z}{2n}, \frac{y+z}{2n}\right), & y > z. \end{cases}$$
