2. Consider $Y_1,...,Y_n \sim Bern(\theta), 0 \le \theta \le 1$. That is each $Y_i$ is a Bernoulli
random variable
$$Y_i = \begin{cases}
1, & \text{with probability } \theta, \\
0, & \text{with probability } 1-\theta.
\end{cases}$$
for $i = 1....,n$.
Suppose one observed $Y_1 = y_1,...,Y_n = y_n$. Derive the posterior distribution
of $\theta|Y_1 = y_1,...,Y_N = y_n$ using a prior distribution $\theta \sim beta(a, b)$.