Numerical Approach to Infinite Improper Integrals

323 Views Asked by At

So I am doing a numerical project, and I decided to make a program in Python that receives a probability density function $f_X(x)$, and then the program will tell you if $$f_X(x)\geq 0 \ \ \ \forall \ \ \ x \in S_X \\ \int_{S_X} f_X(x)\ dx = 1 $$

The problem is that in probability, it is very common to encounter infinite bounds in the integral..

I saw in class very simple methods, so I was doing some research and found the Montecarlo Method which basically consists in:

$$ \int_{-\infty}^{\infty} f(x) \ dx = \int_{-1}^{1} f \left( \frac{t}{1 - t^2} \right) \frac{1 + t^2}{(1- t^2)^2} \ dt$$

I wanted to ask if you think this method would be appropriate? Is it optimal?

I would appreciate feedback and any help/suggestion on the matter.

thanks in advance :)