Added error computation to the linear fit