Numerical estimation of simple integral

69 Views Asked by At

Considering the problem of numerical evaluation of the integral of a 'good' function $f(x)$ over a unit interval

$I = \int_0^1f(x)dx$

Why can we say $I = E[f(U)]$, where $U\sim Uniformly[0, 1]$?

2

There are 2 best solutions below

0
On BEST ANSWER

This is the law of the unconscious statistician stating that if $X$ is a random variable with density $g_X$, then $$ {\rm E}[f(X)]=\int_\mathbb{R} f(x)g_X(x)\,\mathrm dx $$ for any "nice" function $f$. Since $U\sim U(0,1)$ is a random variable with density $g_U=1_{(0,1)}$ it immediately follows that $$ {\rm E}[f(U)]=\int_0^1f(x)\,\mathrm dx $$ for any "nice" function $f$. Here "nice" is an assumption that ensures that the integrals are well-defined.

1
On

The expected value of a random variable $X$ with pdf $p(x)$ is defined as

$$\mathbb{E}[X] = \int_\mathbb{R} x p(x) dx$$

and more generally, if we want to have $Y=f(X)$ then

$$\mathbb{E}[Y] = \mathbb{E}[f(X)]= \int_\mathbb{R} f(x) p(x) dx,$$

now if $X \sim U(0,1)$ then $p(x) = 1$ for $0 < x < 1$ (and 0 otherwise) so the integral becomes

$$\mathbb{E}[f(U)]= \int_0^1 f(u) dx.$$