I'm trying to perform a linear regression on a dataset however, without normalizing the data I couldn't achieve any results therefore I was forced to normalize it. Now my graph looks fine for the normalized domain where the x and y axis are z scores I can't figure out how to transform it back to my original domain.
Since I used z scores the normalization was done using the formulas $$ z_x=\frac{x-\bar{x}}{\sigma_x} \mbox{ and } z_y=\frac{y-\bar{y}}{\sigma_y} $$
I can re-arrange for $x$ and $y$ which gives $x = z_x\sigma_x+\bar{x}$ which maps the data points back to their original values but I'm not completely convinced I converted the regression line $y=\omega x+b$ properly.
I started off by writing $$ z_y = \omega (z_{x}) + b_{z_y}=\omega \left(\frac{x-\bar{x}}{\sigma_x}\right)+\frac{b-\bar{y}}{\sigma_y} \\ z_y = \frac{y-\bar{y}}{\sigma_y} = \omega \left(\frac{x-\bar{x}}{\sigma_x}\right)+\frac{b-\bar{y}}{\sigma_y} \\ y = \frac{\omega \sigma_y}{\sigma_x}(x-\bar{x}) + b $$
Obviously this is wrong since there's no scaling occuring on the $b$ term. I also tried $b_{z_{y}} = b(0-\bar{y})/\sigma_y=-b\bar{y}/\sigma_y$ which leads to $$ y = \frac{\omega \sigma_y}{\sigma_x}(x-\bar{x})+\bar{y}(1-b) $$
which looked okay but I'm not 100% sure it's correct if someone could verify.