DoAssignment study guide

D2.4 · Display and analyse data to build a model

Learn to display and analyse data to build a model through clear examples and targeted practice.

Ontario Grade 9 Mathematics

Data

Ontario MTH1W – Strand D: Data Literacy | Expectation D2.4

Have you ever wondered whether studying more hours actually improves your test score, or whether a plant really does grow taller the longer you water it? Real-world questions like these involve two things changing at the same time. When we collect data on two variables and display them together, we can look for a pattern. That pattern becomes a model — a mathematical summary we can use to understand the situation and make predictions. In this lesson you will learn how to display two-variable data on a scatter plot, decide what kind of relationship the data shows, draw a line of best fit, write its equation, and use that equation to make sensible predictions. Every step will connect back to real data so the mathematics stays grounded in something you can picture.

What you will learn

  • Display a set of two-variable data on a scatter plot and describe the relationship shown.
  • Identify whether a linear or non-linear model best fits a data set and explain why.
  • Draw a line of best fit for data that shows a linear trend and write its equation in the form y = mx + b.
  • Use a model equation to make reasonable predictions and recognise the limits of those predictions.

Prerequisite Review: Graphing Points and the Equation y = mx + b

Before we start, let us quickly recall two ideas from Grade 8 that you will need throughout this lesson.
First, plotting a point. Every point on a graph has two coordinates written as an ordered pair (x, y). The first number tells you how far to move right along the horizontal axis (the x-axis), and the second number tells you how far to move up along the vertical axis (the y-axis). For example, the point (3, 7) sits 3 units right and 7 units up from the origin.
Second, the slope-intercept equation of a straight line: y=mx+by = mx + b. Here, mm is the slope — it tells you how steeply the line rises or falls. A positive mm means the line goes up as xx increases; a negative mm means it goes down. The value bb is the y-intercept — the point where the line crosses the y-axis, i.e. the value of yy when x=0x = 0. You do not need to derive this equation today; you just need to read it and use it.
y=mx+by = mx + b
  • An ordered pair (x, y) locates a point on a coordinate grid.
  • In y=mx+by = mx + b, the value mm is the slope and bb is the y-intercept.
  • A positive slope means the relationship increases; a negative slope means it decreases.

Scatter Plots: Displaying Two-Variable Data

A scatter plot is a graph that shows the relationship between two numerical variables. Each data point becomes one dot on the graph. One variable is placed on the x-axis (the independent variable — the one you control or measure first), and the other is placed on the y-axis (the dependent variable — the one that responds or is measured as an outcome).
Consider a small study where seven students recorded how many hours they spent studying for a quiz and the mark they received out of 20. Each student becomes one dot: their study time is the x-value and their quiz mark is the y-value. When all seven dots are plotted, you can step back and ask: is there a pattern? Do the dots slope upward, slope downward, curve, or show no pattern at all?
The overall pattern of dots in a scatter plot is called the trend or correlation. When the dots generally rise from left to right, we say there is a positive correlation — as x increases, y tends to increase too. When the dots fall from left to right, there is a negative correlation. When the dots show no clear direction, there is no correlation. The strength of the correlation tells you how tightly the dots follow the trend: a strong correlation means the dots cluster closely around a line or curve; a weak correlation means the dots are more spread out.
One more term to know: an outlier is a data point that sits far away from the general trend of the other points. Outliers can happen because of a measurement error or because one case is genuinely unusual. When you spot an outlier, note it but do not automatically delete it — first think about whether there is a real explanation.
Each plotted point=(xindependent,  ydependent)\text{Each plotted point} = (x_{\text{independent}},\; y_{\text{dependent}})
  • Each dot on a scatter plot represents one data point (x, y).
  • The x-axis holds the independent variable; the y-axis holds the dependent variable.
  • Positive correlation: dots rise left to right. Negative correlation: dots fall left to right.
  • Strong correlation: dots cluster tightly. Weak correlation: dots are more spread.
  • An outlier is a point that sits far from the general trend.

Choosing a Model: Linear vs. Non-Linear

