Suppose I have a function $f\colon [0,1] \to \mathbb{R}$ which is maybe continuous (it's at least in $L^1$).
I have a sample of $N$ points $\{x_i\}$ taken from the domain $[0,1]$ randomly from some distribution.
I want to be able to calculate $\int_0^1 f$ numerically, to a good degree of accuracy, using as few points as possible, i.e. I want $N$ to be as small as possible.
If I take the points $x_i$ from a random uniform distribution, I can calculate the integral as $$\int_0^1 f = \frac 1N \sum_{i=1}^N f(x_i)$$ (Monte Carlo), but I read online that I need something like $N=10^6$ for this to give an accurate answer.
Is there some other way to have a good result with $N=1000$?