Answer
$\color{blue}{\frac{b+a}{2}}$
Work Step by Step
$\begin{align*}
E(Y) &= \int_{\mathbb{R}} y\cdot f_Y(y)\ dy \qquad \text{[ Definition 3.5.1 ]}\\
&= \int_a^b y\cdot \frac{1}{b-a}\ dy \qquad [\ \text{since}\ f_Y(y) = \frac{1}{b-a},\ a\le y\le b]\ ] \\
&= \frac{1}{b-a} \left( \frac{y^2}{2}\ \right\vert_b^a \\
&= \frac{1}{b-a}\left( \frac{b^2-a^2}{2}\right) \\
&= \frac{1}{b-a}\left( \frac{(b-a)(b+a)}{2}\right) \\
\color{blue}{E(Y)}\ &\color{blue}{= \frac{b+a}{2}}
\end{align*}$
This can be deduced from the fact that the pdf of $Y$, $f_Y(y) = \dfrac{1}{b-a},\ a\le y\le b,$ a rectangular distribution, is symmetric about the vertical line $y = \dfrac{b+a}{2}$ (a vertical line passing through the midpoint of the closed interval $[a,b]$). This being so, we would expect that $E(Y)$, the average of the weighted $y$ values in $[a,b]$, to be the midpoint of $[a,b]$, which is $\dfrac{b+a}{2}$.
