Nonlinear Regression and Valley Centroids on a Bifurcating Ridge

For a general bivariate continuous distribution, neither the direct regression function $\mathbb{E}(Y\mid X=x)$ nor the reverse regression function $\mathbb{E}(X\mid Y=y)$ needs to be linear, and a conditional expectation need not lie near a high-density ridge of the surface. Since $\mathbb{E}(Y\mid X=x)$ is the center of gravity of the renormalized conditional slice $f_{\sssig Y\mid X}(y\mid x)$, whenever a ridge splits into two symmetric branches, the conditional mean follows the low-density valley floor right between the two peaks.

Specifically, let $X\sim\mathcal{N}(0,\sigma_1^{2})$ and define a curved baseline $g(x)=a\sin(1.2x)+0.16(x^{2}-\sigma_1^{2})$ together with a smooth softplus half-separation $\delta(x)=b\ln\bigl(1+e^{1.8(x-0.15)}\bigr)$ ($b\geqslant 0$, $\tau>0$). Given $X=x$, let $Y$ follow the equal-weight two-branch normal mixture

\[\begin{gathered} f_{\sssig Y\mid X}(y\mid x)=\frac{1}{2}\phi\bigl(y;g(x)+\delta(x),\tau\bigr)+\frac{1}{2}\phi\bigl(y;g(x)-\delta(x),\tau\bigr)\\[0.32em] f_{\sssig XY}(x,y)=\phi(x;0,\sigma_1)\,f_{\sssig Y\mid X}(y\mid x) \end{gathered}\]

Since the two Gaussian branches at $g(x)\pm\delta(x)$ carry equal probability $1/2$ at every $x$, their midpoint is always $g(x)$, yielding closed-form conditional moments along every vertical slice:

\[\mathbb{E}(Y\mid X=x)=g(x),\qquad \mathrm{Var}(Y\mid X=x)=\tau^{2}+\delta(x)^{2}\]
\[\begin{gathered} \mathbb{E}(Y\mid X=x)=g(x)\\[0.28em] \mathrm{Var}(Y\mid X=x)=\tau^{2}+\delta(x)^{2} \end{gathered}\]

For $x<0$, $\delta(x)$ is small relative to $\tau$ and the surface forms a single curved ridge whose peak tracks $g(x)$. For $x>0$, $\delta(x)$ grows linearly and the ridge bifurcates into two distinct crests separated by a trough along $y=g(x)$. By the double expectation theorem, averaging the slice centroids with weights $f_{\sssig X}(x)$ gives $\mathbb{E}(Y)=\mathbb{E}[g(X)]=a\cdot 0+0.16(\sigma_1^{2}-\sigma_1^{2})=0$.

Parameters to explore below:

  • Slice position $x_0$: Toggle Single ridge (x₀ = −1.15) vs. Valley slice (x₀ = +1.45), or sweep $x_0$ across $0$, to watch the crimson conditional slice split into two peaks whereas its centroid dot stays centered in the trough.
  • Wave amplitude $a$ and fork half-gap $b$: Adjust $a$ to bend the baseline $g(x)$, or reduce $b$ toward $0$ to merge the two branches back into a single curved ridge.
Focus
Cut
3D

3D joint pdf, side-wall marginals, and slice

Drag or use arrow keys to rotate. Side walls display marginal pdfs; the base plane (z = 0) displays the regression curves.

az +36° · el 28°

Equal-density contours and regression

Click or drag on the plane to move the active slice. The filled dot marks the conditional mean on the slice.

Slice renormalization vs. marginal pdf

Raw slice fXY (ochre), normalized conditional pdf (crimson), and fixed marginal pdf (dashed violet) on a shared scale.

Raw slice fXY (area = marginal ordinate) Conditional pdf & Direct E(Y | X = x) Reverse E(X | Y = y) Marginal pdfs fX(x), fY(y) Slice centroid (conditional mean)
Slice area (marginal ordinate) –
Renormalization factor –
Conditional moments –
Model summary –