Correlation: Definition, Method and Examples

MathPublished

Correlation: Definition, Method and Examples

Correlation describes how two variables tend to vary together. A positive correlation rises together, a negative correlation moves in opposite directions, and no linear correlation shows no clear straight-line pattern. Understanding these relationships is essential for analyzing data, though correlation does not by itself prove cause and effect.

A scatter plot showing an upward trend where the vertical variable increases as the horizontal variable increases.

What is correlation?

Correlation is a statistical measure that describes the relationship between two sets of data. It shows how strongly the variables are linked and in what direction they move together.


The word correlation is formed from the prefix co-, meaning together, and relation, meaning a connection.


We often graph paired data on scatter plots to visualize the relationship. The pattern the points form on the coordinate plane visually reveals the underlying correlation between the variables.

Recognise positive negative and no correlation

When interpreting data graphs, looking at the overall direction of the points determines the type of correlation.

  • Positive correlation: The values increase together. As the xx-values get larger, the yy-values also get larger. The points rise from left to right.
  • Negative correlation: The values move in opposite directions. As the xx-values get larger, the yy-values get smaller. The points fall from left to right.
  • No correlation: There is no visible straight-line relationship. The points are scattered randomly across the graph, meaning the variables are not linearly linked.

Three scatter plots side by side showing positive correlation rising to the right, negative correlation falling to the right, and no correlation with scattered points.

Describe strength and outliers

The strength of a correlation is determined by how closely the data points group together along a specific path.


When the points are tightly packed around the line of best fit, the correlation is strong. If the points are widely scattered but still show a general direction, the correlation is weak.


The correlation coefficient, denoted by the letter rr, measures this strength exactly on a scale from −1-1 to 11:

  • r=1r = 1 is a perfect positive correlation.
  • r=−1r = -1 is a perfect negative correlation.
  • r=0r = 0 indicates no linear correlation at all.


An outlier is a single data point that lies far away from the main group. Outliers can heavily influence the calculation, sometimes making a strong correlation appear much weaker or causing a weak correlation to appear artificially strong.

Two scatter plots showing a strong positive linear trend. The second plot contains a single outlier point located far away from the straight line path.

Separate correlation from causation

A high correlation means two variables follow a clear pattern together. It does not mean one variable causes the other to change.


This leads to the common mathematical rule: correlation is not causation. Proper data collection and experimental design are needed to prove a direct cause.


When a strong correlation exists, several different situations are possible:

  • The first variable causes the second.
  • The second variable causes the first.
  • A completely different outside factor causes both to change.
  • The connection is a complete coincidence.

Always look for hidden factors before assuming cause and effect.


For example, a town might find a strong positive correlation between umbrella sales and traffic accidents. Buying an umbrella does not cause a crash. Instead, a third factor—heavy rain—causes both umbrella sales and accidents to increase.

Know the limits of a correlation value

Correlation calculations only measure straight-line relationships. They cannot recognize curves or changing trends.


For example, a machine's efficiency might peak at a moderate temperature and drop sharply if it gets too hot or too cold. This creates an inverted U-curve on a graph. The standard linear correlation value for a perfect U-curve calculates to zero, suggesting no correlation. However, the variables are clearly linked by a strong curved relationship.


A scatter plot showing an inverted U-curve pattern. The points follow a clear arch path, yet a linear correlation coefficient would calculate a value of zero.


Always look at the visual graph rather than relying solely on the correlation value. Additionally, be cautious when predicting future events using interpolation and extrapolation, as a linear trend may not continue indefinitely.

Calculate the correlation coefficient

The correlation coefficient, often called Pearson's correlation, gives an exact numerical value to the linear relationship between variables.


It is calculated by comparing how far each data point deviates from the mean.


Method:

  1. Find the mean of the xx values and the mean of the yy values.
  2. Subtract the mean from each individual value to find the deviations.
  3. Multiply each xx deviation by its corresponding yy deviation, and square every deviation.
  4. Sum all the products and sum the squares.
  5. Divide the sum of the products by the square root of the multiplied squared sums.

While software typically handles this calculation, knowing these steps shows that the coefficient is based entirely on how the data is grouped around the mean.

Worked examples

These examples show how to interpret data relationships and correlation values.


