# mathematical expectation

43 views (last 30 days)

Show older comments

Hi

Suppose we have a vector X=[1 2 -1 5 2], I want the mathematical expectation E{x*x'}, can you please help me with that statements?

I presume the result will be a 5X5 matrix! This matrix is also called as the correlation matrix(as defined by the author of the paper I am doing).

Cheers

P

##### 0 Comments

### Answers (2)

Walter Roberson
on 6 Jan 2012

With your given X, X*X' would be a 1 x 1 matrix.

If your X was instead [1 2 -1 5 2].' then X*X' would be a 5 x 5 matrix. To phrase this another way, use a column vector instead of a row vector.

##### 2 Comments

Gurudatha Pai
on 6 Jan 2012

##### 2 Comments

Walter Roberson
on 6 Jan 2012

See http://www.mathworks.com/help/toolbox/stats/corr.html

but note that what you need on input is (something) by 5 in order to get out a 5 x 5 result. If you are starting from a vector, you cannot get a 5 x 5 correlation matrix: your input needs to be the list of samples, one sample per row, one column per parameter.

### See Also

### Categories

### Community Treasure Hunt

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

Start Hunting!