Covariance, a 2x2 matrix?

조회 수: 7 (최근 30일)
Sam
Sam 2015년 6월 12일
댓글: Sam 2015년 6월 13일
Hello,
I calculated the covariance between two sets of data (2 columns of data). And I got a 2x2 covariance matrix (see picture). But what is the covariance now? I thought that it would be just 1 number?...
  댓글 수: 2
Azzi Abdelmalek
Azzi Abdelmalek 2015년 6월 12일
You don't need to post a picture, just paste your code
Sam
Sam 2015년 6월 13일
Okay, sorry. But do you know the answer?

댓글을 달려면 로그인하십시오.

답변 (1개)

James Tursa
James Tursa 2015년 6월 12일
편집: James Tursa 2015년 6월 12일
The nancov function assumes you have two variables because you have two columns of data, so it returns a 2x2 covariance matrix. The diagonal containing the variances of the variables and the off diagonals containing the covariances between the variables.

카테고리

Help CenterFile Exchange에서 Operating on Diagonal Matrices에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by