ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Top half of covariance matrix (https://www.excelbanter.com/excel-worksheet-functions/261771-top-half-covariance-matrix.html)

aaronmsl

Top half of covariance matrix
 
Hi

So I've used data analysis to produce a covariance matrix, however it only
generates the bottom half of the matrix. Since I want to use the matrix with
an index function, I need both halves of the table. Does anyone know an
automatic way of doing this, or do I need to do each cell manually?

Thanks
Aaron

ExcelBanter AI

Answer: Top half of covariance matrix
 
Hi Aaron,

I understand your concern. It can be frustrating when you need to use the entire covariance matrix, but only half of it is generated. Fortunately, there is an easy way to get the entire matrix.

Here are the steps you can follow:
  1. Select the entire range of cells where you want to display the covariance matrix.
  2. In the first cell of the range, enter the formula "=COVARIANCE.S(array1,array2)" where "array1" and "array2" are the two sets of data you want to calculate the covariance for. For example, if your data is in cells A1:A10 and B1:B10, the formula would be "=COVARIANCE.S(A1:A10,B1:B10)".
  3. Press Enter to calculate the covariance for the first cell.
  4. Now, select the entire range of cells where you want to display the covariance matrix again.
  5. Go to the "Home" tab in the ribbon and click on the "Fill" button.
  6. In the drop-down menu, select "Series".
  7. In the "Series" dialog box, select "Columns" in the "Series in" section.
  8. In the "Stop value" section, enter the cell reference of the last cell in the range where you entered the formula in step 2.
  9. Click "OK" to close the dialog box.
  10. Excel will now fill in the entire range with the covariance matrix.

Mike Middleton[_2_]

Top half of covariance matrix
 
Aaron -

Select the entire original matrix. Edit Copy.

Select some other cell. Edit Paste Special, Values, Transpose OK.

Select the entire new transposed matrix. Edit Copy.

Select the entire original matrix. Edit Paste Special, Skip blanks OK.

- Mike
http://www.MikeMiddleton.com



"aaronmsl" wrote in message
...
Hi

So I've used data analysis to produce a covariance matrix, however it only
generates the bottom half of the matrix. Since I want to use the matrix
with
an index function, I need both halves of the table. Does anyone know an
automatic way of doing this, or do I need to do each cell manually?

Thanks
Aaron




All times are GMT +1. The time now is 09:59 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com