This is personal study note
Copyright and original reference:
https://www.youtube.com/watch?v=WPXkk8-GcFo&list=PLsri7w6p16vscJ4rkstBZQJqNtZf8Tkxq&index=3
================================================================================
The goal is to calculate $$$\hat{\beta}_0$$$ and $$$\hat{\beta}_1$$$
How to calculate $$$\hat{\beta}_1$$$
$$$\hat{\beta}_1 = \dfrac{\sum\limits (X_i-\bar{X})(Y_i-\bar{Y}) } {\sum\limits (X_i-\bar{X})^2 }$$$
How to calculate $$$\hat{\beta}_0$$$
$$$\hat{\beta}_0 = \bar{Y} - \hat{\beta}_1 \bar{X}$$$
================================================================================
Insert the values
$$$\hat{\beta}_1 \\
= \dfrac{\sum\limits (X_i-\bar{X})(Y_i-\bar{Y}) } {\sum\limits (X_i-\bar{X})^2 } \\
= \dfrac{(13-16.467)(94-98.933) + (8-16.467)(70-98.93) + \cdots } {(13-16.467)^2 + (8-16.467)^2 + \cdots} \\
= 2.168$$$
$$$\hat{\beta}_0 \\
= \bar{Y} - \hat{\beta}_1 \bar{X} \\
= 98.933 - 2.168*16.467 \\
= 62.929$$$
$$$\hat{Y} = 62.929 + 2.186*X_i$$$