Currently working on a project involving Monte Carlo integrals. I haven't had any prior studies of this method, so hence the following question.
Consider the following expectation:
$$E[f(X)]=\int_A f(x)g(x)dx.$$
Let $X$ be a random variable taking values in $A\subseteq\mathbb{R}^n$. Let $g:A\to\mathbb{R}_+$ be the probability density of $X$, and $f:A\to\mathbb{R}$ a function such that the expectation above is finite.
If $X_1,X_2,...X_N$ be independent random variables with probability density $g$, then by the law of large numbers,
$$\frac{1}{N} \sum_{i=1}^N f(X_i) \to E[f(X)] \quad \text{as N} \to \infty.$$
As far I understand, the sum above is a general Monte Carlo approximation of the integral.
Does the above approximation make any assumption on the pdf, i.e. uniformity and normalisation? If it is a general approximation, it should hold for any pdf, but I have seen different approximations such as $V\frac{1}{N}\sum_{i=1}^N f(X_i)$ and$\frac{1}{N}\sum_{i=1}^N \frac{f(X_i)}{g(X_i)}$, where in the former $V$ denotes the definite integral over the pdf. How are these related and derived?