I am studying the book "An Introduction to Statistical Learning: with Applications in R", on page 66
While the book explains how to calculate $\beta_0$ and $\beta_1$, it skips how the actual calculation happened and only displays the equations to calculate them and then the result in the next page. I got lost when $\sigma^2$ is calculated. I don't know how it was calculated, as I quote the book:
In general, $\sigma^2$ is not known, but can be estimated from the data. This esti- mate is known as the residual standard error and is given by the formula $\text{RSE} = \sqrt\frac{RSS}{n-2}$
so I calculated $\sigma^2$ as $\text{RSE} = \sqrt\frac{RSS}{n-2}$ which gives 3.258
but it doesn't add up when I try to use this value instead of $\sigma^2$ in the equations (3.8) in the same page.
P.S: This example belongs to the Advertising data set, and it is Sales (Y) as a function of TV (X) advertising. Available here