# Bayesian parameter estimation for simple linear regression

I'm reading William Bolstad's introductory book to Bayesian statistics and I don't quite understand how did we jump from $$e^{\frac{1}{2 \sigma ^2} (SS_y - 2 \beta SS_{xy} + \beta ^2 SS_x)}$$ to $$e^{\frac{1}{2 \sigma ^2 / SS_x} (\beta - \frac{SS_{xy}}{SS_x})^2}$$, the factorisation part was easy for me to understand $$e^{\frac{1}{2 \sigma ^2 / SS_x} (\beta ^2 - 2 \beta \frac{SS_{xy}}{SS_x} + \frac{SS_y}{SS_x})}$$, but the two following parts is where I got stuck. Can anyone show, step by step, how did we get there starting from $$e^{\frac{1}{2 \sigma ^2 / SS_x} (\beta ^2 - 2 \beta \frac{SS_{xy}}{SS_x} + \frac{SS_y}{SS_x})}$$?

Starting from $$e^{\frac{1}{2 \sigma ^2 / SS_x} (\beta ^2 - 2 \beta \frac{SS_{xy}}{SS_x} + \frac{SS_y}{SS_x})}$$, they have expressed this as follows:- \begin{align}e^{\frac{1}{2 \sigma ^2 / SS_x} (\beta ^2 - 2 \beta \frac{SS_{xy}}{SS_x} + \frac{SS_y}{SS_x}+\left(\frac{SS_{xy}}{SS_x}\right)^2-\left(\frac{SS_{xy}}{SS_x}\right)^2)}=e^{\frac{1}{2 \sigma ^2 / SS_x} (\beta - \frac{SS_{xy}}{SS_x})^2 }\color{red}{e^{\frac{1}{2 \sigma ^2 / SS_x} (\frac{SS_y}{SS_x}-\left(\frac{SS_{xy}}{SS_x}\right)^2) }}\end{align} The part that doesn't depend on any parameter is highlighted in red, and has been absorbed into the constant of proportionality.
• The constant of proportionality (which we denote by $k$) means that the likelihood is equal to this constant $k$ (which does not depend on the parameters $\alpha_\bar{x}$ and $\beta$) multiplied by the exponential terms in the equation on the last line. The constant $k$ is basically the red terms multiplied by some other constant (all of which are independent of $\alpha_\bar{x}$ and $\beta$) – Alijah Ahmed Jan 28 at 20:59