Covariance, a 2x2 matrix?

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 日

0 投票

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.

カテゴリ

タグ

質問済み:

Sam
2015 年 6 月 12 日

コメント済み:

Sam
2015 年 6 月 13 日

Community Treasure Hunt

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

Start Hunting!

Translated by