title: How can I determine that Y_n can be represented as a funtion of X_n
body: <p>On enter I'm having a sequence of pairs <code>(X_n, Y_n)</code>. Consider the following two graphics of two possible sequences.</p>
  
  <p><a href="https://i.stack.imgur.com/w47Br.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/w47Br.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/Fh0to.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Fh0to.png" alt="enter image description here"></a></p>
  
  <p>in first case <code>X_n</code> can be modeled as <code>f(Y_n)</code> while in second case it obviously has no sense. The question is how can I determine if trying to represent <code>X_n</code> as <code>f(Y_n)</code> makes sense? Probable there is some criterium or something like that? </p>
  
  <p>What can be done in multivariate situation (i.e. when we're trying to represent <code>Y</code> as <code>f(X_1, X_2, ..., X_k)</code>)?</p>
  
  <p>Please note that trying to fit points with something graphicaly (e.g. like on first graph) and seeing if it fits the data is not OK. I'm looking for numerical criterium.</p>
  
  <p>Please feel free to propose variants in either matlab or R. A link on page with algorithm will be great too!</p>