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?

There is no conditional density, since with probability $1/n$, $Y_1 = z$. With probability $1-1/n$, $Y_1$ is uniform on $[0,z]$. So the conditional law is a mixture of an atom at $z$ and a continuous distribution supported uniformly on $[0,z]$.
