Deterministic and stochastic error bounds in numerical analysis