Multiple regression - an overview
Hi. I'm Dr Nic, and in this video I'm going to introduce multiple regression
and use a model based on authentic data to give an overview of what regression does.
Check in the description below for more videos about multiple regression
to develop your understanding. Some may be special content for channel members.
Multiple regression is an extremely versatile statistical modelling tool that is used in a
wide range of applications. Regression models are used in diverse areas including finance, science,
psychology, manufacturing, economics, forensic science and wine-collectng.
The example in this video will be around the price of a used car,
specifically a Toyota Prius, in New Zealand in January 2021.
Dimutha is considering buying a Toyota Prius and wants to get an idea of the
range of prices and the effect of age and distance travelled on the price.
So she goes on the Trade Me website and collects data on 50 cars,
putting it in an Excel spreadsheet. Dimutha uses Multiple Regression
in the Excel Analysis toolpak and obtains the following rough model:
Price = 23340 - 1028 Age - 25 Distance This model is like a formula to work out prices.
The variable, price, is the asking price in NZ dollars.
The variable age is the age of the car in years. And Distance is the number of thousands
of kilometres the car has on the odometer.
Dimutha's neighbour, Luke, has a Prius that is eight years old and has travelled 120 thousand km.
They want to know what a fair price might be.
We put the figures into the formula and get 23340 - 1028 times 8 (the age in years)
minus 25 times 120 as it had travelled 120,000 km.
This comes to $12116.
This is probably a fair price for Luke's Prius.
We have used this regression model to predict. There are provisos over what we can validly predict with it.
For example, we would not use this model to predict the price of a Lambourgini
or even a brand new Prius.
As well as predicting, regression models are also used to explain.
We will look at the values in the model, known as the coefficients and see what they tell us.
The value 23340 is the intercept or constant. It seldom has a sensible interpretation. We will leave it for now.
The value 1028, which is the coefficient of Age tells us that for each year older that a car is,
the selling price is 1028 less… …followed by an important statistical phrase
"all other things being equal". In this case "all other things being equal"
means if we have two cars that are identical and have travelled the same distance,
but one car is a year older than the other, we will expect the older car to cost about 1028 less.
What do you think is the interpretation of the coefficient of distance?
Pause the video and think about it.
The coefficient, negative 25 means that for every extra unit of distance, in this case 1000 kilometres, that the car has travelled,
the price is decreased by $25. Again, this is all other things being equal.
This has shown how a regression model can be used to predict and explain.
Terminology. This model has two independent or predictor variables, age and distance.
Price is called the dependent or response variable.
We are saying that there is a linear relationship between age and distance and price.
If we fit a model for price with just one out of age or distance, this is called a simple regression
or linear regression and can be represented as a scatterplot on a two dimensional plane.
This is a simple regression of Price on age.
Note that the dependent variable or response variable, price, is on the vertical or y-axis.
And this is a simple regression of Price on distance.
When there are two or more independent or predictor variables,
it is called multiple regression. There can be many independent variables, not just two.
There are two aspects to regression - The model and statistical inference.
I will explain each of these.
We find the model that is the best fit for the data we have.
A residual (given as the greek letter epsilon) is the difference between the actual value of price
and the model value of price for each observation, in this case for each car.
If a model is a good fit, the residuals will be small because the model values are close to the actual values.
We have found the model that minimises the sum of the squares of the residuals.
The Coefficient of Determination, or R squared value, tells us the percentage of the variation
in the dependent variable that the model has accounted for. In this case the R squared value
is 0.665 which means we have explained about 66.5% or 2 thirds of the variation in price.
You might be able to think about other aspects that we have not considered that might affect
the price of a used car.
Statistical inference around a multiple regression
Statistical inference is about what the sample model tells us about the population from which it is drawn.
Statistical inference examines what evidence we have that the model we have fitted to the
sample data (the fifty cars in the database) also applies to the population from which the
sample is drawn - all Toyota Prius cars for sale in New Zealand in January 2021.
We use t-tests for the individual coefficients and an F test for the regression as a whole.
This table, from Excel, shows the intercept and coefficients and their t statistics.
As the p-value for each coefficient is low - less than 0.0005,
we can reject the null hypothesis that the coefficients are zero.
There is evidence of an effect in the population from which the sample is drawn,
We can also calculate confidence intervals for the coefficients.
This video has been an overview of Multiple regression
In other videos I will explain more about each of the concepts introduced in this video,
and illustrate them with the Prius data and other data.
Please like this video, subscribe, but most of all join the channel - especially if you are using our
videos in your teaching. Help the channel grow and help me help more and more people like you.
Joining the channel also gives you access to more helpful videos like these.
I am truly grateful for my channel members who help make these videos possible.