maximum likelihood estimate and the UMVUE I have been working on this question and I am little confused about how to solve it. 
To evaluate the prevalence of periodontal diseases in a population, suppose that $x_i$, $i=1,\ldots,n$ are the outcomes of $n$ iid observations of $X$ regarding the status of participants recruited in a clinical trial. $X_i= 0$ (if the patient does not have the periodontal disease) or $1$ (if the patient has the disease) in the population with the unkown survival rate $p= P(X=0).$
a) If it is known that $0.3\leq P \leq 0.8,$ find the MLE  of $P$
b) if $ 0<p<1 $ and $n \geq 4$, derive the UMVUE of $g(p)= p^4 +3p^2-p^3 + 0.7$
With question a, I do not understand how the range of $p$ would affect the MLE. Since the MLE depends on our X values. My initial approach was to find the MLE of bernoulli (p ) which is the mean but I do not know how the range of $P$ as given affect my answer.
For question b, I was thinking of using the rao blackwell theorem but I sincerely do not know how to set it up.  
I have an exams in a few days and an understanding of this is very important.Looking forward to a response soon.  
Thank you 
 A: I'm going to guess that where you wrote "If it is known that $0.3\leq P \leq 0.8,$ find the MLE  of $P$", what you meant was "If it is known that $0.3\leq p \leq 0.8,$ find the MLE  of $p$". Be careful about this sort of thing.
Normally your calculus course would have included something about maximizing or minimizing on a closed interval and finding maxima or minima that are at endpoints. That is what is asked for here.
Let $t=x_1+\cdots+x_n.$
The likelihood function is
$$
L(p) = p^t (1-p)^{n-t} \text{ for } 0.3\le p \le 0.8.
$$
Then we have
$$
\ell(p) = \log L(p) = t\log p + (n-t)\log(1-p)
$$
and thus
\begin{align}
\ell\,'(p) = \frac t p - \frac{n-t}{1-p} = \frac{t - np}{p(1-p)} \quad\begin{cases} >0 & \text{if } 0 \le p < t/n, \\[5pt] = 0 & \text{if } p = t/n, \\[5pt] < 0 & \text{if } t/n<p\le 1. \end{cases}
\end{align}
Therefore
\begin{align}
& L \text{ increases on } [0,\, t/n], \\
& L \text{ decreases on } [t/n,\, 1].
\end{align}
So:
\begin{align}
& \text{If } t/n \le 0.3 \text{ then } L \text{ decreases on } [0.3,\,0.8] \\
& \qquad \text{so the MLE is } 0.3. \\[10pt]
& \text{If } t/n \ge 0.8 \text{ then } L \text{ increases on } [0.3,\,0.8] \\
& \qquad \text{so the MLE is } 0.8. \\[10pt]
& \text{If } 0.3 < t/n < 0.8 \text{ then } L \text{ increases on } [0.3,\,t/n] \\
& \qquad \text{and decreases on } [t/n,\,0.8], \text{ so the MLE is } t/n.
\end{align}
To find the UMVUE, note that you need to include a proof that it exists, since in some cases it doesn't. Note also that $X_1X_2X_3X_4$ is an unbiased estimator of $p^4,$ which you can condition on a complete sufficient statistic.
