Bivariate function that produces "ridge"-like surface

169 Views Asked by At

I'm trying to find the right vocabulary to describe a "ridge" like distribution that depends on two variables and how similar they are to each other. I'm imagining it looks something like the following. The utility of such a "ridge" like function is motivated by physical modeling. If $x$ is some expected distance and $y$ is the observed distance, then the probability $z$ surface should peak when $x - y = 0$ .

I admit this sounds really silly to ask, but I'm not finding relevant answers by searching for "ridge" functions. Would someone be able to point me in the right direction?

enter image description here

1

There are 1 best solutions below

1
On BEST ANSWER

Would a sufficiently rotated/scaled Two-dimensional Gaussian function work? Below, I've plotted $$f(x,y) = \exp\left(- \left(a(x - x_o)^2 + 2b(x-x_o)(y-y_o) + c(y-y_o)^2 \right)\right)$$ where

\begin{align} a & = \frac{\cos^2\theta}{2\sigma_X^2} + \frac{\sin^2\theta}{2\sigma_Y^2} \\[4pt] b & = -\frac{\sin2\theta}{4\sigma_X^2} + \frac{\sin2\theta}{4\sigma_Y^2} \\[4pt] c & = \frac{\sin^2\theta}{2\sigma_X^2} + \frac{\cos^2\theta}{2\sigma_Y^2}. \end{align} Here $\theta$ is the angle of clockwise rotation.

enter image description here See CalcPlot3D for the full example, here I've used the variables $a = \sigma_{x} = 2$ and $b = \sigma_{y} = 1$ centered at the origin and rotated an angle of $t = \theta = \frac{\pi}{4}$.