I'm a master's degree student and after a lot of research and some days trying I still can't get the answer for a question proposed by my statistics professor. Consider a sample of coin tosses:
$$X_1, X_2, ..., X_n | P=p \sim \text{IID Bern}(p),$$
where the coin tosses are conditionally independent Bernoulli random variables with probability given by $P$ (a head on the coin is a one and a tail is a zero). Denote the sample mean of the coin tosses as:
$$S_n = \frac{1}{n} \sum_{i=1}^n X_i.$$
My professor claims that $\mathbb{E}(S_n) = \mathbb{E}(X_1) = \mathbb{E}(P)$, and says that it is possible to use conditional expectation to prove this. He also asks me to prove that $S_n$ converges to $P$ in quadratic mean (not just to its expected value). How can I prove this?