Enter the paired data into your GDC and calculate the linear regression of on . The calculator returns the coefficients in the equation , where is the gradient and is the -intercept.
Enter the paired data into your GDC and calculate the linear regression of on . The calculator returns the coefficients in the equation , where is the gradient and is the -intercept.
This is IB Mathematics: Analysis and Approaches SL 4.4, and it is normally assessed on Paper 2 because the syllabus requires technology to find the regression equation.
A regression line is a least-squares line: it minimizes the sum of the squared vertical differences between the observed -values and the values predicted by the line. Its equation is often written as
where represents the predicted value of . The coefficients satisfy
On most GDCs, place the explanatory variable in one list and the response variable in a second list. Select linear regression, making sure the first list is and the second is . Store or copy the resulting equation before making predictions. As a check, the regression line must pass through the mean point . In context, represents the predicted change in for each one-unit increase in , while is the predicted value when , if that interpretation is meaningful.
For example, consider the data:
| 1 | 2 | 3 | 4 | |
|---|---|---|---|---|
| 2 | 3 | 5 | 4 |
Here, and . Calculation gives , followed by
Therefore, the regression line is
The choice of regression line depends on which variable is being predicted:
| Required prediction | Correct regression |
|---|---|
| Predict from | Regression of on |
| Predict from | Regression of on |
A common misconception is that these two regression lines are interchangeable. They are generally different, so a -on- line should not be rearranged to predict .
Exam technique: show the regression equation with coefficients to at least three significant figures, identify which variable is predicted, and substitute into the equation if a prediction is requested. Avoid unreliable extrapolation far beyond the observed data range.