Question: Linear regression attempts to model the relationship between two variables and provides a linear equation for value prediction. The formula for the best-fitting line (or regression line) is y = mx + b, where m is the slope of the line and b is the y-intercept. You can find out how to calculate 'm' and 'b' here. Create a function 'linreg' that calculates the regression line and returns a 2 element list, the first being the y-intercept and the second being the slope of the line.
q)signal:til 100 q)price:3*til 100 q)linreg[signal;price] 0 3f