Conditional expectation of $Y_1$ given that $\sup Y_i=z$, for $(Y_i)$ i.i.d. uniform on $[0,\theta]$ 
Suppose that $Y_1,\ldots,Y_n$ are random variables independently and identically distributed as uniform on $[0,\theta]$ for some $\theta>0$. How do I find the conditional density of $Y_1$ given that $\sup_{1\leq i\leq n}Y_i=z$ for some $z\in[0,\theta]$? Edit: I would like to know the density because I want to compute the conditional expectation of $Y_1$ given that $\sup_{1\leq i\leq n}Y_i=z$. As Yuval Filmus points out, the density doesn't exist but the perhaps the conditional expectation can still be computed.

With $\theta$ and $z\in[0,\theta]$ fixed, we can let $X=\sup_{1\leq i\leq n}Y_i$ and let $g$ denote the pdf of $X$. We have: 
$$
f\left(y_1\,\Bigg|\,\sup_{1\leq i\leq n}Y_i=z\right)=\frac{f(y_1)}{g(z)}=\frac{1/\theta}{g(z)}
$$
if $\sup\{y_1,Y_2,\ldots,Y_n\}=z$ and $0$ otherwise. Here we have:
$$
\Pr(X\leq z)=\Pr\left[\sup_{1\leq i\leq n}Y_i\leq z\right]=\prod_i\Pr[Y_i\leq z]=(z/\theta)^n\implies g(z)=\frac{nz^{n-1}}{\theta^n}\cdot
$$
How do I now proceed please?

Notemos que 
$$
\begin{aligned}
\mathbb{P}\left(Y_1<y\,\Bigg|\,\sup_{1\leq i\leq n}Y_i<z\right)&=\frac{\mathbb{P}\left(Y_1<y \sup\limits_{1\leq i\leq n}Y_i<z\right)}{\mathbb{P}\left(\sup\limits_{1\leq i\leq n}Y_i<z\right)}=\frac{\mathbb{P}\left(Y_1<y,Y_1<z,\cdots, Y_n<z\right)}{{\mathbb{P}\left(\sup\limits_{1\leq i\leq n}Y_i<z\right)}}\\
&=\frac{\mathbb{P}\left(Y_1<\min\{y,z\},Y_2,\cdots, Y_n<z\right)}{{\mathbb{P}\left(\sup\limits_{1\leq i\leq n}Y_i<z\right)}}\\
&=\frac{\mathbb{P}(Y_1<\min\{y,z\})\mathbb{P}(Y_2<z)\cdots \mathbb{P}(Y_n<z)}{\mathbb{P}(Y_1<z)\cdots \mathbb{P}(Y_n<z)}\\
&=\frac{\mathbb{P}(Y_1<\min\{y,z\})}{\mathbb{P}(Y_1<z)}\\
\end{aligned}
$$
Por lo tanto
$$
\mathbb{P}\left(Y_1<y\,\Bigg|\,\sup_{1\leq i\leq n}Y_i<z\right)=\left\{
\begin{aligned}
\frac{y}{z}&, \quad y<z\\
1&, \quad y\geq z
\end{aligned}\right.
$$
Así,
$$
F_{Y_1}\left(y\,\Bigg|\,\sup_{1\leq i\leq n}Y_i=z\right)=-\frac{\partial}{\partial  z}=\frac{y}{z^2}, \quad y<z.
$$ 
Finalmente, como $Y_1$ es una variable aleatoria no negativa tenemos que 
$$
\begin{aligned}
\mathbb{E}\left(Y_1\,\Bigg|\,\sup_{1\leq i\leq n}Y_i=z\right)&=\int_0^{\theta}\mathbb{P}\left(Y_1>y\,\Bigg|\,\sup_{1\leq i\leq n}Y_i=z\right)dy\\
&=\int_0^{\theta}\left(1-\frac{y}{z^2}\right)dy\\
&=\theta-\frac{\theta^2}{2z^2}
\end{aligned}
$$
siempre y cuando $y<z$.
