A cosmetic company wants to know its customer base. They have a intuition that the money spent by a person on cosmetics yearly is related to his/her annual income. Given N data entries collected from a survey.
Help the cosmetic company build a linear regression model over the parameters. Report & values for it.
Input constraints
,
Input format
First line: N
Next N lines have x,y values (x: annual income, y: money spent in cosmetics (in dollars))
....
Output format
Solution is supposed to take in N data points and calculate the regression line for it. Output must be intercept followed by space and then slope of the line.