Statistics

Scatter Graph Calculator

Enter pairs of data to plot a scatter graph, describe the correlation, find the line of best fit and estimate new values. The working explains interpolation versus extrapolation, just as GCSE questions ask.

Correlation

Type of correlation

Strong positive correlation

Line of best fit

y = 6.0595x + 29.1071

Estimate at x = 5.5

62.4345

020406080012345678x

How it works

  1. Plot the points

    Plot each (x, y) pair: (1, 35), (2, 42), (3, 50), (4, 48), (5, 61), (6, 66), (7, 70), (8, 79).

  2. Describe the correlation

    r=0.986117r = 0.986117

    Strong positive correlation: as x increases, y tends to increase. The correlation coefficient r is 0.9861 (closer to 1 means stronger).

    Result:Strong positive correlation
  3. Draw the line of best fit

    (xˉ,yˉ)=(4.5,56.375)(\bar{x}, \bar{y}) = (4.5, 56.375)

    A good line of best fit passes through the mean point (4.5, 56.375) with roughly the same number of points either side. The least-squares line is y = 6.059524x + 29.107143.

    Result:y = 6.059524x + 29.107143
  4. Estimate y when x = 5.5

    y=6.059524×5.5+29.107143=62.434524y = 6.059524 \times 5.5 + 29.107143 = 62.434524

    5.5 is inside the range of the data, so this is interpolation and the estimate is reasonably reliable.

    Result:≈ 62.434524

Line of best fit

y=mx+cthrough (xˉ,yˉ)y = mx + c \quad \text{through } (\bar{x}, \bar{y})
mmGradient of the line of best fit
(x̄, ȳ)The mean point — a good line passes through it
rrCorrelation coefficient, from −1 to 1

Example substitution

x:1…5,  y:2,4,5,4,5⇒y=0.6x+2.2x: 1\ldots5, \; y: 2, 4, 5, 4, 5 \Rightarrow y = 0.6x + 2.2

Positive correlation: as x increases, y tends to increase.

Worked examples

Describe the correlation between hours revised (1, 2, 3, 4, 5) and marks (2, 4, 5, 4, 5)

  1. 1
    Pattern: Marks tend to rise with hours
  2. 2
    Line of best fit: y = 0.6x + 2.2
Answer: Positive correlation

Using y = 0.6x + 2.2, estimate y when x = 6

  1. 1
    Substitute: 0.6 × 6 + 2.2
  2. 2
    Check range: 6 is outside 1–5: extrapolation
Answer: 5.8 (less reliable)

Frequently asked questions

What is a scatter graph?+

A graph that plots pairs of data as points to show whether two variables are related, such as hours revised and test score.

What are the types of correlation?+

Positive (as one goes up, so does the other), negative (as one goes up, the other goes down) and no correlation. Correlation can be strong or weak depending on how close the points are to a straight line.

How do you draw a line of best fit?+

Draw a straight line through the middle of the points, with roughly the same number above and below it. A good line passes through the mean point (x̄, ȳ).

What is the difference between interpolation and extrapolation?+

Interpolation is estimating inside the range of the data — usually reliable. Extrapolation is estimating outside the range — less reliable because the pattern may not continue.

Does correlation mean one thing causes the other?+

No. Two things can be correlated without one causing the other — both might be caused by something else.

Related calculators