Let \(f(x)\) be a continuous function defined for \(0 \leq x \leq 1\). Consider
the functions
$$
B_{n}(x)=\sum_{k=0}^{n} f\left(\frac{k}{n}\right)\left(\begin{array}{l}
n \\
k
\end{array}\right) x^{k}(1-x)^{n-k}
$$
(called Bernstein polynomials) and prove that
$$
\lim _{n \rightarrow \infty} B_{n}(x)=f(x)
$$
HINT: Let \(X_{1}, X_{2}, \ldots\) be independent Bernoulli random variables
with mean \(x\). Show and then use the fact (by making use of the result of
Theoretical Exercise 4 ) that
$$
B_{n}(x)=E\left[f\left(\frac{X_{1}+\cdots+X_{n}}{n}\right)\right]
$$
As it can be shown that the convergence of \(B_{n}(x)\) to \(f(x)\) is uniform in
\(x\), the above provides a probabilistic proof to the famous Weierstrass
theorem of analysis that states that any continuous function on a closed
interval can be approximated arbitrarily closely by a polynomial.