Binomial analogue of Riemann sum for definite integral

Solution 1:

For a continuous function $f:[0,1]\to\mathbb{R}$, it is well-known that $f$ can be uniformly approximated by a linear combination of Bernstein polynomials, i.e., the function

$$ F_n(x) = \sum_{k=0}^{n} \binom{n}{k}x^k(1-x)^{n-k}f\left(\frac{k}{n}\right) $$

converges uniformly to $f$ on $[0, 1]$ as $n\to\infty$. Your result is a special case with $x = \frac{1}{2}$. The proof can be found in many analysis book, such as Marsden's Elementary Classical Analysis as well as in the wiki article linked above.

For each fixed $x \in [0, 1]$, this can also be understood as an application of the strong law of large numbers, i.e., if $(X_i)_{i\geq 1}$ is a sequence of i.i.d. $\operatorname{Bernoulli}(x)$ RVs, then

$$ F_n(x) = \mathbb{E}\left[f\left(\frac{X_1+\cdots+X_n}{n}\right)\right] \xrightarrow[n\to\infty]{} f(\mathbb{E}[X_1]) = f(x). $$