I am working through a technical assessment and one part is asking for a tiny bit of data science. They give me the implementation and I am a little confused about it. That said, the thing I am trying to figure out is how to calculate the linear regression of a set of values with a corresponding time stamp. I don’t know a lot about LR but I know I need to fit x and y datasets.

Can anyone point me in the right direction?