Line of best fit and regression

Fit a line of best fit by eye and identify the least-squares regression line; interpret the gradient and y-intercept in context; use the regression equation for prediction; distinguish between interpolation and extrapolation and understand the risks of extrapolating beyond the data range.

Worked examples

Using a regression equation to make a prediction

Straightforward

Problem

The least-squares regression line for the relationship between daily temperature (xx, °C) and electricity usage (yy, kWh) for a household is:
y^=−1.8x+62\hat{y} = -1.8x + 62

A day is forecast to reach 25°C. Predict the household's electricity usage on that day.

Interpreting gradient and y-intercept; identifying interpolation vs extrapolation

Moderate

Problem

A regression line fitted to data for 30 school canteens (with between 200 and 800 students enrolled) is:
y^=0.45x+120\hat{y} = 0.45x + 120

where xx is the number of students enrolled and yy is the number of lunch orders per day.

(a) Interpret the gradient and yy-intercept in context.
(b) Predict the number of lunch orders for a canteen with 500 students.
(c) A large secondary school has 1200 students. Is using this model to predict their lunch orders reliable? Explain.

Practise

Q1·Straightforward
A regression line for the relationship between hours of study (xx) and exam mark (yy) is y=8x+22y = 8x + 22. Predict the exam mark for a student who studies for 6 hours.
Q2·Straightforward
A regression line has equation y=−2.5x+85y = -2.5x + 85, where xx is the number of staff absent and yy is daily production output (units). Predict the output when 8 staff are absent.
Q3·Straightforward
A regression line for weekly advertising spend (xx, in $) and weekly revenue (yy, in $) is y^=12x+800\hat{y} = 12x + 800. What does the gradient 1212 represent?
Q4·Straightforward
In the regression equation y^=12x+800\hat{y} = 12x + 800, where xx is weekly advertising spend and yy is weekly revenue (both in $), what does the yy-intercept 800800 represent?
Q5·Moderate
A regression line is y=4.5x+15y = 4.5x + 15, where xx is temperature (°C) and yy is daily ice cream sales. A shop owner wants to sell exactly 7878 ice creams. What temperature does the model predict this will occur at? Give your answer to the nearest whole number.
Q6·Moderate
A regression line for arm span (yy, cm) versus height (xx, cm) is y^=0.98x+4.2\hat{y} = 0.98x + 4.2. A student is 165165 cm tall and has an arm span of 166.5166.5 cm. What is the residual (actual minus predicted) for this student? Give your answer to 1 decimal place.
Q7·Moderate
A regression line was fitted to data for students aged 12 to 17, relating weekly reading hours (xx) to vocabulary score (yy). Which prediction is more reliable, and why?
Q8·Moderate
Two points that lie on a regression line are (2,14)(2, 14) and (6,26)(6, 26). Find the gradient of the regression line.
Q9·Moderate
The least-squares regression line for a dataset is y^=5.4x+32\hat{y} = 5.4x + 32, where xx is hours studied per day and yy is exam score (out of 100). Which statement correctly interprets the gradient 5.45.4?
Q10·Challenging
A regression line for years of experience (xx) and annual salary in $1000s (yy) is y^=3.2x+28.4\hat{y} = 3.2x + 28.4. A worker with 12 years of experience earns $72\,000. Find the residual (actual minus predicted salary) in thousands of dollars, to 1 decimal place.
Q11·Challenging
A regression model for house price (yy, in $1000s) versus floor area (xx, in m²) was built using data for houses between 80 m² and 250 m². Two predictions are made: Prediction A is for a 160 m² house; Prediction B is for a 400 m² house. Which statement is correct?
Q12·Challenging
A regression line for vehicle mass (xx, tonnes) and fuel consumption (yy, L/100 km) is y^=6.8x+2.1\hat{y} = 6.8x + 2.1. A car weighs 1.5 tonnes and actually uses 12.6 L/100 km. Find the residual to 1 decimal place.