0

I often read that the covariance matrix is calculated $C = BB^T$; however, I also read that it is $C = B^TB$, which I thought was the Gram matrix.

Am I missing something obvious?

Shinobii
  • 257
  • 2
  • 7
  • 3
    Yes: you need to pay attention to notational conventions and definitions. Some people use the transposes of others' matrices. Thus, an expression like "$BB^\prime$" is inherently ambiguous until you explain what it represents. – whuber Feb 03 '20 at 20:38
  • I gotcha, so you cannot simple say $C = BB^T$ without explaining the matrix $B$? – Shinobii Feb 03 '20 at 20:41
  • 2
    Yes: are the variables in columns or are they in rows of $B$? – whuber Feb 03 '20 at 20:42
  • Right, this makes perfect sense. Thanks. I'll go shoot my foot now. – Shinobii Feb 03 '20 at 20:43
  • 1
    This is one of the wonderful things about statistics: everybody sees value in it but different communities have developed different languages and notational systems for describing what they are doing ;-). The statistical literature tends to put variables into columns while many computing-oriented communities use rows. – whuber Feb 03 '20 at 20:47
  • If columns of $B$ are variables (and rows are cases) and columns are centered, $X'X$ is the scatter matrix and $XX'$ is sometimes called Gram matrix. – ttnphns Feb 03 '20 at 20:48

0 Answers0