Linear regression decimal residuals below and above don't match exactly I'm completely new to statistics and I've been trying to learn it by watching some videos:
https://youtu.be/ZkjP5RJLQF4?t=731
In that video, it says that if you sum the top residuals and bottom residuals they should equal zero:
Before I watched this video I had my own dataset containing of 3 decimal values:




Price (y-axis)
Time (x-axis)




12,20
09:00


15,50
12:00


16,60
13:00




The mean aka best-fit line for this would be:
(12,20+15,50+16,60)/3 = 14,766666666666667
Rounding to 14,77
Calculating the error:
(below mean)
14,77 - 12,20 = -2,57
(above mean)
15,50 - 14,77 =  + 0,73
16,60 - 14,77 = + 1,83
calculating the sum =
0,73 + 1,83 = 2,56
There's a difference of 0,01 between the top and bottom residuals? Is there something I'm missing or is this normal? Without rounding it would be 0,02.

Rounding is the culprit. Do it all with fractions to get the exact zero.
$$
x_1=12.2=\dfrac{366}{30}\\
x_2=15.5=\dfrac{465}{30}\\
x_3=16.6=\dfrac{498}{30}\\
\bar x = \dfrac{443}{30}\\
x_1-\bar x = \dfrac{366}{30} - \dfrac{443}{30} = -\dfrac{77}{30}\\
x_2-\bar x = \dfrac{465}{30} - \dfrac{443}{30}= \dfrac{22}{30}\\
x_3-\bar x = \dfrac{498}{30} - \dfrac{443}{30} = \dfrac{55}{30}
$$
Finally, $-\dfrac{77}{30} + \dfrac{22}{30} + \dfrac{55}{30} = \dfrac{0}{30} = 0$.
