• Skip to main content
  • Skip to primary sidebar
  • Skip to footer
QuestionPro

QuestionPro

questionpro logo
  • Products
    survey software iconSurvey softwareEasy to use and accessible for everyone. Design, send and analyze online surveys.research edition iconResearch SuiteA suite of enterprise-grade research tools for market research professionals.CX iconCustomer ExperienceExperiences change the world. Deliver the best with our CX management software.WF iconEmployee ExperienceCreate the best employee experience and act on real-time data from end to end.
  • Solutions
    IndustriesGamingAutomotiveSports and eventsEducationGovernment
    Travel & HospitalityFinancial ServicesHealthcareCannabisTechnology
    Use CaseAskWhyCommunitiesAudienceContactless surveysMobile
    LivePollsMember ExperienceGDPRPositive People Science360 Feedback Surveys
  • Resources
    BlogeBooksSurvey TemplatesCase StudiesTrainingHelp center
  • Features
  • Pricing
Language
  • English
  • Español (Spanish)
  • Português (Portuguese (Brazil))
  • Nederlands (Dutch)
  • العربية (Arabic)
  • Français (French)
  • Italiano (Italian)
  • 日本語 (Japanese)
  • Türkçe (Turkish)
  • Svenska (Swedish)
  • Hebrew IL (Hebrew)
  • ไทย (Thai)
  • Deutsch (German)
  • Portuguese de Portugal (Portuguese (Portugal))
  • Español / España (Spanish / Spain)
Call Us
+1 800 531 0228 +1 (647) 956-1242 +55 9448 6154 +49 030 9173 9255 +44 01344 921310 +81-3-6869-1954 +61 (02) 6190 6592 +971 529 852 540
Log In Log In
SIGN UP FREE

Home Market Research

Covariance vs Correlation: Key Differences, Formulas, and Examples

covariance-vs-correlation

Covariance vs correlation is one of the most common points of confusion in statistics. Covariance shows whether two variables move in the same direction. Correlation shows the same thing and also tells you how strong the link is, on a fixed scale from -1 to +1.

The two measures are closely related, yet they answer different questions. Picking the wrong one can make a weak pattern look strong or hide a real one.

In this blog, we’ll define both measures, work through a survey example, and show when each one fits.

Content Index hide
1. What is covariance?
2. What is correlation?
3. What is the difference between covariance and correlation?
4. Step-by-step example: Calculating covariance and correlation
5. How do you convert covariance to correlation?
6. How to calculate covariance and correlation in Python
7. Covariance and correlation matrices
8. Real-world examples of covariance and correlation
9. How to choose between covariance and correlation
10. Pros and cons of covariance and correlation
11. What are the limits of correlation?
12. What are the other types of correlation coefficients?
13. Common mistakes when comparing covariance and correlation
14. How to run correlation analysis on survey data in QuestionPro
15. Covariance is the raw material and correlation is the finished measure
16. Frequently Asked Questions (FAQs)

What is covariance?

Covariance is a statistic that measures how two variables change together. When one variable sits above its average at the same time the other does, covariance is positive. When one rises as the other falls, it is negative.

The sample covariance formula multiplies each pair’s deviations from the means, adds the products, and divides by n – 1:

cov(X, Y) = Σ (xᵢ – x̄)(yᵢ – ȳ) / (n – 1)

In that formula:

  • xᵢ and yᵢ: Each respondent’s pair of values.
  • x̄ and ȳ: The mean of each variable.
  • n: The number of pairs.

Population covariance divides by n instead. Survey work usually uses the sample version, because respondents are a sample of a larger group.

Covariance carries units. If X is in dollars and Y is in years, covariance is in dollar-years. That is why its size is hard to read on its own.

How to read a covariance value

Only the sign of covariance has a universal meaning. Here is what each result tells you:

  • Positive covariance: The variables tend to rise and fall together.
  • Negative covariance: One variable tends to rise when the other falls.
  • Covariance near zero: There is no consistent straight-line pattern.

The size of the number depends on the units. A covariance of 45 is not automatically stronger than a covariance of 4.

Positive and negative covariance examples