Once your scatter plot is drawn, you analyse the shape of the trend to decide what kind of model fits best. In this course, you will work with two broad categories: linear models and non-linear models.
A linear model fits when the dots follow a roughly straight-line path. The relationship changes by approximately the same amount for each equal step in x. For example, if every extra hour of study raises the quiz mark by about 2 points, the relationship is linear.
A non-linear model fits when the dots follow a curved path. One common curve in Grade 9 data is a curve that rises quickly at first and then levels off — like how a plant grows fast when it is young and then slows down. Another curve rises slowly at first and then rises more and more steeply. The key visual test is simple: if you can imagine a straight line running through the middle of the dots, the data is linear. If a straight line would miss many dots and a curve would do much better, the data is non-linear.
For this lesson we focus on the linear case, because that is the model you will build and use. When you see a scatter plot where the dots follow a curved pattern, you identify it as non-linear and note that a straight-line model would not be appropriate — that is an important part of the analysis even when you do not build the curved model yourself.
Linear trend⇒use y=mx+b\text{Linear trend} \Rightarrow \text{use } y = mx + b
  • A linear model is appropriate when the scatter plot shows a roughly straight-line trend.
  • A non-linear model is appropriate when the scatter plot shows a curved trend.
  • The visual shape of the scatter plot guides your model choice.
  • Choosing the wrong model type leads to poor predictions.

Drawing a Line of Best Fit and Writing Its Equation

When the data shows a linear trend, you draw a line of best fit — a straight line placed so that it runs through the middle of the data cloud. The goal is to have roughly the same number of dots above the line as below it, with the line as close as possible to all the dots. This line is not required to pass through any specific data point, and it will often pass through none of them at all.
To draw the line, use a ruler. Imagine the data cloud as a narrow oval shape and draw the line along the long axis of that oval. Once your line is drawn, you can find two points that the line passes through — read their coordinates from the grid — and use them to calculate the slope.
Slope is calculated with the rise-over-run formula. If your line passes through two points (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2), the slope is m=y2−y1x2−x1m = \frac{y_2 - y_1}{x_2 - x_1}. Choose two points that are far apart on the line to keep your calculation as accurate as possible, and choose points whose coordinates are easy to read from the grid.
Once you have mm, substitute one of your two points into y=mx+by = mx + b and solve for bb. That gives you the full equation of your line of best fit. This equation is your model — it summarises the relationship in the data with one compact rule.
A brief note on reading the slope in context: if the slope of your study-time model turns out to be m=2m = 2, it means that for each additional hour of study, the predicted quiz mark increases by 2 points. Always interpret mm in the context of the problem; the number on its own is less meaningful than the story it tells.
m=y2−y1x2−x1m = \frac{y_2 - y_1}{x_2 - x_1}
  • A line of best fit runs through the middle of the data cloud with roughly equal dots above and below.
  • The line does not need to pass through any actual data point.
  • Slope formula: m=y2−y1x2−x1m = \frac{y_2 - y_1}{x_2 - x_1} using two points on the line.
  • Substitute one point and the slope into y=mx+by = mx + b to find bb.
  • Interpret the slope and intercept in the context of the real situation.

Using the Model to Make Predictions

Once you have the equation of your line of best fit, you can use it to make predictions. There are two types of prediction. Interpolation means predicting a y-value for an x-value that falls inside the range of your original data. Interpolation is generally reliable because you are staying within the region the data already covers. Extrapolation means predicting a y-value for an x-value that falls outside the range of your data. Extrapolation is less reliable — the pattern seen in your data may not continue forever.
For example, if your data covers study times from 1 hour to 6 hours, predicting the mark for 4 hours of study is interpolation (safe). Predicting the mark for 15 hours of study is extrapolation — be cautious, because no one in your data studied that long, and the linear pattern may not hold.
To make a prediction, substitute your chosen x-value into the model equation and calculate y. Always round your answer to a level of precision that makes sense in context. A predicted quiz mark of 14.37 out of 20 should be reported as approximately 14 out of 20, since quiz marks are whole numbers.
Finally, remember that a model is an approximation. Real data always has some scatter. Your model gives a reasonable estimate, not a guaranteed exact answer.
y^=mx+b\hat{y} = mx + b
  • Interpolation: predicting within the data range — more reliable.
  • Extrapolation: predicting outside the data range — less reliable.
  • Substitute the x-value into the model equation to find the predicted y-value.
  • Round predictions to a precision that matches the real-world context.
  • A model is an approximation; predictions carry some uncertainty.

Study Hours and Test Score Data

Hours Studied (x)Test Score (y)Point on Graph
125(1, 25)
232(2, 32)
235(2, 35)
344(3, 44)
450(4, 50)
455(4, 55)
562(5, 62)
670(6, 70)

Correlation Types at a Glance

Correlation TypeWhat the Scatter Plot Looks LikeExample Context
Positive (linear)Dots rise from left to right along a straight-line pathMore study hours → higher test score
Negative (linear)Dots fall from left to right along a straight-line pathMore absences → lower grade
Non-linearDots follow a curved path (not a straight line)Plant height over many months levels off
No correlationDots scattered randomly with no clear directionShoe size vs. test score

Worked example

Building and Using a Linear Model from Study-Time Data

A teacher recorded the number of hours eight students spent studying for a unit test (out of 10) and their test scores. The data are shown below.

Hours studied (x): 1, 2, 2, 3, 4, 4, 5, 6
Test score (y): 25, 32, 35, 44, 50, 55, 62, 70

(a) Describe the correlation shown in a scatter plot of this data.
(b) A line of best fit drawn through the data passes through the points (1, 27) and (6, 69). Find the equation of the line of best fit.
(c) Use your equation to predict the test score of a student who studied for 3.5 hours.
(d) Interpret the slope in the context of this problem.
  1. Step 1 – Describe the correlation
    Look at the direction of the data cloud. As hours studied increase from 1 to 6, test scores increase from the mid-20s to 70. The dots rise from left to right, so the correlation is positive. The dots follow a fairly narrow band, so the correlation is strong. A straight line looks like a good model — this data is linear.
    Positive, strong, linear correlation\text{Positive, strong, linear correlation}
  2. Step 2 – Identify two points on the line of best fit
    We are told the line passes through (1, 27) and (6, 69). Label them so the slope formula is clear.
    (x1,y1)=(1,  27),(x2,y2)=(6,  69)(x_1, y_1) = (1,\; 27), \quad (x_2, y_2) = (6,\; 69)
  3. Step 3 – Calculate the slope
    Apply the rise-over-run formula. The rise is the change in y and the run is the change in x. Divide to get the slope.
    m=69−276−1=425=8.4m = \frac{69 - 27}{6 - 1} = \frac{42}{5} = 8.4
  4. Step 4 – Find the y-intercept
    Substitute the slope m = 8.4 and the point (1, 27) into y = mx + b. Then solve for b by isolating it on one side.
    27=8.4(1)+b  ⟹  b=27−8.4=18.627 = 8.4(1) + b \implies b = 27 - 8.4 = 18.6
  5. Step 5 – Write the equation of the line of best fit
    Replace m and b with the values you found to write the complete model equation.
    y=8.4x+18.6y = 8.4x + 18.6
  6. Step 6 – Predict the score for 3.5 hours of study
    Substitute x = 3.5 into the equation. The value 3.5 lies between 1 and 6, so this is interpolation — a reliable prediction.
    y=8.4(3.5)+18.6=29.4+18.6=48y = 8.4(3.5) + 18.6 = 29.4 + 18.6 = 48
  7. Step 7 – Interpret the slope
    The slope is 8.4. In this context, x is measured in hours and y is measured in test-score points. The slope tells us how many score points are gained per extra hour of study.
    m = 8.4 points per hour of study
Answer: (a) Strong, positive, linear correlation. (b) The equation of the line of best fit is y=8.4x+18.6y = 8.4x + 18.6. (c) The predicted score for 3.5 hours of study is 48 out of 100. (d) The slope of 8.4 means that for each additional hour of study, a student's predicted test score increases by about 8.4 points.
Check: Verify using the second point (6, 69): y=8.4(6)+18.6=50.4+18.6=69y = 8.4(6) + 18.6 = 50.4 + 18.6 = 69. This matches exactly, confirming the equation is correct.

Common mistakes and how to avoid them

Drawing the line of best fit so it connects the first and last data points instead of running through the middle of the data cloud.
Correction: The line of best fit should have roughly equal numbers of data points above and below it across the whole plot, not just connect the two end points.
Calculating slope using two actual data points instead of two points that lie on the drawn line of best fit.
Correction: Always read off two points that sit exactly on the line you drew. Using raw data points that are not on the line gives the wrong slope for your model.
Forgetting to find b after finding m, and writing the equation as y = mx with b missing or assumed to be 0.
Correction: Always substitute m and one point on the line into y = mx + b and solve for b. The y-intercept is rarely 0 unless the line visibly passes through the origin.
Treating a prediction made by extrapolation (outside the data range) as just as reliable as one made by interpolation (inside the data range).
Correction: Extrapolation is less reliable because the pattern seen in the data may not continue beyond the range that was measured. Always state when a prediction involves extrapolation.
Describing a curved scatter plot as having a 'linear' correlation simply because the dots rise from left to right.
Correction: A positive trend does not automatically mean the relationship is linear. If the dots follow a curve, the model is non-linear, even if the overall direction is upward.

