Pearson Correlation Coefficient (Pearson’s r): Meaning, Examples and Real Data

Home › Research Methodology › Pearson Correlation Coefficient (Pearson’s r)

Quick answerThe Pearson correlation coefficient (r) measures how strongly two numeric variables move together in a straight line. It ranges from −1 (perfect negative) through 0 (no straight-line relationship) to +1 (perfect positive). It works best when both variables are roughly normally distributed and free of extreme values; otherwise the Spearman correlation is safer.

Below, we explain Pearson’s r in plain language and calculate it live on real data from ScholarsColab, where it behaves in a surprising and very instructive way.

Reading Pearson’s r at a glance

Value of r Usual description What it looks like
0.7 to 1.0 Strong positive Points lie close to a rising line
0.4 to 0.7 Moderate positive A clear rising trend with scatter
0.1 to 0.4 Weak positive A slight rising tendency
Around 0 No linear relationship No straight-line pattern (a curved one may still exist)
Negative values Same strengths, opposite direction One goes up as the other goes down

Worked example: do researchers who publish more have a higher h-index?

We work through a full correlation analysis, notebook-style, on real researcher data. Every result is calculated live, and you can run the same code yourself.

The data: one row per ScholarsColab mentor with at least five dated papers, giving their discipline, career length, number of papers, h-index and total citations. The file is anonymised: no names or identifiers, rows are shuffled and citation totals are rounded.

Step 1: Load the data

In [1]:
import numpy as np
import pandas as pd
from datetime import date

# The ScholarsColab Research Methods Index (mentors level): anonymised, updated daily
DATA = "https://scholarscolab.com/wp-json/scholarscolab/v1/research-methods-data?level=mentors"
mentors = pd.read_csv(DATA, comment="#")   # lines starting with # hold the citation

def p_text(p):
    return "< 0.001" if p < 0.001 else f"= {p:.3f}"

print(mentors.shape)
mentors.head()
Out [1]:
(891, 6)
disciplinefirst_yearcareer_yearspapersh_indextotal_citations
0Engineering & computer science20141381680
1Medicine & health20091845460
2Engineering & computer science20151297550
3Engineering & computer science19982910010029550
4Medicine & health2020737252510

The h-index is a common measure of research impact: an h-index of 10 means a researcher has 10 papers with at least 10 citations each.

Step 2: Plot the two variables first

Always start with a scatter plot. It shows whether the relationship looks like a straight line, and whether a few extreme points might dominate.

In [2]:
import matplotlib.pyplot as plt
from scipy import stats

fit = stats.linregress(mentors["papers"], mentors["h_index"])

fig, ax = plt.subplots(figsize=(8, 4.5))
ax.scatter(mentors["papers"], mentors["h_index"], s=12, alpha=0.4)
x = np.linspace(0, 300, 50)
ax.plot(x, fit.intercept + fit.slope * x, color="green", linewidth=3)
ax.set_xlim(0, 300)
ax.set_xlabel("Number of papers")
ax.set_ylabel("h-index")
plt.show()
Out [2]:
Scatter plot002060401206018080240100300Number of papersh-index
Each dot is one mentor; the green line is the fitted straight line. Mentors with more than 300 papers lie beyond the right edge.
How to read it: the fitted line rises: on average, every 10 extra papers go with an h-index about 1.4 higher. Look also at the shape: does the cloud follow the straight line, or bend? And do a few researchers sit far from the rest?

Step 3: Calculate Pearson’s r and Spearman’s rho

In [3]:
r, p = stats.pearsonr(mentors["papers"], mentors["h_index"])
rho, p_s = stats.spearmanr(mentors["papers"], mentors["h_index"])
print(f"Pearson r    = {r:.2f}, p {p_text(p)}")
print(f"Spearman rho = {rho:.2f}, p {p_text(p_s)}")
Out [3]:
Pearson r    = 0.62, p < 0.001
Spearman rho = 0.82, p < 0.001
Pearson’s r (0.62) shows a strong relationship and Spearman’s rho (0.82) a very strong one. Spearman is higher because it uses ranks, so it captures any steadily rising relationship, even a curved one, while Pearson only measures closeness to a straight line and is pulled around by extreme values.

