Create section for linear regression chapter consisting of:
Start from some second hand ford focus data-set (it will be slightly altered for the purposes later on). We want a model for the price explained by the mileage, engine size and age. We should set up the observation vector and design matrix and feed it to the OLS model (can use statsmodels). Then plot the scatterplot against each of the three variables but mention plotting the estimated regression line would require providing a value for the other two variables. To remedy this we plot a scatterplot of response against predicted value by the model and plot a slope 1 line through the origin through this. Also print the summary and again note in the text where we can read off the estimated coefficients, number of observations and degrees of freedom, rest will come later.
Create section for linear regression chapter consisting of:
Start from some second hand ford focus data-set (it will be slightly altered for the purposes later on). We want a model for the price explained by the mileage, engine size and age. We should set up the observation vector and design matrix and feed it to the OLS model (can use statsmodels). Then plot the scatterplot against each of the three variables but mention plotting the estimated regression line would require providing a value for the other two variables. To remedy this we plot a scatterplot of response against predicted value by the model and plot a slope 1 line through the origin through this. Also print the summary and again note in the text where we can read off the estimated coefficients, number of observations and degrees of freedom, rest will come later.