Everyday data show both directions clearly. Think of these two pairs:

  • Positive: Hours studied and exam score. More study time tends to go with higher scores, so their covariance is positive.
  • Negative: Product price and units sold. Higher prices tend to go with fewer sales, so their covariance is negative.

In both cases, the sign names the direction. Only a correlation coefficient can tell you how tight the pattern is.

What is correlation?

Correlation is a standardized measure of the direction and strength of the relationship between two variables. The most common version is the Pearson correlation coefficient, written as r. It divides covariance by the product of the two standard deviations. A standard deviation is the typical distance of values from their average.

r = cov(X, Y) / (sX × sY)

The units cancel in that division. So r has no unit and always falls between -1 and +1. A value of +1 means a perfect positive straight-line relationship. A value of -1 means a perfect negative one, and 0 means no straight-line relationship.

Pearson’s r assumes continuous data and a roughly linear pattern. Other coefficients, such as Spearman’s rank correlation, handle ranked data.

How to read a correlation coefficient

The sign gives direction and the absolute value gives strength. Rules of thumb vary by field, so treat these bands as a starting point rather than a standard.

  • 0.00 to 0.19: Very weak or none.
  • 0.20 to 0.39: Weak.
  • 0.40 to 0.59: Moderate.
  • 0.60 to 0.79: Strong.
  • 0.80 to 1.00: Very strong.

Squaring r gives R-squared, the share of one variable’s variation that a straight line with the other explains. An r of 0.70 means the two variables share about 49% of their variation.

What is the difference between covariance and correlation?

The main difference is scale. Covariance has no bounds and depends on units, while correlation uses a fixed scale and has no units. Both describe linear association between two variables, and both are zero when no linear pattern exists.

Feature Covariance Correlation
What it tells you Direction of the relationship Direction and strength
Range Negative infinity to positive infinity -1 to +1
Units Product of both variables’ units None
Effect of rescaling Changes with the scale Stays the same
Comparing across datasets Unreliable Reliable
Typical use Modeling, portfolio math, matrices Reporting and interpretation
Link between them Raw measure Covariance divided by both standard deviations

Step-by-step example: Calculating covariance and correlation

Suppose a support team surveys eight customers. Each rates support satisfaction (X) from 1 to 10 and likelihood to recommend (Y) from 0 to 10. The steps below show both measures from raw scores.

The survey data

Here are the eight paired responses:

Respondent Satisfaction (X) Recommend (Y)
1 4 3
2 5 5
3 6 5
4 7 7
5 7 8
6 8 8
7 9 9
8 10 10

Calculation steps

Follow these five steps to get both measures:

  1. Find the means: x̄ = 7.00 and ȳ = 6.875.
  2. Subtract each mean from its scores, multiply each pair, and add the products. The sum is 32.0.
  3. Divide by n – 1 (7). Covariance is 4.57.
  4. Find the standard deviations: sX = 2.00 and sY = 2.36.
  5. Divide covariance by their product: 4.57 / (2.00 × 2.36) = 0.97.

The positive covariance confirms the variables move together. Only the correlation tells you the link is very strong.

What happens when the units change

Now rescale satisfaction to a 0 to 100 scale by multiplying every score by 10. Covariance jumps to 45.71. Correlation stays at 0.97.

The respondents and the pattern are identical, yet covariance grew tenfold. That is why analysts compare correlations, not covariances, across surveys.

How do you convert covariance to correlation?

You convert covariance to correlation by dividing it by the product of the two standard deviations. The reverse works too, as long as you know both standard deviations.

  • Covariance to correlation: r = cov(X, Y) / (sX × sY).
  • Correlation to covariance: cov(X, Y) = r × sX × sY. Using the example, 0.97 × 2.00 × 2.36 = 4.57.
  • Variance as a special case: The covariance of a variable with itself equals its variance, and its correlation with itself is always 1.

You cannot get correlation from covariance alone. The standard deviations carry the missing scale information.

How to calculate covariance and correlation in Python

Python computes both measures in one line each. NumPy’s np.cov returns the sample covariance matrix, and np.corrcoef returns the correlation matrix. Using the survey data from earlier:

import numpy as np

x = np.array([4, 5, 6, 7, 7, 8, 9, 10])

