+ Reply to Thread
Results 1 to 7 of 7

COVARIANCE.S to build a covariance matrix

  1. #1
    Registered User
    Join Date
    04-19-2011
    Location
    London
    MS-Off Ver
    Excel 2011
    Posts
    5

    Question COVARIANCE.S to build a covariance matrix

    Hi all

    This is probably down to my theoretical knowledge not being up to snuff, but since I'm trying to implement this in Excel I'm hoping someone where will be able to help me out.

    I need to create an N x N covariance matrix from N columns of data. There are a large number of rows in the data (many more than N)

    How can I take N columns of X rows of data and generate an N x N covariance matrix?

    Thanks
    Steve

  2. #2
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: COVARIANCE.S to build a covariance matrix

    With difficulty, what do you have so far?

  3. #3
    Registered User
    Join Date
    04-19-2011
    Location
    London
    MS-Off Ver
    Excel 2011
    Posts
    5

    Re: COVARIANCE.S to build a covariance matrix

    Very little I'm afraid... in fact, nothing!

    I know that you can build up a covariance matrix from a diagonal standard deviation matrix and a correlation matrix, by going =MMULT(MMULT(diag_sd, correl), diag_sd)

    However, this is going the other way.

    I am trying to build a covariance matrix from random data. Within the random data will be the correlations etc. We then do spectral analysis or principal component analysis to break up the covariance matrix into it's constituent eigenvalues and eigenvectors.

    Clearly I can't even start thinking about this without being able to generate the covariance matrix, and I don't even know where to start for that! (I've asked my maths lecturer for help, but haven't had a response yet. Hopefully someone on here can help me out instead.)

    If I get an answer from my lecturer I'll put the answer up here for future reference.

    TIA
    Steve

  4. #4
    Registered User
    Join Date
    04-19-2011
    Location
    London
    MS-Off Ver
    Excel 2011
    Posts
    5

    Re: COVARIANCE.S to build a covariance matrix

    Very little I'm afraid... in fact, nothing!

    I know that you can build up a covariance matrix from a diagonal standard deviation matrix and a correlation matrix, by going =MMULT(MMULT(diag_sd, correl), diag_sd)

    However, this is going the other way.

    I am trying to build a covariance matrix from random data. Within the random data will be the correlations etc. We then do spectral analysis or principal component analysis to break up the covariance matrix into it's constituent eigenvalues and eigenvectors.

    Clearly I can't even start thinking about this without being able to generate the covariance matrix, and I don't even know where to start for that! (I've asked my maths lecturer for help, but haven't had a response yet. Hopefully someone on here can help me out instead.)

    If I get an answer from my lecturer I'll put the answer up here for future reference.

    TIA
    Steve

  5. #5
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: COVARIANCE.S to build a covariance matrix

    Hmm?

    Try googling
    covariance matrix excel

    This might give you a start
    Variance-Covariance Matrix
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  6. #6
    Registered User
    Join Date
    04-19-2011
    Location
    London
    MS-Off Ver
    Excel 2011
    Posts
    5

    Re: COVARIANCE.S to build a covariance matrix

    I have found the answers here: http://en.wikipedia.org/wiki/Princip...onent_analysis

    Thanks for the help.

  7. #7
    Registered User
    Join Date
    04-19-2011
    Location
    London
    MS-Off Ver
    Excel 2011
    Posts
    5

    Re: COVARIANCE.S to build a covariance matrix

    PS: Can't edit the original post for some reason, which means I can't set it to SOLVED.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1