Regression
Regression
Topic Outcomes
• Explain the principle of least-squared approximation.
• Examples of applications
• If the student to teacher ratio in schools changes, what effect will it have on
average marks?
• If the return on spending on advertising comparable with that of similar
firms?
Fitting a regression line
It may be done by
Inspection
Semi-averages
Least squares
Inspection
• This is a very basic approach
• Draw a scatter plot
• Draw a line of best fit
• This may be helped by plotting (x,ҧ yത)
• Find the equation of the line (y = a + bx)
• It is highly inaccurate
• 2 people will probably draw different lines
• The same person may not even draw the same line twice!
Semi-averages
This method splits the data in half
Step 1
Sort the data into size order by x-value
Step 2
Split the data into 2 equal parts such that one half contains lower values of x
and the other contains higher values of x
Step 3
Calculate the mean points for each group
Step 4
Plot the mean points and join with a straight line
Step 5
Find the equation of the line
Semi-average regression
This is an improvement on the inspection method where only one
mean was calculated
However, it is still not particularly rigorous in its method
Least squares
• Ordinary least squares is the standard method of regression
• The least squares regression line of y on x is the line that minimises
the sum of squares of vertical deviations from that line
• You do not need to know the derivation of the formula
𝒏 σ 𝒙𝒚−σ 𝒙 σ 𝒚 𝑺𝒙𝒚 σ𝒚 σ𝒙
𝒃=
𝒏 σ 𝒙𝟐 − σ 𝒙 𝟐
=
𝑺𝒙𝒙
and 𝒂 = 𝒏
−𝒃
𝒏
Least squares
• An alternative formula for y = a + bx…
𝑺𝒙𝒚
• 𝒃= and 𝒂 = 𝒚ഥ − 𝒃ഥ𝒙
𝑺𝒙𝒙
• Interpolation
• Estimation within the range of values for the independent variable
• We can be quite confident of our interpolated estimates
• Extrapolation
• Estimation outside of the range of values for the independent variable
• Typically used for forecasting
• Lower level of confidence regarding these estimates
You should now be able to…
know how to draw linear graphs
be able to find equations from linear graphs
know the standard methods of finding a regression line
find the y-on-x regression line
calculate least squares regression
know the about non casual relationships
be able to determine and plot least squares line and mean point
be able to use interpolation and extrapolation