For a linear regression $f$ of $\{(i,y_i)\}_{i=0}^{n-1}$, where $(y_i)$ is non-negative and increasing, is $|y_i - f(i)|$ at most $y_{n-1}$?

108 Views Asked by At

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}$?