01 · Direction
A model predicts fuel used from journey distance. Which regression direction is relevant if x is distance and y is fuel?
Hint
The requested response is y.
Worked solution
Use y on x: predict fuel from distance.
Understand · explore · practise
Choose y-on-x or x-on-y regression, distinguish rearranging a given equation from fitting the reverse prediction and understand the perfect-line exception.
Before you startRegression equations, least squares and vertical residuals.
01 / Name the response first
To predict y from x, use the regression of y on x. To predict x from y, use the regression of x on y.
These generally minimise different squared errors and produce different fitted lines.
Algebraically rearranging a nonhorizontal equation is valid. It does not, by itself, turn the least-squares fit in one direction into the separately fitted least-squares model for the reverse direction.
Constructed pairs: (0,1), (1,2), (2,2), (3,5). Separate least-squares fits are ŷ = 0.7 + 1.2x and x̂ = −1/6 + (2/3)y.
For supplied x = 1, the y-on-x fit predicts y = 1.9. Its residuals are vertical.
02 / Predict y from a supplied x
At x = 2, predict y = 3.1
Substitute the supplied x.
The observed response at x = 2 is 2
The vertical residual is −1.1.
The fit minimises squared vertical residuals over all four pairs
It was not chosen by minimising errors in x.
A model predicts fuel used from journey distance. Which regression direction is relevant if x is distance and y is fuel?
The requested response is y.
Use y on x: predict fuel from distance.
For ŷ = 0.7 + 1.2x, find the prediction at x = 3.
Keep the intercept.
ŷ = 4.3. This is a fitted response, not necessarily the observed one.
03 / Fit the reverse response separately
At y = 3, x̂ = −1/6 + 2 = 11/6
Approximately 1.833.
Rearranging the y-on-x fit would give x = (3 − 0.7)/1.2 = 23/12
Approximately 1.917, a different number.
Both calculations are algebraically correct for their equations
Only the first uses the separately fitted x-on-y model.
Use x̂ = −1/6 + (2/3)y to predict x at y = 2.
Use the equation whose response is x.
x̂ = −1/6 + 4/3 = 7/6 ≈ 1.167.
Why need the reverse fit differ from an algebraic inverse?
Vertical and horizontal squared errors are different objectives.
The two fits optimise different response errors. Scatter around a line means the optimisation usually selects different lines.
04 / Separate two legitimate tasks
A question explicitly asks which x makes the stated model prediction ŷ = 0.7 + 1.2x equal to 3. What is the answer?
This is an algebraic target on the stated line.
x = (3 − 0.7)/1.2 = 23/12. That solves the given model; do not relabel it as the separately fitted x-on-y regression.
Only a y-on-x equation is supplied. Does it determine the separately fitted x-on-y line in general?
Information about the scatter and both variables is missing.
No. Extra data or appropriate summary statistics are needed. Follow a question that explicitly asks you to rearrange its given model, but distinguish that task from reverse statistical fitting.
05 / See what is held fixed
Pause, replay or seek freely. The notes explain the same idea and stay in view.
Both fits use x̄ = 1.5 and ȳ = 2.5. Verify that both fitted lines pass through that point.
Substitute the relevant supplied coordinate in each.
0.7 + 1.2×1.5 = 2.5. Also −1/6 + (2/3)×2.5 = 1.5. Ordinary unweighted fits with intercepts share the mean point.
When x is the response, which way is a residual drawn on the usual x-horizontal, y-vertical scatterplot?
Compare observed and predicted x at the same y.
Horizontally. The prediction direction can change without swapping the physical axes.
06 / Recognise the exact-line exception
All pairs satisfy y = 2 + 3x exactly, with varying x. What is the reverse equation?
Solve the exact relationship.
x = (y − 2)/3. With zero scatter and nonzero gradient, both least-squares directions lie on the same geometric line.
All y values are 5 while x varies. Can the y-on-x constant fit be inverted to recover x from y?
One response value corresponds to several x values.
No. There is no unique inverse, and the predictor y has zero variation for reverse fitting. The perfect nonzero-gradient exception does not apply.
07 / State the intended use
Two fitted equations are given, one for predicted mass from length and one for predicted length from mass. You know an object’s mass and want its length. Which do you use?
Choose the equation predicting the unknown from the known.
Use the fit predicting length from mass, then assess whether its range and context apply.
Does choosing y-on-x regression prove x causes y?
Prediction direction is not causal identification.
No. It specifies which response errors are minimised and what is being predicted, not a causal mechanism.
08 / Choose, substitute and qualify
Name the known variable and the response you want. Use the relevant fitted direction, or solve a stated model when that is explicitly the task. Check range and context, and remember that the two regression lines generally differ when there is scatter.
Section 1 of 8 · Name the response first