# Book Suggestion for Approximating Integrals using Random Partitions

Suppose I want to approximate the integral $\int_0^1 x^2\,dx$ using Riemann Sums or Darboux sums over random partitions of the interval $[0,1]$, Like in the image below:

Here, A "random" partition of $[0,1]$ containing $16$ partition points,

$$P=\{0, 0.048499, 0.097571, 0.25324, 0.28515, 0.4087, 0.45946, 0.53824, 0.62423 0.67352, 0.72305, 0.84254, 0.85201, 0.87255, 0.91006, 1\}$$

was created randomly with corresponding lower Darboux sum (showed in red) = $0.292536$ and upper Darboux sum (showed in blue) = $0.377436$, And we've got an approximation of $\int_0^1 x^2\,dx = \frac{1}{3} = 0.333333\ldots$

Which Books or other resources do you suggest to read that treats rigourously problems like this, Both theoretical (Just the mathematical theory used to address such problems) and practical (Approximating integrals on a computer in such manner)?

Third, How can we answer questions such as, "What is the probability that the approximated value of the integral is within $0.5$ from the exact value of the integral?", i.e. How can we calculate probabilities like $$P\left\{\int_0^1 x^2 \,dx - 0.5 < \text{LOWER SUM}<\int_0^1 x^2\,dx < \text{UPPER SUM} < \int_0^1 x^2\,dx + 0.5\right\} \text{?}$$