Let $Y_i, \ i =1,2,\ldots n$ be a random sample from the probability function $$f(y\mid p) = \frac{2y}{p^2}, \quad 0 < y \le p$$ where $p\sim Beta(2n+1, 1)$ is the prior,
find the posterior distribution of $p$.
find $E (p \mid y_1, \ldots, y_n)$, that is the Bayes estimator of $p$ using squared error loss function.
Here are my work on the question:
$$g(p) = \frac{\Gamma (2n + 2)}{\Gamma (2n +1) \Gamma(1)} p^{(2n + 1)-1} (1- p)^{1-1} \ \propto p^{2n}$$ and
$$f(y \mid p) = \prod_{i=1}^n \left[ \frac{y_i}{p^2} \cdot \textbf{I} (0 < y_i \le p) \right] = \left(\frac{2}{p^2} \right)^n \sum_{i=1}^n y_i \cdot \textbf{I} (y_{(1)} >0) \cdot \textbf{I} (y_{(n)} \le p) $$
For posterior distribution of $p$: $$f(p \mid y) = f(y\mid p) \cdot g (p) = \left(\frac{2}{p^2} \right)^n \sum_{i=1}^n y_i \cdot \textbf{I} (y_{(1)} >0) \cdot \textbf{I} (y_{(n)} \le p) \cdot p^{2n} $$ $$f(p \mid y) \propto \left(p^{-2n} \right) \cdot \textbf{I} (y_{(n)} \le p) \cdot p^{2n} = \textbf{I} (y_{(n)} \le p) $$
The Bayes estimator is the expectation of the posterior distribution, we have that $$E[\textbf{I}_E] = P ( Y_{(n)} \le p ), \quad \text{where } E \text{ is the event } {Y_{(n)} \le p}. $$
ANALYZE MY WORK. THIS IS A SELF STUDY PROBLEM.
The kernel of the posterior for $p$ is $$f(p \mid \boldsymbol y) \propto p^{-2n} p^{2n} \mathbb 1(0 < y_{(1)} \le y_{(n)} \le p < 1) = \mathbb 1(y_{(n)} \le p < 1).$$ That is to say, it is uniform on $(y_{(n)},1)$ with proper density $$f(p \mid \boldsymbol y) = \frac{1}{1 - y_{(n)}} \mathbb 1 (y_{(n)} \le p < 1).$$
Consequently, the posterior expectation of $p$ is simply $$\operatorname{E}[p \mid \boldsymbol y] = \frac{y_{(n)} + 1}{2},$$ which is the midpoint of the uniform density on $(y_{(n)}, 1)$.
Your expression $\Pr[Y_{(n)} \le p]$ is equal to $1$, because by construction, each $Y_i$ has support on the interval $0 < Y_i \le p$, so the maximum order statistic $Y_{(n)}$ has the same support.