Skip to content
IGCSE·Tuition
Tools

Graph-model and residual explorer

A line through your points can look convincing until the residuals show a pattern that the line missed.

On this page
  1. How do you use it?
  2. How do you read the result?
  3. Example walk-through
  4. What are the assumptions and limits?
  5. Which lessons explain the ideas behind it?

Everything you enter stays on this device. Nothing is sent to us.

The graph-model and residual explorer fits a simple model to a small data set and then shows the residuals, so you can judge how well the model describes the data. It also tells you whether a prediction is an interpolation or an extrapolation.

You can choose a straight line, a quadratic, an exponential or a direct proportion.

How do you use it?

  1. In Data points, write one point per line as x, y. Use between 3 and 30 points.
  2. Choose a Model: straight line y = mx + c, quadratic y = ax² + bx + c, exponential y = a × bˣ, or direct proportion y = kx.
  3. Enter Predict y at x = for the value you want to estimate.
  4. Press Fit the model. Press Reset to return to the sample.

How do you read the result?

The first line is the fitted model with its parameters. The method is least squares, which picks the parameters that make the sum of squared residuals smallest.

The residual table lists each x, the actual y, the predicted y and the residual. A plus sign means the point is above the model. Below the table are the sum of squared residuals and R².

If all residuals are zero, the tool says the model passes exactly through every point. Otherwise it asks you to read the signs in order of x. A run such as − − + + + − suggests a curve the model missed, while mixed signs suggest a reasonable shape.

The prediction section states whether your x is inside the data range. The graph shows the points, the model and vertical residual lines.

Example walk-through

The sample points are (0, 1), (1, 3), (2, 5), (3, 7), (4, 9) with the straight line model. The fit is y = 2x + 1, every residual is 0 and R² is 1.

The prediction at x = 6 gives y = 13. Because 6 is outside the data range 0 to 4, the tool calls it an extrapolation and warns that it assumes the pattern continues.

Now change the data to (0, 1), (1, 3), (2, 4), (3, 7), (4, 9).

The line becomes y = 2x + 0.8 and the residuals are +0.2, +0.2, −0.8, +0.2, +0.2. They add to 0.

The sum of squared residuals is 0.8 and R² is about 0.98. The point (2, 4) is the one the line misses most.

For a different shape, use (0, 1), (1, 2), (2, 4), (3, 8), (4, 16). The straight line gives residuals of +2, −0.6, −2.2, −1.8 and +2.6, a curved sign pattern. Switch to exponential and the fit is y = 1 × 2^x with residuals at or extremely close to zero.

What are the assumptions and limits?

  • Only the four listed models are available. It is not a search through every possible curve.
  • A model describes the data you entered. It cannot promise what will happen later.
  • Exponential fits need every y to be positive, and quadratics need at least three different x values.
  • A good R² alone does not show the model is the right kind.

Which lessons explain the ideas behind it?

The wider topic is graphs and transformations, and the mixed practice set tests it.

For a teacher to check your reasoning, see online one-to-one Mathematics tuition or Physics tuition. Other tools are in the learning tools directory.

Questions people ask

What is a residual?

A residual is the actual y-value minus the y-value the model predicts at the same x. A positive residual means the point is above the model, and a negative one means it is below. Small residuals with no pattern suggest the model describes the data well.

Why is a prediction outside the data range less reliable?

Inside the range, the model is built from points on both sides. Outside it, you assume the pattern continues without evidence. The tool labels each prediction as interpolation or extrapolation so you can judge how far to trust it.

What does R² mean here?

R² is the share of the variation in y that the model accounts for, where 1 means a perfect fit. A high value does not show the model has the right shape. Always look at the residual pattern too.

Why does the exponential model reject some data?

It is fitted using the logarithm of y, and the logarithm of zero or a negative number is undefined. So every y must be positive. The residuals are still reported for y itself, not for ln(y).

Updated:

Your next step

If fitting a line is easy but judging whether it is the right model is not, a one-to-one teacher can go through your own data in a paid one-hour trial.

Paid one-hour trial at your assigned teacher’s confirmed rate, starting from RM80. Other fees, schedules and ongoing arrangements are confirmed directly with your teacher after the trial class.

Tuition is arranged with a parent or guardian. Send them this page on WhatsApp and they can enquire for you.

Parent or guardian? Enquire here

9,000+ students helped through our service