Thread: Standard deviation of correlation matrix Thanks: 0 Likes: 0

1. Standard deviation of correlation matrix

I am looking to get the standard deviation of each correlation coefficient in a matrix.

The matrix is complete (as in each pairwise correlation in included twice) but i want the standard deviation including only each coefficient once.

The matrix will vary in size and can be quite large so i dont want to have to select the cells i need manually. Is there a way to do this?

As an example with the below matrix i would want the std dev of only the underlined values:

 1 0.27 0.46 0.51 0.56 0.27 1 0.47 0.42 0.33 0.46 0.47 1 0.56 0.53 0.51 0.42 0.56 1 0.56 0.56 0.33 0.53 0.56 1  Reply With Quote

2. Re: Standard deviation of correlation matrix

Hi,
How to finger out which values take to std dev. calculation? You remove duplicates from the matrix and what is left you want to calculate std dev for them? Why you did not underline value 1.00?  Reply With Quote

3. Re: Standard deviation of correlation matrix

Change the formula in those cells so they return blanks on and above the main diagonal. Blanks are ignored by STDEV.  Reply With Quote

4. Re: Standard deviation of correlation matrix

Or, array formula**:

=STDEV(IF(COLUMN(A1:E5)>ROW(A1:E5),A1:E5))

**Array formulas are not entered in the same way as 'standard' formulas. Instead of pressing just ENTER, you first hold down CTRL and SHIFT, and only then press ENTER. If you've done it correctly, you'll notice Excel puts curly brackets {} around the formula (though do not attempt to manually insert these yourself).  Reply With Quote

5. Re: Standard deviation of correlation matrix

Try:

ABCDEFGHIJ
110.270.460.510.560.10089
20.2710.470.420.33
30.460.4710.560.53
40.510.420.5610.56
50.560.330.530.561
6
7
8
9
10
1110.270.460.510.560.10089
120.2710.470.420.33
130.460.4710.560.53
140.510.420.5610.56
150.560.330.530.561

Sheet18

Array Formulas
CellFormula
G1{=STDEV(IF(ROW(A1:E5)>COLUMN(A1:E5),A1:E5))}
J11{=STDEV(IF(ROW(D11:H15)-ROW(D11)>COLUMN(D11:H15)-COLUMN(D11),D11:H15))}
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

If your array starts in A1 (or B2, C3, D4, etc.) you can use the array formula in G1. If the array starts somewhere else, you need to adjust the formula as shown in J11.  Reply With Quote

6. Re: Standard deviation of correlation matrix

Thanks Eric, your solution works great.

And just as a response to other suggestions that could have worked: For other calculation i do use the entire matrix so couldn't remove or blank those values out, and i didn't want to have 2 separate matrices if i could avoid it.  Reply With Quote

7. Re: Standard deviation of correlation matrix

Glad we could help.   Reply With Quote

User Tag List

Tags for this Thread

coefficient, correlation, deviation, matrix, standard  Posting Permissions

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