y = np.array([3, 5, 5, 7, 8, 8, 9, 10])

print(np.cov(x, y)[0, 1])        # 4.571

print(np.corrcoef(x, y)[0, 1])   # 0.970

Both functions return a 2 by 2 grid. The off-diagonal cell holds the value for the pair, which is why the code reads index [0, 1].

Covariance and correlation matrices

A covariance matrix is a grid that lists the covariance of every pair of variables in a dataset. A correlation matrix does the same with correlation coefficients. Both are symmetric, so the value for X and Y equals the value for Y and X.

Matrix feature Covariance matrix Correlation matrix
Diagonal cells Each variable’s variance Always 1
Off-diagonal cells Covariance of each pair Correlation of each pair
Units Mixed, depends on the pair None
Best for Modeling and dimension reduction Heatmaps and reporting

For a hands-on look at the second type, see how a correlation matrix works with survey data.

Real-world examples of covariance and correlation

Both measures show up well beyond textbooks. Finance leans on covariance, data science uses both, and survey research relies mostly on correlation.

Portfolio risk in finance

Investors use the covariance between asset returns to estimate portfolio risk. Harry Markowitz shared the 1990 Nobel Memorial Prize in Economic Sciences for pioneering work in financial economics, including how holding assets together shapes risk.

  • Low or negative covariance between assets: Combining them lowers overall volatility.
  • High positive covariance: The assets fall together, so diversification adds little.
  • Beta: A stock’s beta equals its covariance with the market divided by the market’s variance.

Principal component analysis

Principal component analysis (PCA) is a method that compresses many variables into a few new ones that capture the most variation. It can start from either matrix.

Your data Matrix to use Reason
Same units and scale Covariance matrix Preserves real differences in spread
Different scales Correlation matrix Stops the largest-scale variable from dominating
Mixed survey scales (5-point and 10-point) Correlation matrix Puts every question on equal footing

Survey research

Researchers correlate survey questions to see which ones move together. A team might test whether delivery-time ratings track repurchase intent. This is the core idea behind correlational research.

Key driver analysis, which ranks the factors that move overall satisfaction most, builds on the same logic. Correlation gives a fast first read on where to look.

How to choose between covariance and correlation

Choose by goal, not habit. Ask these five questions in order:

  1. Are you comparing relationships across variables or datasets? Use correlation.
  2. Do your variables sit on different scales? Use correlation, or standardize first.
  3. Does a model need raw variances, as in portfolio optimization or PCA on same-scale data? Use covariance.
  4. Are you reporting to a non-technical audience? Use correlation.
  5. Is your data ranked or heavily skewed? Use a rank correlation such as Spearman’s.

A simple default works for most teams. Report correlation, and keep covariance for the modeling step.

Pros and cons of covariance and correlation

Each measure has strengths that suit different jobs. Neither captures curved relationships.

Covariance

Pros:

  • Simple to compute from raw data.
  • Feeds directly into matrices, PCA, and portfolio models.
  • Keeps the original scale information.

Cons:

  • Size depends on units, so it is hard to interpret.
  • Cannot be compared across datasets.
  • Says nothing about strength.

Correlation

Pros:

  • Standardized between -1 and +1.
  • Comparable across variables and studies.
  • Easy to explain to non-technical readers.

Cons:

  • Detects only linear patterns.
  • Sensitive to outliers.
  • Does not show cause and effect.

What are the limits of correlation?

Correlation summarizes linear association only. It misleads in three predictable ways:

  • Outliers can inflate or erase the coefficient.
  • Curved patterns can hide a real relationship.
  • Causal readings treat association as proof of cause.

Outliers

One extreme respondent can wreck a coefficient. Add a ninth customer who rates satisfaction 10 and likelihood to recommend 0 to the earlier example. The correlation drops from 0.97 to 0.25.

Always scan a scatterplot before you trust r.

Curved relationships

A perfect pattern can still produce zero. Take these values, where y = x squared:

x-3-2-10123
y9410149

Covariance and correlation are both exactly 0, yet y depends fully on x. Anscombe’s classic quartet makes the same point. In his 1973 paper in The American Statistician, four very different datasets share a correlation of 0.816.

Correlation is not causation

