The random variables $X_1,...X_n$ are independent draws from continuous unifirm distribution with support $[0,\theta]$. Derive a method of moments and maximum likelihood estimators of $\theta$. Your research assistant has constructed new random variables $Y_i$ such that:
$$Y_i = \begin{cases} 0, & \text{if} \, X_i \le k \\ 1, & \text{if} \, X_i \gt k\\ \end{cases}$$
where $k$ is a constant chosen by RA and known to you. What are the Maximum Likelihood and Method of Moments Estimators in this case? Assume $(k \lt \theta)$.
After trying, these are the answers which I am getting:
first part: By method of moments: $\hat{\theta} = 2\bar{X}$
By MLE: $\hat{\theta} = Max\{X_i\}$
Second Part: By Method of Moments: $\hat{\theta} = \frac{k}{1-\overline{Y}}$
By MLE: $\hat{\theta} =\frac{k}{1-\overline{Y}}$ (same as above)
Please tell me which answer is wrong so that I can redo that very part.
PS: This question was asked in an exam a couple of years back, so I dont know the correct answers.