# Course:CPSC312-2017-Linear Regression

## Linear Regression

Authors: Trevor Stokvis, Kevin Lapeyre

### What is the problem?

State the general problem. If applicable, tell us what information you will use, e.g., a link to some web site that provides the information you used.

Linear regression is a method used to fit a line to a data set that can then be used to make predictions for new data points. We will be creating a predict function that takes a list of numbers of size d (representing the new data point) and a list of list of numbers of size n by (d+1), where the data set is ((y1|x1),(y2|x2)...(yn|xn)). Using the data set and the new data point, the program will predict y_hat given the new data point x_hat.

### What is the something extra?

What is the in-depth aspect you will do? If the problem is related to some other groups, tell us how they fit together. If in doubt, include it.

We will be using multiple same length lists to represent rows in a matrix. To solve this problem we will need to build several matrix operations including matrix multiplication, inversion, adjudication and transposition. We will be calculating our "betas" by the following formula: B = inv(trans(X)*X) * trans(X) * y. This will give us a vector (a list of one value lists), B. To calculate the prediction is found multiplying B*x_hat, with the out come being a single value-- our estimated prediction y_hat.