In this exercise you will familiarize yourself with dynamic memory allocation in C by performing a linear least squares fit of some data to a line, or simply linear regression. In this lab you will see some of the flexibility C allows when creating programs which are matched to user input. Linear regression is a powerful data anlaysis tool. Physical measures contain errors or noise, thus making an exact measurement impossible. Linear regression gives the answer to these questions in a rigorous fashion.
Linear regression is one of a class of data analysis methods called linear least squares fitting.
These methods model data as a linear combination of basis functions. With linear regression, this model is simply a line. The value of L is a measure of how well the data fits the model. For this project, you will create a program which determines the least squares fit of the line to data pairs read from stdin. Once the data is read in, compute the coefficients a and b and report them to standard output.