Calculating probability from closed form function? I am looking for an analytical way to calculate the probability as
$$P(\underline{y}\leq y =f(x) \leq \overline{y})$$
Where $x$ has a known probability distribution, $f(x)$ is integrable and differentiable over the domain of $x$. Also, $P(\underline{y}\leq y =f(x) \leq \overline{y})$ means Probability of being in a specific range with given $\underline{y}$ and $\overline{y}$.

*

*Can we calculate the probability of any general class of $f(x)$ say polynomial, the algebraic sum of square exponential terms, etc? Is there a way to construct the distribution of $y$ first by some method and then calculate probability?


*If not for general class then how should $f(x)$ look like to have any efficient analytical method to calculate probability.
PS: By analytical here I mean that a method without numerical simulation like Monte-carlo.
 A: Let $x$ have pdf $\rho_x(x)$. We want to find the pdf $\rho_y(y)$ of $y=f(x)$ for some given function $f$. In words: choose a $y$ value, the probability (density) associated with this value is the sum (integral) over all $x$ values such that $y=f(x)$. So we write the equation attached to these words
$$
\rho_y(y)=\int dx \ \rho_x(x) \delta(y-f(x))
$$
Where $\delta$ is Dirac's delta. Using the composition property of $\delta$ with a function $g(x)$
$$
\delta(g(x))=\sum_{\text{roots }x_0} \frac{\delta(x-x_0)}{|g'(x_0)|}
$$
In this case $g(x)=y-f(x)$, thus the roots $x_0$ of $g$ are given by $x_0=f^{-1}(y)$, and $g'(x)=-f'(x)$. The pdf for $y$ is then
$$
\rho_y(y)=\int\limits_{a}^{b} dx \sum_{\text{roots }x_0}  \ \rho_x(x) \frac{\delta(x-x_0)}{|f'(x_0)|} 
$$
The $\delta$s simply evaluates the integrand at $x=x_0$ for roots that lie within the domain of $x$. If the pdf of $x$ is supported on $a<x<b$, we have general result
$$
\rho_y(y)= \sum_{\text{roots }x_0 \\ a<x_0<b}  \  \frac{\rho_x(x_0)}{|f'(x_0)|} \qquad ; \qquad x_0=f^{-1}(y)
$$
For example, if $x$ is uniformly distributed on $-1<x<1$, $\rho_x(x)=1/2$ and we want to find the pdf of $y=x^2$. Then $f'(x)=2x$, and the roots to $y=f(x)$ are given by $x_0= \pm \sqrt{y}$. Thus
$$
\rho_y(y)=\frac{1/2}{|2 \sqrt{y}|}+\frac{1/2}{|-2\sqrt{y}|}=\frac{1}{2\sqrt{y}}
$$
You may have a look at eg ch. 5 of these notes and some examples.
