1
$\begingroup$

I came across this formula in a text that says $S$ is the sample covariance matrix where

$$S = \sum_{j=1}^n(\mathbf{X}_j - \bar{\mathbf{X}})(\mathbf{X}_j-\bar{\mathbf{X}})'$$.

What I am trying to figure out is whether that formula is the correct formula for a covariance matrix, or if it is, say, the sum of squares matrix around the sample mean (is that the same as the covariance matrix)?

$\endgroup$
3
  • 2
    $\begingroup$ It depends on what your symbols mean: if the necessary factor of $1/n$ (or perhaps $1/(n-1)$ is absorbed (via its square root) within $\mathbf X$ then this can be a correct formula for covariance, but otherwise it's not. Please clarify. $\endgroup$
    – whuber
    Commented Jan 19 at 18:14
  • $\begingroup$ @whuber there is no factor of 1/n (or 1/(n-1)) here (absorbed or otherwise). $\endgroup$
    – John Smith
    Commented Jan 19 at 18:58
  • 1
    $\begingroup$ That settles it, then. You can find many threads about covariance matrix formulas here on CV and many more answers that utilize them. $\endgroup$
    – whuber
    Commented Jan 19 at 19:28

1 Answer 1

1
$\begingroup$

No, the sample covariance matrix is:

$\mathbf{S}=\frac{1}{n-1}\sum_{i=1}^n(\mathbf{X}_i-\bar{\mathbf{X}})(\mathbf{X}_i-\bar{\mathbf{X}})^\top$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.