How does the sample residuals, u^i change if the I scale the same sample of n observations (Y, X) to (aY + c, bX + d) Can't get my head around this one. I've been given a sample of data, (Y, X) with n observations of each. Using the exact same sample of data, I've been given a second sample of data constructed from the first sample, (Y2, X2) where Y2 = aY + c, and X2 = bX + d. (i.e. the second sample is just the first sample but scaled up/down with a constant added). When performing a simple linear regression, how would the sum of residuals or standard error of regression change between regressing these two samples? 
Intuitively to me u^hat shouldn't really change significantly, as it's kind of like regressing the same sample of temperatures in Celsius and Fahrenheit and it seems to me that they should still be correlated in the same way, but I'm not sure and need a precise answer. Any help would be massively appreciated.
 A: You're right: this is an exercise in units analysis (aka "quantity calculus").
Let's pursue the temperature analogy.  Suppose--with no loss of generality--that $Y$ is measured in degrees Centigrade ("C") and $X$ is a time measured in seconds ("sec").  Let's work out the units of the quantities involved in a regression model of the form
$$Y = \alpha + \beta X + \varepsilon$$
where $\operatorname{Var}(\varepsilon)=\sigma^2.$
Because $Y$ is a temperature, so is the right hand side.  Let's make this explicit by exhibiting the units of measurement of each quantity in postfixed braces.  Begin with what we know, leaving the unknowns as question marks for now:
$$Y\,[\text{C}] = \alpha\,[\text{?}] + \beta\,[\text{?}] X\,[\text{sec}] + \varepsilon \,[\text{?}]$$
In order for the additions to make sense, the units of $\alpha,$ $\beta X,$ and $\varepsilon$ must also be C.  Consequently, the units of $\beta$ must be C/sec for the units algebra to work:
$$Y\,[\text{C}] = \alpha\,[\text{C}] + \beta\,\left[\frac{\text{C}}{\text{sec}}\right] X\,[\text{sec}] + \varepsilon \,[\text{C}].\tag{1}$$
Finally, because a variance is an expectation of a square, the units of $\sigma^2$ must be $\text{C}^2.$
This tells us all we need to know about how the coefficients change when the units of measurement change.
If, for instance, the temperature is changed from degrees C to degrees F, that is effected by a multiplication of the temperature by $9/5$ followed by adding $32.$  The same operation must be performed on every multiple of $[\text{C}]$ in equation $(1).$  Consequently,
$$\eqalign{
Y\,[\text{F}] &= \frac{9\,[\text{F}]}{5\,[\text{C}]}Y\,[\text{C}] + 32\,[\text{F}] \\
&= \frac{9\,[\text{F}]}{5\,[\text{C}]}\left(\alpha\,[\text{C}] + \beta\,\left[\frac{\text{C}}{\text{sec}}\right] X\,[\text{sec}] + \varepsilon \,[\text{C}]\right) + 32\,[\text{F}] \\
&= \left(\frac{9}{5}\alpha + 32\right)\,[\text{F}] + \left(\frac{9}{5}\right)\beta\,\left[\frac{\text{F}}{\text{sec}}\right] X\,[\text{sec}] + \left(\frac{9}{5}\right)\varepsilon \,[\text{F}].
}\tag{2}$$
From this expression we can read off the new coefficients:

*

*$\alpha$ becomes $9\alpha/5 + 32.$


*$\beta$ becomes $9\beta/5.$


*$\varepsilon$ becomes $9\varepsilon/5,$ implying its variance $\sigma^2$ becomes $(9/5)^2\sigma^2.$
Similarly, because the residuals (as differences of temperatures) are still temperatures, they will scale by $9/5$ (that's an appreciable change!) and the sum of their squares will therefore scale by $(9/5)^2.$ You can just as easily figure out how any other statistic changes by examining its formula and applying the units calculus.

Generally, if we wish to write the regression equation $(1)$ in terms of $Y^\prime = aY+c$ and $X^\prime=bX + d,$ then we solve $X = (X^\prime - d)/b,$ plug it into $(1),$ and simplify:
$$\eqalign{
Y^\prime &= aY + c = a\left(\alpha + \beta X + \varepsilon\right) + c \\
&= a\left(\alpha + \beta \left(X^\prime-d\right)/b + \varepsilon\right) + c \\
&= \left(a\alpha + c - \frac{\beta d}{b}\right) + \frac{a\beta}{b}X^\prime + a\varepsilon \\
&= \alpha^\prime + \beta^\prime X^\prime + \varepsilon^\prime
}$$
where, comparing coefficients,

*

*$\alpha^\prime = a\alpha + c -\beta d/b,$


*$\beta^\prime = a\beta/b,$ and


*$(\sigma^\prime)^2 = \operatorname{Var}(\epsilon^\prime) = a^2\sigma^2.$
(Obviously $b\ne 0$ is necessary, but--as you can check--this still is correct when $a=0.$)
With this information you can work out how any algebraic combination of the quantities $X,Y,\alpha,\beta,\varepsilon,\sigma$ can be rewritten in terms of their new (primed) counterparts.
Reference
Paul Yates, "Quantity calculus."  Royal Society of Chemistry, 31 Dec 2006. https://edu.rsc.org/maths/quantity-calculus/2020326.article
