General Mathematics · Unit 3 · Topic 2

Bivariate data analysis 2

Fit a least-squares line with technology or from summary statistics, interpret its slope and intercept, make predictions, judge them with residual plots and the dangers of extrapolation, and tell association from causation.

  • 7 lessons
  • 1 h 55 min of lessons
  • 13 worked examples
  • 12 hours in the syllabus
0 of 7

Start here

The least-squares line

Lesson 1 of 7 · 16 min

Start the topic

Lessons

7
  1. The least-squares line (up next)

    Understand what makes the least-squares line the line of best fit, and use technology to fit it to raw data and write it as y=mx+cy = mx + c with the variable names.

  2. The line from summary statistics

    Find the least-squares line from r, the two standard deviations and the two means using the formula-book rules, and work backwards from the slope to r.

  3. Interpreting the slope and intercept

    Say what the slope and y-intercept of a least-squares line mean in context, with units, and decide when the intercept has no practical meaning.

  4. Predictions, interpolation and extrapolation

    Use the least-squares line to make predictions, tell interpolation from extrapolation, and explain why predictions outside the data can be unreliable.

  5. Residuals and residual plots

    Calculate residuals, construct a residual plot, and use its pattern to decide whether a linear model is appropriate — even when r is close to 1.

  6. Association and causation

    Explain why an association between two variables, categorical or numerical, does not by itself show cause, and identify coincidence or another variable as possible explanations.

  7. Solving problems with bivariate data

    Put the whole topic together to solve a practical problem — display and describe an association, fit and check a linear model, predict, and draw a conclusion that respects association versus causation.

  8. Topic quiz

    Ten questions across the topic, from foundation to complex unfamiliar. Your results feed your mastery.

About this topic

In Bivariate data analysis 1 you described an association between two numerical variables and measured its strength with rr and R2R^2. Now you put a line through it. The least-squares line y=mx+cy = mx + c turns a scatterplot into a model you can use: how many iced coffees a café should expect to sell on a 31 °C day, what a seven-year-old Corolla is likely to be worth, how much power a rooftop solar system makes in nine hours of sunshine.

You'll fit the line with technology (your scientific calculator's statistics mode or a spreadsheet) and from summary statistics with m=rsysxm = r\frac{s_y}{s_x} and c=yˉ−mxˉc = \bar{y} - m\bar{x}, interpret its slope and intercept in context, and use it to predict. Then you'll check whether the line deserves to be trusted: a residual plot shows whether a linear model suits the data, and the difference between interpolation and extrapolation shows when a prediction is reliable.

The topic ends with the most important idea in statistics: an association between two variables does not mean one causes the other. You'll learn to spot coincidence and the influence of another variable, and to solve practical problems by analysing an association from start to finish.

Before you start

Builds on Bivariate data analysis 1 and Univariate data analysis 1.

  • Describing a scatterplot by its direction, form and strength, and calculating rr and R2R^2 with technology, from Bivariate data analysis 1.
  • Identifying the explanatory and response variables, and putting the explanatory variable on the horizontal axis.
  • The mean xˉ\bar{x} and sample standard deviation sxs_x of a data set, found with your calculator's statistics mode.
  • The gradient and yy-intercept of a straight line y=mx+cy = mx + c, and substituting into a formula.
  • Comparing percentages in a two-way frequency table.

What QCAA says you need to know10 dot points

Fitting a linear model to numerical data

6 hours

Association and causation

6 hours

Subject matter from the General Mathematics General senior syllabus 2025 v1.3 (opens in a new tab), CC BY 4.0 © State of Queensland (QCAA).

