0
$\begingroup$

I am trying to write a math notation to select between two variables based on whichever has the highest correlation with another variable. Let

$$ X = \begin{pmatrix} a\\ b\\ c \end{pmatrix} \qquad\&\qquad Y = \begin{pmatrix} a1\\ b1\\ c1 \end{pmatrix}$$

I want a matrix $e$ that contain either $a$ or $a1$, $b$ or $b1$ and $c$ or $c1$ based on whichever has the highest correlation with $v$.

The output matrix may look like

$$ e = \begin{pmatrix} a1\\ b\\ c1 \end{pmatrix}$$

My first trial results in something like that:

Let $G \subset X$ and $D \subset Y$, $e= max\{\rho(G,\;v),\; \rho(D,\;v)\}$

But I have strong feeling that it is a way from being correct.

$\endgroup$

1 Answer 1

1
$\begingroup$

First I'm going to explain why your trial cannot work:

$X$ is not a set so $G \subset X$ cannot work. Furthermore it should be an element wise comparison of $X$ and $Y$.


I'll redefine your vectors in order to make it more consistent:

Let $\vec{x} = \begin{pmatrix} x_1 \\ x_2 \\ x_3 \end{pmatrix}$ and $\vec{y} = \begin{pmatrix} y_1 \\ y_2 \\ y_3 \end{pmatrix}$

With the correlation function $\rho : \mathbb{R}^2 \rightarrow \mathbb{R}$ (assuming $v \in \mathbb{R}$)

Your desired vector $\vec{z} = \begin{pmatrix} z_1 \\ z_2 \\ z_3 \end{pmatrix}$ is then defined as:

$$\forall i \in \{1, 2, 3\}: z_i := \begin{cases} x_i & \rho(x_i, v) > \rho(y_i, v) \\ \text{undefined} & \rho(x_i, v) = \rho(y_i, v) \\ y_i & \rho(x_i, v) < \rho(y_i, v) \end{cases}$$

another but almost equivalent definition:

$$\forall i \in \{1, 2, 3\}: z_i \in \{ b \in \{x_i, y_i\} \; | \; \rho(b, v)=\max_{a \in \{x_i, y_i \}} \rho(a, v) \} $$

Now $z_i$ is either $x_i$ or $y_i$ but if $\rho(x_i, v) = \rho(y_i, v)$ it cannot be known whether $z_i = x_i$ or $z_i = y_i$ (but not $\text{undefined}$ as in the above definition).

$\endgroup$
1
  • $\begingroup$ That make much more sense, very much appreciated!!! $\endgroup$
    – mallet
    Mar 3, 2017 at 14:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .