Hersi Maths WhatsApp me

Understand · explore · practise

Choosing the regression direction

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

Regression direction follows the prediction question.

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.

Choose what is being predictedExplore

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

Use vertical response errors.

For the constructed data, the y-on-x line is ŷ = 0.7 + 1.2x.Worked example

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.

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.

02 · Substitution

For ŷ = 0.7 + 1.2x, find the prediction at x = 3.

Hint

Keep the intercept.

Worked solution

ŷ = 4.3. This is a fitted response, not necessarily the observed one.

03 / Fit the reverse response separately

Holding y fixed changes the errors being minimised.

The x-on-y fit for the same data is x̂ = −1/6 + (2/3)y.Worked example

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.

03 · Reverse prediction

Use x̂ = −1/6 + (2/3)y to predict x at y = 2.

Hint

Use the equation whose response is x.

Worked solution

x̂ = −1/6 + 4/3 = 7/6 ≈ 1.167.

04 · Why different?

Why need the reverse fit differ from an algebraic inverse?

Hint

Vertical and horizontal squared errors are different objectives.

Worked solution

The two fits optimise different response errors. Scatter around a line means the optimisation usually selects different lines.

04 / Separate two legitimate tasks

Solving a stated equation is not refitting data.

05 · Solve a target

A question explicitly asks which x makes the stated model prediction ŷ = 0.7 + 1.2x equal to 3. What is the answer?

Hint

This is an algebraic target on the stated line.

Worked solution

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.

06 · Only one fit supplied

Only a y-on-x equation is supplied. Does it determine the separately fitted x-on-y line in general?

Hint

Information about the scatter and both variables is missing.

Worked solution

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

Vertical and horizontal gaps tell different stories.

Watch: the response direction changes the residuals

Pause, replay or seek freely. The notes explain the same idea and stay in view.

07 · Mean point

Both fits use x̄ = 1.5 and ȳ = 2.5. Verify that both fitted lines pass through that point.

Hint

Substitute the relevant supplied coordinate in each.

Worked solution

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.

08 · Distance direction

When x is the response, which way is a residual drawn on the usual x-horizontal, y-vertical scatterplot?

Hint

Compare observed and predicted x at the same y.

Worked solution

Horizontally. The prediction direction can change without swapping the physical axes.

06 / Recognise the exact-line exception

A nonzero perfect relationship can be inverted consistently.

09 · Exact relationship

All pairs satisfy y = 2 + 3x exactly, with varying x. What is the reverse equation?

Hint

Solve the exact relationship.

Worked solution

x = (y − 2)/3. With zero scatter and nonzero gradient, both least-squares directions lie on the same geometric line.

10 · Constant y

All y values are 5 while x varies. Can the y-on-x constant fit be inverted to recover x from y?

Hint

One response value corresponds to several x values.

Worked solution

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

Do not choose the line merely by its appearance.

11 · Equation labels

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?

Hint

Choose the equation predicting the unknown from the known.

Worked solution

Use the fit predicting length from mass, then assess whether its range and context apply.

12 · Causal direction

Does choosing y-on-x regression prove x causes y?

Hint

Prediction direction is not causal identification.

Worked solution

No. It specifies which response errors are minimised and what is being predicted, not a causal mechanism.

08 / Choose, substitute and qualify

Keep prediction direction separate from inverse algebra.

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