I am given that $X_i \stackrel {iid}\sim N(\theta,\sigma^2)$ for $i=1,\cdots,n$, with known $\sigma$ and given $a$. Where $p=\mathbb P(X_1>a)$, I am asked to find the MLE of $p$.
So far, I have tried to put the joint likelihood of the $X_i$ in terms containing $p$. I have not succeeded in doing this. I know that $$L(\mathbf{\vec{X}})=(2\pi\sigma^2)^{-n/2}\exp\left\{-\frac1{2\sigma^2} \sum_{i=1}^n (X_i-\theta)^2\right\}$$ and that $p=1-\Phi(\frac{a-\theta}\sigma)$, with $\Phi$ the cdf of $N(0,1)$. But I can't find a way to put $p$ into the expression for $L(\mathbf{\vec{X}})$.
Edit: after reading this question on Cross Validated, I have a possible answer, which I will put below. Comments would be appreciated.
After reading this related question on Cross Validated, I used the following reasoning. (Any comments as to the validity of this reasoning would be appreciated.)
Recall that the MLE of $\theta$ is $\bar X$. Notice $p=\mathbb P(\frac {X-\theta}\sigma>\frac{a-\theta}\sigma)=1-\Phi(\frac{a-\theta}\sigma)$. Thus, by the invariance property of MLEs, where $\delta$ is the MLE of $p$ we have $$\delta=1-\Phi\left(\frac{a-\bar X}\sigma\right).$$