  Bernstein polynomials provide a constructive proof for the Weierstrass
approximation theorem, which states that every continuous function on a closed
bounded interval can be uniformly approximated by polynomials with arbitrary
accuracy. Interestingly the proof of this result can be done using elementary
probability theory. This way one can even get error bounds for Lipschitz
functions. In this note, we present these techniques and show how the method
can be extended naturally to other interesting situations. As examples, we
obtain in an elementary way results for the Sz\'{a}sz-Mirakjan operator and the
Baskakov operator.
