Suppose we have vectors $x_1$ and $x_2$, each has ($n$) samples. Both $x_1$ and $x_2$ are my independent variables.

Suppose we also have a vector $y$ which has ($n$) samples and is y my dependent variable.

I would like to perform a linear regression in the form: $$y=b_0 + b_1 x_1 + b_2 x_2$$

however, before performing the regression, all my variables ($y,x_1,x_2$) were normalised such that their mean is zero and std. deviation is $1$.

After the regression, we get $a_0, a_1$ and $a_2$ which are the weights. How can I get the original weights ($b_0,b_1,b_2$) given the weights obtained from the normalised data ($a_0,a_1$ and $a_2$)?


1 Answer 1


Suppose the original vectors are $y, x_1, x_2$ and we have


and we have


then we have


Hence, $$b_0=\mu_y+\sigma_y\left(a_0-\sum_{i=1}^2 \frac{a_i\mu_{x_i}}{\sigma_{x_i}}\right)$$ For $i\ge 1$, $$b_i=\frac{\sigma_ya_i}{\sigma_{x_i}}$$

  • $\begingroup$ Can you please clarify the math right after "Hence"? How did we get b0 and bi given the equations before? $\endgroup$
    – HaneenSu
    Feb 21, 2019 at 5:21
  • 1
    $\begingroup$ I just perform some algebra, that is first I multiply both sides by $\sigma_y$, then I move $\mu_y$ over to the right hand side and collect coefficients of $x_i$ and the constant term. $\endgroup$ Feb 21, 2019 at 5:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.