Step 4: See how extreme values and curves affect Pearson

In [4]:
r_log, _ = stats.pearsonr(np.log(mentors["papers"]), np.log(mentors["h_index"] + 1))
top = mentors["papers"] > mentors["papers"].quantile(0.99)
r_trim, _ = stats.pearsonr(mentors.loc[~top, "papers"], mentors.loc[~top, "h_index"])
print(f"Pearson r on log scales:                {r_log:.2f}")
print(f"Pearson r without the top 1% by papers: {r_trim:.2f}")
Out [4]:
Pearson r on log scales:                0.79
Pearson r without the top 1% by papers: 0.69
Taking logarithms changes Pearson’s r from 0.62 to 0.79, and removing the most prolific 1% of researchers changes it to 0.69. A handful of points and the shape of the relationship can move Pearson’s r, which is why you should always plot first and consider Spearman for skewed data.
Run this analysis yourself. Download the notebook and open it in Jupyter or Google Colab (File → Upload notebook). It loads the same anonymised ScholarsColab data, so your results will match this page.Download notebook (.ipynb) →Data files: papers.csv · mentors.csv

When to use Pearson or Spearman

Pearson’s r Spearman’s rho
Measures Straight-line relationships Any steadily rising or falling relationship
Uses The actual values The ranks of the values
Best for Roughly normal data without extreme values Skewed data, outliers, ordinal scales
Example Height and weight Citations, income, Likert ratings

How to calculate and report Pearson’s r

  1. Plot the two variables in a scatter plot and look for a straight-line pattern and extreme values.
  2. Check the assumptions: both variables numeric, roughly normal, and a linear relationship.
  3. Calculate r in SPSS, R, Python or Excel (CORREL function).
  4. Test significance to get a p-value, and report a confidence interval if you can.
  5. Report it fully, for example: “There was a moderate positive correlation between sleep and test scores, r(98) = 0.45, p < 0.001.”

Common mistakes reviewers point out

  • Using Pearson on heavily skewed data, as our raw citation example shows.
  • Not plotting the data, so curved relationships or outliers go unnoticed.
  • Reading correlation as causation. See our guide to correlation vs causation.
  • Reporting r without the sample size or p-value.

Frequently asked questions

What does Pearson’s r measure?

It measures the strength and direction of the straight-line relationship between two numeric variables, on a scale from −1 to +1.

What is a good Pearson correlation?

It depends on the field. As a rough guide, 0.1 is weak, 0.3 to 0.5 is moderate and above 0.5 is strong, but small correlations can still matter in large or complex systems.

What is the difference between Pearson and Spearman correlation?

Pearson uses the actual values and measures straight-line relationships. Spearman uses ranks, so it suits skewed data, outliers and relationships that rise steadily without being straight.

Can Pearson’s r be misleading?

Yes. A few extreme values can make it much smaller or larger than the real pattern, and it misses curved relationships. Always plot the data first.

How do I calculate Pearson’s r in Excel?

Use the CORREL function, for example =CORREL(A2:A101, B2:B101), with one variable in each column.

Use this data in your own work

Use this data in your own research. Download the aggregated figures behind these charts (counts, medians and shares by type of paper, period, method and discipline) as a CSV file. Please cite it as:ScholarsColab (2026). ScholarsColab Research Methods Index [Data set]. Vidhilekha Soft Solutions Pvt Ltd. Retrieved 15 October 2026, from https://scholarscolab.com/research-methodology/. Licensed under CC BY 4.0.Download the data (CSV) →

Need help applying this to your research?

Discuss your research problem with a PhD mentor, hand the whole project to a research project manager, or post your project and let matched experts apply.

Mentors whose published work uses this approach:

More research methodology guides

About the data on this page. The ScholarsColab Research Methods Index is built from the Google Scholar publication lists of PhD researchers who mentor on ScholarsColab, and is updated daily as mentors and publications are added. Methods, designs and paper types are identified from titles, so papers whose titles do not mention them are not counted in those groups. The mentors are not a random sample of all researchers (engineering and computer science are strongly represented), so the figures describe this group of researchers and may not apply to research as a whole.