Scatter Plot Maker

Plot your points and get a line of best fit with its equation and correlation coefficient.

Scatter plot
Chart

What this tool does

A scatter plot shows the relationship between two variables by plotting one against the other. A line of best fit summarises that relationship, and the correlation coefficient r measures how closely the points follow it - from -1 through 0 to +1.

Plots one or more series and fits a least-squares line to each, giving the equation and the correlation coefficient rather than just drawing a line.

Names the strength of each correlation in words, since interpreting r is the step that actually matters.

How to use it

  1. Enter points one per line as x, y.
  2. Put a name on its own line to start a second series.
  3. Read the equation, r and r squared beneath the options - r squared is the share of the variation in y that the line accounts for.
  4. Enter an x value to read a prediction off the fitted line. If that x falls outside your data, the tool says so rather than presenting an extrapolation as evidence.
  5. Export as SVG or PNG.

Why use this chart maker

Scatter plots reveal relationships, and the line of best fit and the correlation make them meaningful. Calculating both by hand is slow and error-prone.

Why we built it

We built the scatter plot maker to give the equation of the line of best fit and the correlation coefficient, not just the dots. Check the numbers with the correlation calculator and show a third variable on the bubble chart maker.

Related tools worth a look: the Radar Chart Maker.

Who this tool is for

  • Students and scientists plotting two variables
  • Analysts looking for a relationship
  • Teachers showing correlation

When to use it

  • Science and statistics projects.
  • Checking if two measures are related.
  • Reports needing a trend line.
  • Teaching correlation.

Reading the correlation coefficient

The coefficient r runs from -1 to +1 and measures only how closely the points cluster around a straight line.

Interpreting r
Value of rMeans
+1Perfect positive - every point on an upward line
+0.7 to +0.9Strong positive
+0.3 to +0.5Weak positive
Around 0No linear relationship
-0.7 to -0.9Strong negative
-1Perfect negative - every point on a downward line

The sign tells you direction and the magnitude tells you strength. A value of -0.85 describes just as strong a relationship as +0.85, running the other way.

r near zero does not mean no relationship. It means no straight-line relationship. A perfect parabola gives r close to zero, which is why you always look at the plot as well as the number.

Correlation is not causation

This is repeated so often it has stopped landing, so it is worth stating concretely. Two variables can correlate strongly for at least four reasons, and only one of them is cause.

  • X causes Y - the case people assume.
  • Y causes X - the same data, the arrow reversed. Nothing in the plot distinguishes them.
  • Something else causes both. Ice cream sales and drowning correlate because both rise in summer.
  • Coincidence. With enough variables, strong correlations appear by chance alone.

A scatter plot can establish that a relationship exists. It cannot establish which way it runs or why, and no statistic computed from it can either.

The line of best fit

This is a least-squares regression: the line that minimises the total squared vertical distance from the points. Squaring is what makes it unique and computable, and also what makes it sensitive to outliers.

The equation is given as y = mx + c, where m is the slope - how much y changes per unit of x - and c is where the line crosses the y axis.

Watch for two things. A single distant point can swing the line considerably, so check whether it belongs in the data. And extending the line beyond your observed range is extrapolation, which assumes the relationship continues when nothing in the data says it does.

What you give it, and what you get back

Input and output of Scatter Plot Maker
ItemDetails
Inputx and y values per point, with optional series.
OutputPoints, a least-squares line, the equation and r with its strength in words.
ExportSave the chart.

Issues you may run into

Common problems with Scatter Plot Maker
What you seeWhy it happensWhat to do
r is low for a clear curveOnly linear fits are used.Transform or fit a curve elsewhere.
One point moves the lineOutliers pull least squares.Check or remove outliers.
A row is skippedIt does not match the expected format.Check the message listing unreadable lines and fix them.

Assumptions and limitations

Frequently asked questions

What does a scatter plot show?

The relationship between two variables, by plotting one against the other. The pattern in the cloud of points tells you whether they move together, move oppositely, or show no relationship at all.

How do you draw a line of best fit?

By least squares - finding the line that minimises the total squared vertical distance from every point. Drawing one by eye is a reasonable approximation, but the calculated line is reproducible and unique.

What is a correlation coefficient?

A number from -1 to +1 measuring how closely points follow a straight line. The sign gives direction and the magnitude gives strength, so -0.85 is exactly as strong as +0.85 in the opposite direction.

What is the difference between correlation and causation?

Correlation says two variables move together. Causation says one produces the other. They can correlate because X causes Y, because Y causes X, because something else causes both, or by chance - and the plot cannot distinguish these.

What is a positive correlation?

One where both variables increase together, producing points that trend upward left to right. A negative correlation is the reverse: as one rises the other falls.

How do I plot two groups on one chart?

Put a name on its own line, then the points for that group beneath it, then another name for the next group. Each gets its own colour and its own line of best fit.

Further reading

How to pick the right chart for your data, not just a pretty one — A pie chart and a bar chart can show the same data — and one of them is usually wrong for it. The right chart depends on the question, not on looks.