How Does the Covariance Matrix Apply to Vectors X and Y?

Click For Summary
SUMMARY

The discussion centers on the calculation and understanding of the covariance matrix for two vectors, X = (3, 5, 7) and Y = (2, 4, 1). It is established that the covariance matrix is 2x2, with the diagonal elements representing the variances var(X) and var(Y), while the off-diagonal elements are cov(X,Y) and cov(Y,X). The covariance is defined mathematically for both real-valued random variables and for random vectors, highlighting the distinction between one-dimensional and multi-dimensional cases.

PREREQUISITES
  • Understanding of covariance and variance concepts
  • Familiarity with mathematical expectations (E) in statistics
  • Knowledge of vector and matrix operations
  • Basic understanding of random variables and their properties
NEXT STEPS
  • Study the properties of covariance matrices in multivariate statistics
  • Learn about the calculation of variances and covariances using Python libraries such as NumPy
  • Explore the application of covariance matrices in machine learning algorithms
  • Investigate the differences between covariance and correlation in statistical analysis
USEFUL FOR

Statisticians, data analysts, machine learning practitioners, and anyone involved in quantitative research requiring an understanding of covariance and its applications in data analysis.

DUET
Messages
55
Reaction score
0
if X= (3, 5, 7) & Y = (2, 4, 1)

What is the 3x3 covariance matrix for X & Y?
 
Physics news on Phys.org
DUET said:
if X= (3, 5, 7) & Y = (2, 4, 1)

What is the 3x3 covariance matrix for X & Y?

You have two variables, so the matrix is 2x2. The elements are var(X), var(Y) along the diagonal and cov(X,Y) off diagonal (both).
 
Since 2x2 we need two diagonal elements and two off diagonal elements.

Are the following two elements "off diagonal elements"?

cov(X,Y) & cov(Y,X);
 
Last edited:
Yes they are the off diagonal elements.
 
The covariance between two jointly distributed real-valued random variables x and y with finite second moments is defined as-
1. cov(x,y)=E[(x-E[x])(y-E[y])]

The covariance between two jointly distributed real-valued random vectors x and y (with m and n dimensional respectively) with finite second moments is defined as
2. cov(x,y)=E[(x-E[x])(y-E[y])T]

What is the difference between #1 & #2?
 
Last edited:
DUET said:
The covariance between two jointly distributed real-valued random variables x and y with finite second moments is defined as-
1. cov(x,y)=E[(x-E[x])(y-E[y])]

The covariance between two jointly distributed real-valued random vectors x and y (with m and n dimensional respectively) with finite second moments is defined as
2. cov(x,y)=E[(x-E[x])(y-E[y])T]

What is the difference between #1 & #2?


In this context what do you mean by dimensional? X and Y are real valued. Do you mean the number of samples?
 
DUET said:
The covariance between two jointly distributed real-valued random variables x and y with finite second moments is defined as-
1. cov(x,y)=E[(x-E[x])(y-E[y])]

The covariance between two jointly distributed real-valued random vectors x and y (with m and n dimensional respectively) with finite second moments is defined as
2. cov(x,y)=E[(x-E[x])(y-E[y])T]

What is the difference between #1 & #2?


1 refers to real valued (1 dimensional) random variables.
2 is a generalization to vectors (n or m dimensional) which have random variables as components.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 33 ·
2
Replies
33
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 1 ·
Replies
1
Views
9K
  • · Replies 24 ·
Replies
24
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K