Lesson summary

  • A scatter plot displays two-variable data as dots on a coordinate grid, with the independent variable on the x-axis and the dependent variable on the y-axis.
  • The overall pattern of a scatter plot is called the correlation; it can be positive, negative, or absent, and linear or non-linear.
  • When the scatter plot shows a linear trend, a line of best fit is drawn through the middle of the data cloud with roughly equal points above and below.
  • The equation of the line of best fit is written in the form y=mx+by = mx + b, where mm is found using the slope formula m=y2−y1x2−x1m = \frac{y_2 - y_1}{x_2 - x_1} and bb is found by substituting one point on the line.
  • The slope mm and intercept bb should always be interpreted in the context of the real-world situation, not just stated as numbers.
  • Predictions within the data range (interpolation) are more reliable than predictions outside the data range (extrapolation); the model is always an approximation.

Check your understanding

Question 1

A scatter plot shows that as the outdoor temperature increases, the number of hot drinks sold at a café decreases. What type of correlation does this describe?
  1. Strong positive linear correlation
  2. Weak positive linear correlation
  3. Negative linear correlation
  4. No correlation
Show answer and explanation
Negative linear correlation
As temperature (x) increases, drinks sold (y) decreases — the dots fall from left to right. That is a negative correlation. Whether it is strong or weak depends on how closely the dots cluster, but the direction is clearly negative, not positive or absent.

Question 2

A line of best fit passes through the points (2, 10) and (8, 34). What is the slope of this line?
  1. m=2m = 2
  2. m=4m = 4
  3. m=6m = 6
  4. m=3m = 3
Show answer and explanation
m=4m = 4
Apply the slope formula: m=34−108−2=246=4m = \frac{34 - 10}{8 - 2} = \frac{24}{6} = 4. The slope is 4, meaning y increases by 4 for every 1-unit increase in x.

Question 3

A line of best fit has equation y=3x+5y = 3x + 5. A student uses it to predict y when x=4x = 4. What is the predicted value?
  1. y=12y = 12
  2. y=17y = 17
  3. y=22y = 22
  4. y=15y = 15
Show answer and explanation
y=17y = 17
Substitute x=4x = 4: y=3(4)+5=12+5=17y = 3(4) + 5 = 12 + 5 = 17. The predicted value is 17. Option 12 forgets to add b; option 22 doubles 11 incorrectly; option 15 uses 3 + 4 + 5 + 3 incorrectly.

Question 4

A researcher collected data on the age of a tree (in years) and its height (in metres) for trees aged 2 to 12 years. She uses her linear model to estimate the height of a 25-year-old tree. Which statement best describes this prediction?
  1. It is an interpolation and is very reliable.
  2. It is an extrapolation and should be treated with caution.
  3. It is an interpolation and should be treated with caution.
  4. It is an extrapolation and is very reliable.
Show answer and explanation
It is an extrapolation and should be treated with caution.
The data covers ages 2 to 12. Predicting for age 25 goes beyond that range, so it is extrapolation. Extrapolation is less reliable because the pattern seen in the data may not continue outside the measured range.

Key terms

Scatter plot
A graph that displays pairs of numerical data as dots on a coordinate grid, used to look for a relationship between two variables.
Independent variable
The variable placed on the x-axis; the one that is controlled or measured first and is used to explain or predict the other variable.
Dependent variable
The variable placed on the y-axis; the one whose value depends on or responds to the independent variable.
Correlation
The overall direction and strength of the relationship shown by the dots in a scatter plot. It can be positive, negative, or absent, and linear or non-linear.
Line of best fit
A straight line drawn through the middle of a linear data cloud on a scatter plot, with roughly equal numbers of dots above and below it.
Slope (m)
A number that describes how steeply a line rises or falls. Calculated as rise divided by run: the change in y divided by the change in x between two points on the line.
Interpolation
Using a model to predict a value for an x-value that falls inside the range of the original data. Generally considered more reliable than extrapolation.
Extrapolation
Using a model to predict a value for an x-value that falls outside the range of the original data. Less reliable because the pattern may not continue beyond the measured range.

Continue through MTH1W

View the complete MTH1W Ontario Grade 9 Mathematics curriculum and lessons

Use the free MTH1W test and exam review guide

About this lesson and its review

Published by DoAssignment. This reviewed lesson follows Ontario Grade 9 Mathematics (MTH1W), expectation D2.4. It is a study resource, not an official curriculum publication.

Before publication, content is checked for structure, mathematical or chemical notation, calculations, course boundaries, and readability. Errors can still occur, so corrections are welcomed.

Official curriculum reference

Report a correction or ask a question