Okay for this simple linear regressions. So in our high school we learn about linear regression, the formula is y equals mx plus C. In University, the formula is y equals alpha plus beta X. So to find L bar, we can use the y bar y bar is the mean of Y minus beta times the x bar x bar is the mean of x. To find that beta, we can use something like this our si minus x bar times y minus y bar, and then we do the summation divided by the summation of si minus S bar the mean of x and then we square the whole thing. So this is the formula to let's say, calculate alpha and beta for the simple linear regression equations. So, as I mentioned previously, prediction model is to predict numerical variable classification model is to predict a categorical variable.
So let's say we have a training data data set, we try to split this data into our training data and testing data. So we can split this data set using let's say, our sampling method 75% for training data and 25% for testing data. Then we These are 770 5% training data, we can use these training data to train our linear regressions. So we can use this training data to calculate the beta and the alpha. So after we use the training data to Car train these linear regression model we get is a linear regression equation which is a price equal minus seven 0.1 plus one pi 6.9 times the engine size. So, this will be the alpha.
So the alpha So, this will be the alpha, beta beta times the engine. So, we use the training data to train the linear regression model. And we get all these Alpine all this data for our simple linear regression equations. So, with these simple linear regression equation or model, we can actually use this equation to predict the price was from let's say a new data set or from the testing dataset. So this is a simple linear regressions