Let $\{y_1,\dots,y_n\}$ a random sample. Let
$f_n(\mu) = \frac{1}{n}\sum_{i=1}^n (y_i - \mu)^2, \quad f(\mu) = E[(y_i - \mu)^2].$
Let $\Theta \subset \mathbb{R}$ be a compact set. I want to show that
$\sup_{\mu \in \Theta} |f_n(\mu) - f(\mu)| \to^p 0$
I know that since $f$ and $f_n$ are continuous for all $n$ the $\sup$ exists and is attained in $\Theta$. But I am not sure how to proceed further and show convergence in probability for that object.
Since $f_n$ and $f$ have a particular expression, we can try to simplify $f_n(\mu)-f(\mu)$ as much as possible, that is, \begin{align} f_n(\mu)-f(\mu)&=\frac 1n\sum_{i=1}^n \left(\left(y_i-\mu\right)^2-\mathbb E\left[\left(y_i-\mu\right)^2\right]\right)\\ &=\frac 1n\sum_{i=1}^n \left(y_i^2-2\mu y_i+\mu^2-\mathbb E\left[ y_i^2 \right]+2\mu\mathbb E\left[y_i\right]-\mu^2\right)\\ &=\frac 1n\sum_{i=1}^n\left(y_i^2-\mathbb E\left[y_i^2\right]\right) -2\mu\frac 1n\sum_{i=1}^n\left(y_i -\mathbb E\left[y_i\right]\right) \end{align} hence $$ \sup_{\mu \in \Theta} |f_n(\mu) - f(\mu)|\leqslant \left\lvert \frac 1n\sum_{i=1}^n\left(y_i^2-\mathbb E\left[y_i^2\right]\right)\right\rvert+ 2\sup_{\mu\in\Theta}\lvert \mu\rvert\left\lvert \frac 1n\sum_{i=1}^n\left(y_i-\mathbb E\left[y_i\right]\right)\right\rvert . $$ Both terms converge in probability to zero by the weak law of large numbers.