One-Way Linear Regression and Hyperbolic-Tangent S-Curves

Linearity of the direct regression function $\mathbb{E}(Y\mid X=x)$ does not imply linearity of the reverse regression function $\mathbb{E}(X\mid Y=y)$. When one variable follows a symmetric two-component mixture (bimodal when $\mu>s$) and the other is generated by adding homoscedastic normal noise around a linear trend, one conditional direction stays Gaussian and strictly linear whereas the opposite conditional direction shifts probability weight between the two mixture mounds according to Bayes’ theorem.

Specifically, in the Mixture on X configuration, let $X$ follow the symmetric two-component Gaussian mixture $f_{\sssig X}(x)=\frac{1}{2}\phi(x;-\mu,s)+\frac{1}{2}\phi(x;+\mu,s)$ ($\mu\geqslant 0$, $s>0$) and let $Y\mid(X=x)\sim\mathcal{N}(\beta x,\tau^{2})$ ($\tau>0$, $\beta\in\mathbb{R}$). Writing $v=\beta^{2}s^{2}+\tau^{2}$ for the within-component variance of $Y$, the joint pdf and marginal pdf of $Y$ take the closed forms

\[\begin{gathered} f_{\sssig XY}(x,y)=\frac{1}{2}\bigl[\phi(x;-\mu,s)+\phi(x;\mu,s)\bigr]\,\phi(y;\beta x,\tau)\\[0.32em] f_{\sssig Y}(y)=\frac{1}{2}\phi\!\left(y;-\beta\mu,\sqrt{v}\right)+\frac{1}{2}\phi\!\left(y;\beta\mu,\sqrt{v}\right) \end{gathered}\]

Since the conditional law $Y\mid(X=x)\sim\mathcal{N}(\beta x,\tau^{2})$ does not depend on the marginal shape of $X$, the direct regression $\mathbb{E}(Y\mid X=x)=\beta x$ is an exact straight line. Slicing horizontally at $Y=y$, however, updates the posterior weights of the two components centered at $\pm\mu$ in proportion to $\exp(\pm\beta\mu y/v)$, yielding closed-form expressions for the reverse conditional expectation and conditional variance:

\[\begin{gathered} \mathbb{E}(X\mid Y=y)=\frac{\beta s^{2}}{v}\,y+\frac{\tau^{2}\mu}{v}\tanh\!\left(\frac{\beta\mu}{v}\,y\right)\\[0.32em] \mathrm{Var}(X\mid Y=y)=\frac{s^{2}\tau^{2}}{v}+\left(\frac{\tau^{2}\mu}{v}\right)^{2}\operatorname{sech}^{2}\!\left(\frac{\beta\mu}{v}\,y\right) \end{gathered}\]

Toggling Mixture on Y exchanges the roles of $(X,Y)$, giving a curved $\tanh$ direct regression $\mathbb{E}(Y\mid X=x)$ paired with an exact straight reverse regression $\mathbb{E}(X\mid Y=y)=\beta y$.

Parameters to explore below:

  • Peak half-gap $\mu$ and component standard deviation $s$: Increasing $\mu$ or decreasing $s$ separates the two mounds sharply, producing a bimodal slice near $0$ and steepening the central $\tanh$ transition; setting $\mu=0$ collapses the mixture back to a single Gaussian bell where both regressions become straight lines.
  • Linear slope $\beta$ and noise standard deviation $\tau$: Smaller $\tau$ tightens the conditional slices around the linear trend, sharpening the S-shaped posterior transition between the two mixture components.
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 –