Show that a collect of events forms a sigma-algebra.. Let $X$ and $Y$ be random variables defined on some probability space $(\Omega, \mathcal{F},\mathcal{P})$ and let $\mathcal{G}=\sigma (Y)$. 
How do I show the following statements?
i) The collection of events $\{ Y \in B\}$, where $B$ runs through the Borel sets $\mathcal{B}(\mathbb{R})$, forms a $\sigma$-algebra (say $\mathcal{H}$).
ii) $\mathcal{H} \subset \mathcal{G} $ and $\mathcal{G} \subset \mathcal{H} $ (for the latter you might want to use the "minimality property" of $\sigma (Y)$).
I'm totally stuck on this. I hope someone can help me out!
 A: Let's begin by noting that $\{Y \in B\} =: \{\omega \in \Omega \mid Y(\omega) \in B\} = Y^{-1}(B)$ for any Borel set $B$. 
The first part then essentially boils down to noticing that the action of taking preimages under $Y$. (i.e. applying $Y^{-1}$ to Borel sets) "plays nicely" with the relevant set theoretic operations. (taking complements and unions)
It's then immediate that $\emptyset \in \mathcal{H}$ since $\emptyset = Y^{-1}(\emptyset)$ and $\emptyset \in \mathcal{B}(\mathbb{R})$. Similarly if $A = Y^{-1}(B) \in \mathcal{H}$ then we have $\Omega \setminus A = \Omega \setminus Y^{-1}(B) = Y^{-1}(\mathbb{R} \setminus B) \in \mathcal{H}$ since if $B$ is a Borel set so is $\mathbb{R} \setminus B$. Hopefully from here you can do the remaining step for the first part which is to check $\mathcal{H}$ is closed under countable unions. 
For the second part note that $\mathcal{G}$ is the smallest $\sigma$-algebra such that $Y$ is $\mathcal{G}$-measurable. In particular, by definition of measurability, if $B$ is a Borel set then $Y^{-1}(B) \in \mathcal{G}$ so $\mathcal{H} \subset \mathcal{G}$. To see the other direction, check that $Y$ is $\mathcal{H}$-measurable. By minimality of $\mathcal{G}$ it immediately follows that $\mathcal{G} \subset \mathcal{H}$.
