After i have read in a data arranged in two columns, separated by white space characters and comprised of M = 1001 rows(where the data may be considered ordered pairs of points x and y), how do i use linear regression to find the equation of a line that best fits this data : y = mx+b

thanks :)