# Estimate an error using method similar to Stirling's approximation?

In the application of WLLN, which is the polynomial approximation. For any function $F\in C([0,1])$ can be approximated by a polynomail $G$ so as to make $||F-G||=\max_{0\le x \le 1}F(x)-G(x)$ as small as you like.

Take Bernoulli's trials with success probability $0<x<1$, introduce the polynomial $G(x)=\Bbb E[F(\frac{s_n}{n}]=\sum_{k=0}^{n}\frac{n!}{k!(n-k)!}x^k(1-x)^{n-k}F(\frac{k}{n})$. This can be proved using WLLN taking $n$ large enough $n$ that it is actually an approximation of $F$.

I am asked to verify the error for $F(x)=x$ when $x\le 1/2$ and $F(x)=1-x$ when $x>1/2$. The error of $F(1/2)-G(1/2)$ which has the form $$2\times\sum_{k<n/2}\frac{n!}{k!(n-k)!}2^{-n}(1/2-k/n)$$ is approximately $$\frac{2}{\sqrt{n}}\times \int_0^\infty \frac{e^{-x^2/2}}{\sqrt{2\pi}}xdx$$

and I notice $\int_0^\infty \frac{e^{-x^2/2}}{\sqrt{2\pi}}xdx=1$, then the error is $\frac{2}{\sqrt{n}}$.

I tried to change this sum into a Riemann sum, so I can write this as an integral. The hint says this is similar to the proof of finding the constant as $\sqrt{2\pi}$ in Stirling's approximation.

However, it is so complicated and I have no clue where to start. Could someone kindly provide some help? Thanks!

• One thing is clear, which is that this cannot be related to the weak law of large numbers. Since, on the other hand, the central limit theorem yields directly the result, what the question really asks is most unclear. – Did Sep 23 '15 at 8:05
• @Did Sorry for the inconvenience. This is related to WLLN, because the weierstrass's theorem can be proved by WLLN and this is to show for $F(x)$, the error of approximation using Bernoulli's trials(which is a polynomial) can be written as above. – Sherry Sep 23 '15 at 19:03
• No. The error in the WLLN is not dealt with by the WLLN. Let me suggest to review some statements of the WLLN and the CLT. – Did Sep 23 '15 at 19:07
• @Did It is related to WLLN, I am not saying it should be dealt with WLLN. It is an application of WLLN to prove polynomial approximation. And the question is to verify that the polynomial approximation derived by the WLLN is the one in the problem which is small. If you think this is not probability theory, I can change the tags. – Sherry Sep 23 '15 at 19:18
• Once again, WLLN alone will never quantify, I repeat, never quantify, the gaussian type error. – Did Sep 23 '15 at 19:18

I might be wrong but it looks like you want to approximate a continuous function by Bernstein polynomials. The theory for that is well developed so it could be helpful to check that literature. One reference I like is book by Stanislaw Lojasiewicz "An Introduction to the Theory of Real Functions". There he shows for instance that (my $G_n()$ is what you call $G$) $$\|G_n(x)-F(x)\|\leq \frac{3}{2}\omega\left(\frac{1}{\sqrt{n}}\right),$$ where $\omega(\cdot)$ is the modulus of continuity of $F$ on $[0,1]$. The techniques displayed in that book could be helpful.