Discrete Case: Assume I have $N$ data points $y_i$, all finite. I can select the interval $[\min_i(y_i), \max_i(y_i)]$, and split it into $M$ equi-distant bins. count the total number of points in each bin and divide by $N$. I can call the resulting bin values $p_i$. As far as I am aware, $p_i$ form a discrete probability distribution, since they are finite, non-negative and sum to 1.
Continuous Case: Now I have a curve $y(x)$, where $x\in[0,1]$. It may be assumed that $y$ is finite, continuous and differentiable within this interval.
Question: Does there exist a probability density $\rho(y)$ which would be the extension of the discrete probability distribution (defined above) for infinite number of points, computable for the curve $y(x)$. If yes, please tell me how it is called and how to construct it. In particular, I am interested in an extension that does not require specification of the number of bins $M$, assuming that $M\rightarrow \infty$.
Edit: Following some feedback, I have realised that the function I seek could be constructed using the following algorithm.
- Subdivide the curve into monotonic segments $y_i(x)$
- Invert each segment to get $x_i(y)$
- Add the segments together
- Normalize
The question still remains if this is indeed how this problem is addressed in practice, and if not, what is the state of the art to address this problem. Methods approximating this function are thus welcome, as long as it is clear that they are more practical than the exact solution.