Example 1: Identifying correlation direction


Question: Describe the correlation shown in the scatter plot below.


A scatter plot comparing age and price. The data points form a distinct downward path from left to right.


Method:

  1. Observe the trend of the data points from left to right.
  2. Note the grouping of the points.

Answer: The points are packed closely together and slope downward to the right, showing a strong negative correlation.


Check: As the age on the horizontal axis increases, the price on the vertical axis consistently decreases.


Example 2: Analyzing a data relationship


Question: A study finds a strong positive correlation between the number of winter coats sold and the number of snow shovels bought in a region. Does buying a winter coat cause someone to buy a snow shovel?


Method:

  1. Identify the two variables being compared.
  2. Consider whether a third, unmeasured variable might influence both.

Answer: No. Buying a winter coat does not cause the purchase of a snow shovel. Both are driven by a third factor: cold, snowy winter weather.


Example 3: Interpreting the coefficient


Question: A researcher calculates a correlation coefficient of r=0r = 0 for a set of data comparing a machine's temperature and its output efficiency. The researcher concludes there is no relationship at all between the two variables. Is this conclusion correct?


Method:

  1. Recall that the linear correlation coefficient only measures straight-line trends.
  2. A value of zero means there is no linear trend, but not necessarily no relationship.

Answer: No. The coefficient r=0r = 0 simply means there is no linear correlation. The variables could still have a strong non-linear or curved relationship.

Common mistakes

  • Confusing correlation with causation: Just because two variables follow the same pattern does not mean one causes the other. A hidden third variable might be driving both.
  • Judging strength by steepness: The correlation coefficient measures how tightly the points group together in a line, not how steep the line is. A flat but slightly rising line can have a perfect correlation of 11 if all points sit exactly on it.
  • Assuming zero correlation means no relationship: A value of r=0r = 0 only guarantees that there is no straight-line relationship. The data might still follow a predictable curve.

Frequently asked questions

Can a correlation value be greater than 11?

No. The linear correlation coefficient is strictly limited between −1-1 and 11. A value outside this range indicates a calculation error.


Does a negative correlation mean the relationship is weak?

No. The negative sign only shows the direction, meaning one variable decreases as the other increases. A correlation of −0.95-0.95 is just as strong as a correlation of 0.950.95.


Why is looking at a scatter plot so important?

A single summary number cannot describe the entire shape of the data. A scatter plot instantly reveals curves, groupings, and outliers that a standard formula calculation might misrepresent.

Practice questions

Question

A scatter plot showing data points that generally fall downward from left to right.

Which type of correlation does the scatter plot show?

  • Positive correlation

  • Negative correlation

  • No correlation

  • Perfect correlation

Answer:

Negative correlation

Question

A scatter plot showing data points very tightly packed along an upward straight line.

Which of the following is the most likely correlation coefficient for the data shown?

  • r=0.95r = 0.95

  • r=1.00r = 1.00

  • r=0.15r = 0.15

  • r=−0.95r = -0.95

Answer:

r=0.95r = 0.95

Question

A city observes a strong positive correlation between the number of ice cream cones sold and the number of beach umbrellas sold. Which statement best explains this relationship?

  • Eating ice cream causes people to buy umbrellas.

  • Buying umbrellas makes people hungry for ice cream.

  • Warm sunny weather causes an increase in both sales.

  • There is a calculation error because these items are unrelated.

Answer:

Warm sunny weather causes an increase in both sales.

Question

What does a correlation coefficient of r=0r = 0 indicate about a data set?

  • The data points form a perfect straight horizontal line.

  • There is a strong negative relationship.

  • There is no linear relationship, but a curve might exist.

  • One variable directly causes the other variable to change.

Answer:

There is no linear relationship, but a curve might exist.

Question

Two different scatter plots each show a perfect straight line of points rising to the right. The line in the first plot is very steep, and the line in the second plot is almost flat. How do their correlation coefficients compare?

  • The steep line has a much higher correlation coefficient.

  • The almost flat line has a higher correlation coefficient.

  • Both plots have a correlation coefficient of exactly r=1r = 1.

  • Both plots have a correlation coefficient of exactly r=0r = 0.

Answer:

Both plots have a correlation coefficient of exactly r=1r = 1.