Finding a PDF from a function I have a function $y = f(x),\ x\in\mathbb{R}$ (assume $f(x)= \sin(x)/x$ if you need an example). How can I find the probability distribution function (PDF) of $y$, assuming $x\sim U(\mathbb{R})$ (uniformly distributed over the reals)? I'm a little rusty on whether the end points are problematic in defining it over the reals, so if that's an issue, let's make it simpler and say that $x\in\mathcal{D}\subset\mathbb{R}$ and $x\sim U(\mathcal{D})$ where $\mathcal{D}$ is an interval.
Do I explicitly need to know the inverse $x = f^{-1}(y)$ in order to be able to compute it?
 A: If $x$ is uniformly distributed over interval, its distribution can be written as $c\,|dx|$ where $c$ is  constant ($c=1/\ell$ where $\ell$ is the length of the interval). This suggests the  formula for distribution of $y$, namely $c\left|\frac{dx}{dy}\right|\,|dy|$. However, for  $\frac{dx}{dy}$ to make sense, we need the inverse function $x(y)$. If the given function $y(x)$ is not one-to-one, then its domain should be divided into subintervals on which it is one-to-one (that is, either increasing or decreasing). 
Example: $x$ is uniformly distributed over $[-\pi/2,\pi]$, $y=\sin x$. The density of $x$ is $c=1/(3\pi/2)=2/(3\pi)$. 


*

*On the interval  $[-\pi/2,\pi/2]$ the values of $y$ run from $-1$ to $1$. The inverse function is $\sin^{-1}y$, with derivative $1/\sqrt{1-y^2}$. Therefore, this interval contributes $c\,(1-y^2)^{-1/2}\chi_{[-1,1]}$ to the pdf of $y$. 

*On the interval  $[\pi/2,\pi ]$ the values of $y$ run from $ 1$ to $ 0$. The inverse function is $\pi-\sin^{-1}y$, with derivative $-1/\sqrt{1-y^2}$. Therefore, this interval contributes $c\,(1-y^2)^{-1/2}\chi_{[0,1]}$ to the pdf of $y$.  


Adding the above, we get the final answer: the pdf of $y$ is 
$$\begin{cases}
\frac{2}{3\pi} (1-y^2)^{-1/2} \quad & -1\le y\le 0 \\ \\
\frac{4}{3\pi} (1-y^2)^{-1/2} \quad & 0\le y\le 1 \\ \\
0 & \text{otherwise}
\end{cases}$$
The example $\dfrac{\sin x}{x}$ is much less tractable, because there's no nice formula for the inverse. 
