Sample Complexity versus Approximation Error