• NEET
      • Class 11th
      • Class 12th
      • Class 12th Plus
    • JEE
      • Class 11th
      • Class 12th
      • Class 12th Plus
    • Class 6-10
      • Class 6th
      • Class 7th
      • Class 8th
      • Class 9th
      • Class 10th
    • View All Options
      • Online Courses
      • Distance Learning
      • Hindi Medium Courses
      • International Olympiad
    • NEET
      • Class 11th
      • Class 12th
      • Class 12th Plus
    • JEE (Main+Advanced)
      • Class 11th
      • Class 12th
      • Class 12th Plus
    • JEE Main
      • Class 11th
      • Class 12th
      • Class 12th Plus
  • Classroom
  • NEW
    • NEET
      • 2025
      • 2024
      • 2023
      • 2022
    • JEE
      • 2025
      • 2024
      • 2023
      • 2022
    • Class 6-10
    • JEE Main
      • Previous Year Papers
      • Sample Papers
      • Result
      • Analysis
      • Syllabus
      • Exam Date
    • JEE Advanced
      • Previous Year Papers
      • Sample Papers
      • Mock Test
      • Result
      • Analysis
      • Syllabus
      • Exam Date
    • NEET
      • Previous Year Papers
      • Sample Papers
      • Mock Test
      • Result
      • Analysis
      • Syllabus
      • Exam Date
      • College Predictor
      • Counselling
    • NCERT Solutions
      • Class 6
      • Class 7
      • Class 8
      • Class 9
      • Class 10
      • Class 11
      • Class 12
    • CBSE
      • Notes
      • Sample Papers
      • Question Papers
    • Olympiad
      • NSO
      • IMO
      • NMTC
    • TALLENTEX
    • AOSAT
  • ALLEN E-Store
    • ALLEN for Schools
    • About ALLEN
    • Blogs
    • News
    • Careers
    • Request a call back
    • Book home demo
JEE PhysicsJEE Chemistry
Home
JEE Maths
Covariance

Covariance

In statistics, covariance is a measure that tells us how two random variables vary together. If both variables tend to rise or fall at the same time, their covariance is positive. If one increases while the other decreases, it's negative.

Understanding covariance meaning helps us explore the strength and direction of a linear relationship between two variables.

1.0Covariance Meaning

Covariance describes the extent to which two random variables vary or move together. It’s not standardized, meaning its magnitude depends on the scale of the variables. The covariance of X and Y is given by:

Cov(X,Y)=n1​∑i=1n​(Xi​−Xˉ)(Yi​−Yˉ)

  • If Cov(X, Y) > 0: X and Y tend to move in the same direction.
  • If Cov(X, Y) < 0: X and Y tend to move in opposite directions.
  • If Cov(X, Y) = 0: No linear relationship.

2.0Correlation and Covariance: The Difference

Covariance and correlation both describe how two variables are related. However, they differ:

Feature

Covariance

Correlation

Scale

Not standardized

Standardized (lies between -1 and 1)

Units

Product of units of X and Y

Unitless

Range

−∞ to +∞

-1 to +1

Formula

Based on means of X and Y

Covariance divided by product of standard deviations

So, while correlation and covariance both indicate the direction of a relationship, only correlation indicates its strength.

3.0How to Find Covariance

Let’s break down the steps to find covariance between two variables:

  1. Find the mean of both variables.
  2. Subtract the mean from each value.
  3. Multiply the deviations of corresponding values.
  4. Take the average of these products.

4.0Solved Examples on Covariance 

Example 1: Let’s compute the covariance of X and Y with the following data:

X

Y

2

6

4

8

6

10

Solution: 

Step 1: Means

Xˉ=4,Yˉ=8

 Step 2: Deviations and Products

X

Y

X−4

Y−8

(X−4)(Y−8)

2

6

-2

-2

4

4

8

0

0

0

6

10

2

2

4

Step 3: Average

Cov(X,Y)=34+0+4​=38​≈2.67

The positive covariance indicates that X and Y increase together.

Example 2: Given: X = [1, 2, 3] Y = [4, 5, 6]

Solution:

  • Mean of X: Xˉ=31+2+3​=2
  • Mean of Y: Yˉ=34+5+6​=5

