1

Suppose we have a set of data points $\{(i,y_i)\}_{i=0}^{n-1}$, where $y_i$ are non-negative integers and $(y_i)_{i=0}^{n-1}$ is an increasing sequence.

Question: In a simple linear regression $f$ for this data set, is it true that the absolute vertical deviation $|y_i - f(i)|$ is at most $y_{n-1}$?

In the following example, $\max_i|y_i - f(i)|$ is quite close to $y_{n-1}$.

extreme example

This is a follow-up to this question: For a linear regression of $\{(i,y_i)\}_{i=0}^{n-1}$, where $(y_i)$ is increasing and non-negative, is the $y$-intercept at least $-y_{n-1}$?

  • In the example above $y_i$ is non-decreasing (as constant) rather than increasing. Also $y_{n-1}=10000$ which is nowhere close to the max absolute difference $|y_i-f(i)|\approx 2000$ as I see it from the image. – Jimmy R. Feb 21 '16 at 08:53
  • The sequence is {1, 10001, 10002, ..., 10020}, so the max absolute difference is $|y_0 - f(0)| = 8224.3$. – Naiyong Ao Feb 21 '16 at 09:06
  • Oh, sorry, I missed $y_0$ and the fact that $y_i$ slightly increase. You are correct. – Jimmy R. Feb 21 '16 at 09:07
  • If you replace $y_i$ by $y_i+c$ for some $c$ you change $y_{n+1}$ but not the differences $|y_i-f(i)|$ so the answer is no. – Dirk Feb 22 '16 at 10:08
  • @Dirk : Yes, you can do the transformation $y_i \mapsto y_i + c$, but $c$ is at least $-y_0$ since $y_i+c$ should be non-negative. The question then asks if $|y_i - f(i)|$ is at most $y_{n-1} - y_0$ – Naiyong Ao Feb 22 '16 at 11:13
  • Not sure what you want to say, but large $c$ makes $y_i+c$ large while $|y_i-f(i)|$ stays the same… Probably you should rethink your formulation and check if you stated all the assumptions that you assume. – Dirk Feb 22 '16 at 12:55
  • @Dirk: If you replace $y_i$ by $y_i +c$, then the question asks if $|y_i - f(i)|$ is at most $y_i + c$ (not $y_i$). So there is no point to do the transformation $y_i \mapsto y_i + c$ for some $c \geq 0$. – Naiyong Ao Feb 22 '16 at 13:50
  • Sorry, I don't get it… – Dirk Feb 22 '16 at 13:51
  • I'm working on this problem with Naiyong Ao, and encouraged him to post on here (as I couldn't easily answer the question). Essentially, the question asks if $y_{n-1} < |y_i-f(i)|$ ever happens (or for a proof that it doesn't). The restriction "$y_i$ is non-negative" means we can't decrease $y_{n-1}$ arbitrarily by uniformly subtracting a positive constant. If $y_{n-1} < |y_i-f(i)|$ could arise, Naiyong Ao's code (which stores data points as a regression line and the deviations from that line as non-negative integers), an error could theoretically occur. – Rebecca J. Stones Feb 23 '16 at 02:20

0 Answers0