Calculate $E[X]$ using polynomial approximation of CDF

446 Views Asked by At

I have a black box called $F(t)$ ($~$($P~(X\le t)~$, $X$ is random variable) with me where I don't have any information on the exact expression of $F(t)$. But if I supply a $t\ge 0$ I will get a value of $F(t)$ from the black box as output. I want to calculate $E[X]$. I want to fit $F(t)$ values against a polynomial of the form $\sum a_{i}t^{i}$ and then integrate over a suitable range to get the expectation. Is this a good approach to calculate $E[X]$? Also, how should I choose $t$ values. Suppose I want to choose hundred $t$ values. Should I choose them as equally-spaced.

1

There are 1 best solutions below

6
On

It seems to me that this is just a standard quadrature problem and there's no need to invoke any specific approximations. You have

$$\int_{-\infty}^\infty xp(x)\mathrm dx=\lim_{L\to\infty}\left(\left[xF(x)\right]_{-L}^L-\int_{-L}^L F(x)\mathrm dx\right)\;,$$

and you want to approximate that last integral, given the ability to sample values of $F$. You can apply any quadrature methods, e.g. Gaussian quadrature, that seem suitable for the problem; this will implicity approximate $F$ by polynomials, but in a particularly efficient way. You may be able to use any knowledge about the structure of $F$ that you have in choosing the quadrature method or perhaps transforming the integral before evaluating it.