Since \(\sigma ^{2}\) is unknown, we must estimate it from the data: \[\begin{align*}
s^{2} &= \frac{1}{n-2}\sum_{i=1}^{n}\hat{U}_{i}^{2} \\
&= \frac{1}{n-2}\sum_{i=1}^{n}\left( Y_{i}-\hat{\beta}_{0}-\hat{\beta}_{1}X_{i}\right) ^{2}.
\end{align*}\]
The standard error of \(\hat{\beta}_{1}\) is defined as \[\begin{align*}
\mathrm{se}\left(\hat{\beta}_{1}\right) &= \sqrt{\widehat{\mathrm{Var}}\left(\hat{\beta}_{1}\right)} \\
&= \sqrt{\frac{s^{2}}{\sum_{i=1}^{n}\left( X_{i}-\bar{X}\right) ^{2}}}.
\end{align*}\]
Replacing \(\sigma\) by its estimate does not give a normal distribution anymore: \[
\frac{\hat{\beta}_{1}-\beta _{1}}{\mathrm{se}\left(\hat{\beta}_{1}\right)}\mid \mathbf{X}\sim t_{n-2}.
\] Here \(t_{n-2}\) denotes the \(t\)-distribution with \(n-2\) degrees of freedom.
The degrees of freedom depend on
Let \(t_{df,\tau }\) be the \(\tau\)-th quantile of the \(t\)-distribution with the number of degrees of freedom \(df\): If \(T\sim t_{df}\) then \[
P\left( T\leq t_{df,\tau }\right) =\tau .
\]
Similarly to the normal distribution, the \(t\)-distribution is centered at zero and is symmetric around zero: \(t_{n-2,1-\alpha /2}=-t_{n-2,\alpha/2}.\)
We can now construct a feasible \(CI_{1-\alpha }\) as \[
\hat{\beta}_{1}\pm t_{n-2,1-\alpha /2} \times \mathrm{se}\left(\hat{\beta}_{1}\right).
\]