A strong coefficient shows association, not cause. Altman and Krzywinski explain in Nature Methods that correlation does not prove one variable drives the other. To test whether one variable predicts another, move to regression analysis.

What are the other types of correlation coefficients?

Pearson’s r is only one of several coefficients. The right choice depends on your data type and the shape of the relationship.

Coefficient Best for Data type
Pearson’s r Straight-line relationships Continuous, roughly normal
Spearman’s rho Consistent upward or downward trends, even if curved Ordinal or ranked
Kendall’s tau Smaller samples with many tied ranks Ordinal

Two extensions help with more than two variables. Partial correlation removes the effect of a third variable. Multiple correlation measures how well several variables together relate to one outcome.

Common mistakes when comparing covariance and correlation

Most errors come from reading numbers without context. Watch for these five:

  • Reading a big covariance as a strong link. A covariance of 45 can describe a weaker pattern than a covariance of 4 if the units differ.
  • Comparing covariances across surveys.
    Different scales make the numbers incomparable. Compare correlations instead.
  • Skipping the scatterplot.
    Outliers and curves hide inside a single coefficient.
  • Using Pearson on ranked answers.
    Single rating-scale items are ordinal data, so Spearman’s rank correlation is usually safer.
  • Mixing up r and R-squared.
    An r of 0.50 explains 25% of the variation, not 50%.

How to run correlation analysis on survey data in QuestionPro

QuestionPro’s correlation analysis feature calculates the coefficient between two numeric or ordinal questions in your results. You choose the method and read the sign and size of r directly.

  1. Build the survey with numeric or rating-scale questions, such as satisfaction or importance.
  2. Collect responses through your survey software distribution channels.
  3. Select the two variables you want to compare.
  4. Choose Pearson’s r for continuous data without major outliers, or Spearman’s rank for ordinal data.

The output is a coefficient between -1 and +1. Pair it with a scatterplot before drawing conclusions.

Covariance is the raw material and correlation is the finished measure

Covariance records how two variables move together in their original units. Correlation strips out those units so you can judge strength and compare across studies.

Keep these three habits:

  • Use covariance when a model needs the raw numbers.
  • Use correlation when a person needs to understand the result.
  • Check both against a plot, because neither one proves cause.
Create memorable experiences based on real-time data, insights and advanced analysis. Request Demo

Frequently Asked Questions (FAQs)

How do you calculate covariance and correlation in Excel?

Use COVARIANCE.S for sample covariance and CORREL for the Pearson coefficient. Both take two cell ranges, such as =CORREL(A2:A9,B2:B9), so keep each X value paired with its matching Y value. Choose COVARIANCE.P only when your data covers an entire population.

Should I use sample or population covariance for survey data?

Use sample covariance, which divides by n – 1. Survey respondents represent a larger group, and n – 1 corrects the small downward bias that dividing by n creates. Population covariance fits only when you measured every member of the group.

What does squaring the correlation coefficient tell you?

Squaring r gives R-squared, the share of one variable’s variation that a straight line with the other explains. In the survey example, r of 0.97 gives about 0.94, so roughly 94% of the variation in recommendation scores tracks satisfaction.

Can you use Pearson correlation on Likert-scale survey data?

It is common with averaged multi-item scales, which behave more like continuous data. Single Likert items are ordinal, though, so Spearman’s rank correlation is the safer choice. Always check a scatterplot for ties and clustering first.

What is partial correlation and when do you need it?

Partial correlation measures the relationship between two variables after removing the effect of one or more others. Use it when a third factor, such as customer tenure, might drive both satisfaction and loyalty scores and inflate the raw coefficient.

SHARE THIS ARTICLE:

About the author
Anas Al Masud
Digital Marketing Lead at QuestionPro. SEO-driven content strategist specializing in content that ranks, engages, and converts, while boosting online visibility through hands-on digital marketing expertise.
View all posts by Anas Al Masud

Primary Sidebar

Research what's on your mind. Find out what's on theirs!

A suite of tools to leverage research and transform insights.

Discover our insight platform

RELATED ARTICLES

HubSpot - QuestionPro Integration

Longitudinal Survey Research in Higher Education: How to Design Studies That Last

