Ask Your Question
0

Why covariation matrix is recorded with only lower diagonal part

asked 2016-10-29 20:49:55 +0200

remagin gravatar image

updated 2016-10-29 23:06:30 +0200

Hello. I understand that the covariation matrix is symmetric but is there any way to print not only the lower diagonal part of it when I use Calc statistics? I need that matrix for my evaluations and I have to compute for example product A * x, where A is my covariation matrix and x - some vector but LibreOffice doesn't permit to produce that operation with matrix which is not recorded like m * n table.

edit retag flag offensive close merge delete

Comments

Would you mind to tell us what function / formula you used to calculate / output the "covariation matrix"?
Neither my (incomplete) knowledge of statistics nor en.wikipedia.org nor reference.wolfram.com are mentioning such a thing, OpenFormula and LibO help not to talk of.
Did you probably mean a "correlation matrix"? A "covariance marix"?

Lupp gravatar imageLupp ( 2016-10-30 11:30:04 +0200 )edit

@Lupp There is information here

peterwt gravatar imagepeterwt ( 2016-10-30 19:17:43 +0200 )edit

@peterwt: I knew that page. Thanks nonetheless.
Did you find something about "covariation" or do you assume (as I did) "covariance" was meant most likely?
Do you have an idea what formula / tool was used to create the triangular matrix?
There is no standard function for the purpose as far as I can see and the only statistical extension I found is old and "version 0.0." Of course, we may use COVAR once per a pair of n variables, but he who does it is responsible for the arrangement then.

Lupp gravatar imageLupp ( 2016-10-30 19:34:51 +0200 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2016-10-30 13:14:55 +0200

Lupp gravatar image

updated 2016-10-30 20:22:27 +0200

Given a square matrix in, say E4:G6, assured to be triangular (either left-lower OR right-upper)
{=E4:G6+TRANSPOSE(E4:G6)-MUNIT(ROWS(E4:G6))*E4:G6}, entered for array evaluation will return the symmetric completion.
Be sure to regard that there may be statistics tools understanding correlation/covariance matrices as "triangular by definition". Such a tool may go wrong if getting passed a symmetric matrix instead.

(Editing to explain my remark "Of course, we may use COVAR once per a pair of n variables, but he who does it is responsible for the arrangement then." from my answer to the comment by @peterwt to the OQ:) See this demo. For large and many data columns efficiency is asymptotically doubled for a solution only calculating a triangular matrix and then filling it up symmetrically.

edit flag offensive delete link more

Comments

Your formula works. Thank you very much!

remagin gravatar imageremagin ( 2016-10-30 14:33:57 +0200 )edit

@remagin: Are you sure there is a good reason not to answer the question from my comment to your OP?
This is not a one-way lane! And I am not paid for servicing selfish users.
Again: What formula or tool did "record ...{a matrix} ... with only lower diagonal part"?

Lupp gravatar imageLupp ( 2016-10-30 17:34:38 +0200 )edit

@this demo :

=COVAR(INDEX(data;;MATCH($G14;header;0));INDEX(data;;MATCH(H$13;header;0)))

pull to right and down. leave the Ranges "behind" the Names data and header open, as challenge for the audience

karolus gravatar imagekarolus ( 2016-10-30 22:25:27 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-10-29 20:49:55 +0200

Seen: 73 times

Last updated: Oct 30 '16