Sampling from a 2D to 1D distribution

195 Views Asked by At

I have one question/problem regarding sampling and I am not sure in which category this falls (it looks like bootstrapping)

Let's say that I have some real surface $z = f(x, y)$ on some bounded domain e.g. x is between $x_1$ and $x_2$ and y is between $y_1$ and $y_2$, all real numbers. The surface is fine, no singularities or other computational difficulties that might occur. Now when we get to numerics, this surface is discretized along the $N_x$ and $N_y$ points and the surface values are known. Now if I flatten the values of the surface (put all the values into 1D vector) and do the histogram count, I should get a frequency distribution let's say $h_s$. The question is the following:

If I chose a large number of random curves along the surface $(N_\mathrm{curves} >> 1)$ e.g. geodesic lines between any two randomly chosen points on the surface, pack the values of the surface along the lines in a large 1D vector and do the histogram count for this set of data to obtain a frequency distribution $h_l$. Could I expect to have similar distributions $h_s$ and $h_l$?

To have a better experience, the programmer's way to do is: a) collect the data from the 2D surface, flatten into a 1D array and do the histogram count. b) select N random pairs of starting and ending points, compute the values of the surface along the geodesic line between each pair and store the values into 1D array and finally do the histogram count for this 1D array. Could I expect that these two histograms share similar properties? If yes/no could you point me out to any theorem/proof why is it so?

Thank you for your help,

1

There are 1 best solutions below

0
On

(a)Your first case, scanning or selecting points on a regular grid and binning is the same in the limit as selecting random points on the grid and reading off the surface height, then binning this.

(b) If you select random pairs in the rectangle and the connect them with a straight line and sample along the line, you are preferring grid points that are on many lines, thus grid points that are near the sides of the rectangle will not get sampled as much. geodesic lines result in yet another weighting of grid compared to direct scanning.