Jun 26,2026

HubSpot - QuestionPro Integration

Using Live Polls Inside Presentations: A Guide for Interactive Sessions

Sep 11,2026

HubSpot - QuestionPro Integration

Alchemer vs Qualtrics: Find out which one you should choose

Aug 30,2024

BROWSE BY CATEGORY

Footer

MORE LIKE THIS

Frontline Employee Survey Channels Compared: SMS vs WhatsApp vs QR Code vs Microsoft Teams

Oct 16, 2026

Are Anonymous Surveys Really Anonymous? What Real Employee Survey Anonymity Requires

Oct 16, 2026

Pulse Survey Best Practices: How Often Should You Survey Employees?

Oct 16, 2026

360 Degree Feedback for Leadership Development: Why It Works Best Apart from Performance Reviews

Oct 16, 2026

Other categories

questionpro-logo-nw
Help center Live Chat SIGN UP FREE
  • Sample questions
  • Sample reports
  • Survey logic
  • Branding
  • Integrations
  • Professional services
  • Security
  • Survey Software
  • Customer Experience
  • Workforce
  • Communities
  • Audience
  • Polls Explore the QuestionPro Poll Software - The World's leading Online Poll Maker & Creator. Create online polls, distribute them using email and multiple other options and start analyzing poll results.
  • Research Edition
  • LivePolls
  • InsightsHub
  • Blog
  • Articles
  • eBooks
  • Survey Templates
  • Case Studies
  • Training
  • Webinars
  • All Plans
  • Nonprofit
  • Academic
  • Qualtrics Alternative Explore the list of features that QuestionPro has compared to Qualtrics and learn how you can get more, for less.
  • SurveyMonkey Alternative
  • VisionCritical Alternative
  • Medallia Alternative
  • Likert Scale Complete Likert Scale Questions, Examples and Surveys for 5, 7 and 9 point scales. Learn everything about Likert Scale with corresponding example for each question and survey demonstrations.
  • Conjoint Analysis
  • Net Promoter Score (NPS) Learn everything about Net Promoter Score (NPS) and the Net Promoter Question. Get a clear view on the universal Net Promoter Score Formula, how to undertake Net Promoter Score Calculation followed by a simple Net Promoter Score Example.
  • Offline Surveys
  • Customer Satisfaction Surveys
  • Employee Survey Software Employee survey software & tool to create, send and analyze employee surveys. Get real-time analysis for employee satisfaction, engagement, work culture and map your employee experience from onboarding to exit!
  • Market Research Survey Software Real-time, automated and advanced market research survey software & tool to create surveys, collect data and analyze results for actionable market insights.
  • GDPR & EU Compliance
  • Employee Experience
  • Customer Journey
  • Synthetic Data
  • About us
  • Executive Team
  • In the news
  • Testimonials
  • Advisory Board
  • Careers
  • Brand
  • Media Kit
  • Contact Us

QuestionPro in your language

  • English
  • Español (Spanish)
  • Português (Portuguese (Brazil))
  • Nederlands (Dutch)
  • العربية (Arabic)
  • Français (French)
  • Italiano (Italian)
  • 日本語 (Japanese)
  • Türkçe (Turkish)
  • Svenska (Swedish)
  • Hebrew IL (Hebrew)
  • ไทย (Thai)
  • Deutsch (German)
  • Portuguese de Portugal (Portuguese (Portugal))
  • Español / España (Spanish / Spain)

Awards & certificates

  • survey-leader-asia-leader-2023
  • survey-leader-asiapacific-leader-2023
  • survey-leader-enterprise-leader-2023
  • survey-leader-europe-leader-2023
  • survey-leader-latinamerica-leader-2023
  • survey-leader-leader-2023
  • survey-leader-middleeast-leader-2023
  • survey-leader-mid-market-leader-2023
  • survey-leader-small-business-leader-2023
  • survey-leader-unitedkingdom-leader-2023
  • survey-momentumleader-leader-2023
  • bbb-acredited
The Experience Journal

Find innovative ideas about Experience Management from the experts

  • © 2022 QuestionPro Survey Software | +1 (800) 531 0228
  • Sitemap
  • Privacy Statement
  • Terms of Use