Cov(X,Y)=31​∑(Xi​−Xˉ)(Yi​−Yˉ)

X

Y

X−2

Y−5

(X−2)(Y−5)

1

4

-1

-1

1

2

5

0

0

0

3

6

1

1

1

Cov(X,Y)=31+0+1​=32​≈0.67

Example 3: Given: X = [1, 2, 3] Y = [6, 4, 2]

Solution:

  • Xˉ=2,Yˉ=4

X

Y

X−2

Y−4

(X−2)(Y−4)

1

6

-1

2

-2

2

4

0

0

0

3

2

1

-2

-2

 Cov(X,Y)=3−2+0−2​=3−4​≈−1.33

Negative covariance indicates inverse relationship.

Example 4: Given: X = [2, 4, 6, 8] Y = [5, 10, 15, 20]

Solution:

Step 1: Xˉ=420​=5,Yˉ=450​=12.5

X

Y

X−5

Y−12.5

(X−5)(Y−12.5)

2

5

-3

-7.5

22.5

4

10

-1

-2.5

2.5

6

15

1

2.5

2.5

8

20

3

7.5

22.5

Cov(X,Y)=422.5+2.5+2.5+22.5​=450​=12.5

Strong positive linear relationship.

Example 5: Given: X = [1, 2, 3, 4], Y = [7, 7, 7, 7]

Solution:

Since Y is constant, Yˉ=7 and all deviations from the mean will be zero.

Cov(X,Y)=n1​∑(Xi​−Xˉ)(Yi​−Yˉ)=0

Covariance = 0 when one variable is constant ⇒ No linear relationship.

Example 6 : Given: Math Scores (X) = [80, 85, 90], Science Scores (Y) = [78, 82, 88]

Solution:

Step 1: Xˉ=85,Yˉ=82.67

X

Y

X−85

Y−82.67

(X−85)(Y−82.67)

80

78

-5

-4.67

23.35

85

82

0

-0.67

0

90

88

5

5.33

26.65

Cov(X,Y)=323.35+0+26.65​=350​≈16.67

Strong positive covariance: students doing well in one subject also do well in the other.

5.0Covariance in Statistics: Applications

Understanding covariance in statistics is essential in:

  • Portfolio theory (to measure asset relationships)
  • Regression analysis
  • Principal component analysis (PCA)
  • Machine learning algorithms

Covariance helps us grasp how two variables relate, even if it doesn’t tell us how strong that relation is.

Table of Contents


  • 1.0Covariance Meaning
  • 2.0Correlation and Covariance: The Difference
  • 3.0How to Find Covariance
  • 4.0Solved Examples on Covariance 
  • 5.0Covariance in Statistics: Applications

Frequently Asked Questions

Covariance has the combined units of the two variables involved.

Yes, covariance is not limited between -1 and 1, unlike correlation.

Not necessarily. Zero covariance implies no linear relationship, but variables can still have a nonlinear relationship.

Join ALLEN!

(Session 2025 - 26)


Choose class
Choose your goal
Preferred Mode
Choose State
  • About
    • About us
    • Blog
    • News
    • MyExam EduBlogs
    • Privacy policy
    • Public notice
    • Careers
    • Dhoni Inspires NEET Aspirants
    • Dhoni Inspires JEE Aspirants
  • Help & Support
    • Refund policy
    • Transfer policy
    • Terms & Conditions
    • Contact us
  • Popular goals
    • NEET Coaching
    • JEE Coaching
    • 6th to 10th
  • Courses
    • Online Courses
    • Distance Learning
    • Online Test Series
    • International Olympiads Online Course
    • NEET Test Series
    • JEE Test Series
    • JEE Main Test Series
  • Centers
    • Kota
    • Bangalore
    • Indore
    • Delhi
    • More centres
  • Exam information
    • JEE Main
    • JEE Advanced
    • NEET UG
    • CBSE
    • NCERT Solutions
    • Olympiad
    • NEET 2025 Results
    • NEET 2025 Answer Key
    • JEE Advanced 2025 Answer Key
    • JEE Advanced Rank Predictor

ALLEN Career Institute Pvt. Ltd. © All Rights Reserved.

ISO