Equation of the Line Fitted by Least Squares

$\hat{y}=\hat{\beta}_0+\hat{\beta}_1x$
where
$\begin{array}{rcl}
\mbox{Slope} \hat{\beta}_1 &=& \displaystyle\frac{S_{xy}}{S_...
...rcept} \hat{\beta}_0 &=& \overline{y}-\hat{\beta}_1\overline{x} \\
\end{array}$
其中, $\displaystyle\hat{\beta}_1 = r \frac{\sqrt{S_{yy}}}{\sqrt{S_{xx}}}$, r 為相關係數

A chemist wishes to study the relation between the drying time of a paint and the concentration of a base solvent that facilitates a smooth application. The data of concentration setting x and the observed drying times y are recorded in the first two columns as follow.

$\begin{array}{c\vert c\vert ccc} \hline
\mbox{Concentration}&\mbox{Drying Time}...
...7 \\
4&7&16&49&28 \\ \hline
\mbox{Total} 10&25&30&165&66 \\ \hline
\end{array}$

由 Scatter Diagram 可以看出可能具有線性關係,

$\overline{x}=2, \overline{y}=5, S_{xx}=10, S_{yy}=40, S_{xy}=16, r=0.8$
$\hat{\beta}_1=1.6, \hat{\beta}_0=1.8$, 所以估計線為 $\hat{y}=1.8+1.6x$

假如我們想要知道當 concentration x=2.5 時, 它的 drying time y 可能為多少? 即可以由上面的估計式得知, 為 $1.8+1.6 \times 2.5 = 5.8 \mbox(minutes)$