The focus areas you can practise on their own. Each one maps to dot points above.

  • Fitting a least-squares line

    Use your calculator's statistics mode or a spreadsheet to fit y = mx + c to raw data, and write the equation in terms of the variables.

    Practise
  • The line from summary statistics

    Find the slope and intercept from r, the standard deviations and the means, and work backwards from the slope to r.

    Practise
  • Interpreting slope and intercept

    Say what the slope and y-intercept mean in context, with units, and decide whether the intercept is meaningful.

    Practise
  • Making predictions

    Substitute into the least-squares line to predict the response, or solve it to find the explanatory value that gives a target.

    Practise
  • Interpolation and extrapolation

    Decide whether a prediction is interpolation or extrapolation, and explain why extrapolation can be unreliable.

    Practise
  • Calculating residuals

    Find a residual as the actual value minus the predicted value, and construct a residual plot.

    Practise
  • Reading residual plots

    Use the pattern in a residual plot to decide whether a linear model is appropriate for the data.

    Practise
  • Association and causation

    Explain why an association, however strong, does not on its own show that one variable causes the other.

    Practise
  • Non-causal explanations

    Identify coincidence or the influence of another variable as possible explanations for an association, and communicate them in context.

    Practise
  • Solving bivariate problems

    Analyse an association from start to finish — display, describe, model, check, predict and conclude — and evaluate claims.

    Practise

Worked examples13

All 13

Common mistakes

Swapping the variables

The explanatory variable is xx and the response is yy. Enter them into your calculator that way round — swapping them gives a different line, not just a rearranged one.

Leaving the equation in x and y

An equation such as y=3.23x−21.86y = 3.23x - 21.86 earns full marks only when you say what xx and yy are. Write it with the variable names: coffees sold=3.23×temperature−21.86\text{coffees sold} = 3.23 \times \text{temperature} - 21.86.

Interpreting the slope without units or context

"The slope is 3.23" is not an interpretation. Say "for each 1 °C increase in temperature, the number of iced coffees sold is predicted to increase by about 3.23".

Forcing a meaning onto the intercept

The intercept is a prediction at x=0x = 0. When 0 is far outside the data, or makes no sense (a car with no age, a wheat crop with no rain), say the intercept has no practical meaning rather than inventing one.

Getting the residual the wrong way round

Residual == actual −- predicted. A point above the line has a positive residual. Predicted minus actual gives every sign backwards.

Trusting r instead of the residual plot

rr close to 1 does not show the association is linear. A curved pattern can have r=0.99r = 0.99. Only the residual plot (or the scatterplot) tells you about form.

Calling every prediction reliable

A prediction is reliable when the association is strong and linear, the residual plot shows no pattern and the prediction is an interpolation. Extrapolation assumes the trend continues, which it may not.

Saying correlation proves causation

A strong association, even with r=0.98r = 0.98, never proves cause on its own. Always consider coincidence and a confounding variable before you mention cause.

Exam tips

  1. Write the least-squares line with the variable names and the coefficients rounded as the question asks (two decimal places is common when it doesn't say). Keep unrounded values in the calculator for predictions.

  2. Interpret the slope with the template: "For each one-unit increase in [explanatory], [response] is predicted to increase (or decrease) by [|m|] [units]."

  3. Interpret the intercept with the template: "When [explanatory] is 0, [response] is predicted to be [c] [units]" — then say whether that makes sense in context.

  4. When asked about the reliability of a prediction, address three things: the strength of the association (rr or R2R^2), the residual plot (random scatter or a pattern), and interpolation or extrapolation.

  5. For a residual plot, say what you see ("the residuals show a clear curved pattern") and what it means ("so a linear model is not appropriate"). One without the other loses a mark.

  6. When a question asks whether one variable causes another, the safe answer is that association does not imply causation — then name a specific confounding variable or coincidence in context and explain how it could produce the association.

  7. Show the substitution when you make a prediction, e.g. 3.23×31−21.86=78.273.23 \times 31 - 21.86 = 78.27, then round to a sensible answer in context (a whole number of coffees).

Where this shows up

  • Businesses forecast sales from weather, prices or advertising spending with least-squares lines.

  • Car dealers and insurers estimate a used car's value from its age and kilometres.

  • Agronomists relate rainfall and fertiliser to crop yields on the Darling Downs and in the Wimmera.

  • Energy retailers estimate rooftop solar output from hours of sunshine.

  • Health researchers separate genuine causes from confounding variables before recommending treatments, which is why medical trials are randomised.

  • Sports scientists model performance against training load, and warn against extrapolating world-record trends.

Save your progress with a free account