# Three-parts correlation or equivalent?

I'm wondering what's the usual way for detecting "three-parts" association between variables. I'm not even sure about the name, so I apologize for any misunderstandings beforehand. Here is what I want. I suspect that buried behind some noise is a relation of this kind:

$$s=\begin{cases} g(b) & \textrm{ if }f(a)\\ h(c) & \textrm{ otherwise } \end{cases}$$

where $a$, $b$ and $c$ are "input" signals, $c$ is an "output", $f$ has image $\{0,1\}$ and $g$ and $h$ are monotonic one-variable functions. In other words, $a$ acts as a switch so that in some cases $s$ and $b$ are correlated, and in others $s$ and $c$; but neither $g$, $h$ or $f$ are known beforehand.

• I don't understand what do mean by the if/else clause (especially if $f$,$g$,$e$ are real functions). – Piotr Migdal Feb 8 '12 at 19:29
• @PiotrMigdal I have edited the question to use mathematical notation, and $f$ is indeed a Boolean function (my fault before). Hope the edit helps. Thanks for your comment. – dsign Feb 8 '12 at 21:05
• Thanks for the edit, it clarifies a lot. While both programming and mathematical notations are clear, the rest was not (what is know and what unknown, what are the types of functions/variables). – Piotr Migdal Feb 8 '12 at 21:26

Try measuring dependences of $(s, b)$ and $(s,c)$ for fixed $a$.

For your case ($g$ and $h$ are monotonic real-valued functions) perhaps the best way is to use Spearman's rank correlation coefficient.

So you get the coefficients $\rho_{s,b}(a)$ and $\rho_{s,c}(a)$ as functions of $a$. If there is such switching you get $$\max\{|\rho_{s,b}(a)|, |\rho_{s,c}(a)|\} = 1$$ for all $a$.

However, as you know $f,g$ and $h$ beforehand, why not just measure how well does it fit, e.g. using $$\langle |s_{measured}-s_{expected}(a,b,c)|^2\rangle$$ or Pearson's correlation?

• I think this will do it. I really don't know f, g or h, but if I use Spearman's rcc then I can proceed. Thanks for your answer! – dsign Feb 14 '12 at 14:10