The closer the points sit to a line, the stronger the correlation
See what the correlation coefficient r means from how scattered a scatter plot is, and fit a line to data yourself to find out what a regression line actually minimizes.
When you want to know if there's some relationship between two variables, plotting the points on a scatter plot lets you see it at a glance. If the points cluster tightly along a line, the relationship is strong; if they're scattered all over, the relationship is weak.
A number that represents the strength of this relationship is the correlation coefficient r. r always falls between −1 and 1 — the closer to 1, the stronger the positive correlation; the closer to −1, the stronger the negative correlation; and the closer to 0, the weaker the relationship.
A regression line is the line that best represents a set of scattered points. It's found by choosing the line that minimizes the sum of the squared distances (residuals) between each point and the line — this method is called the least squares method.
Use the slider to change the strength of the relationship between two variables. The closer the points cluster along a line, the closer |r| gets to 1; the more scattered they are, the closer it gets to 0. If the trend slopes up to the right, that's a positive correlation; down to the right is negative.
Relationship strength (target)0.7
Actual calculated correlation coefficient r
This is a scatter plot of study hours vs. test score. Use the slope and intercept sliders to move the line yourself, and find the line that minimizes the sum of squared distances (residuals) between the points and the line — the SSE.