| 1 | <html><head><meta name="robots" content="index,follow"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| 2 | <title>TableOfReal: To Correlation</title> |
| 3 | <style> |
| 4 | td { padding-left: 5pt; padding-right: 5pt; } |
| 5 | th { padding-left: 5pt; padding-right: 5pt; } |
| 6 | code { white-space: pre-wrap; } |
| 7 | dd { white-space: pre-wrap; } |
| 8 | </style> |
| 9 | </head><body bgcolor="#FFFFFF"> |
| 10 | |
| 11 | <table border=0 cellpadding=0 cellspacing=0><tr><td bgcolor="#CCCC00"><table border=4 cellpadding=9><tr><td align=middle bgcolor="#000000"><font face="Palatino,Times" size=6 color="#999900"><b> |
| 12 | TableOfReal: To Correlation |
| 13 | </b></font></table></table> |
| 14 | <p>A command that creates a (<i>Pearson</i>) <a href="Correlation.html">Correlation</a> object from every selected <a href="TableOfReal.html">TableOfReal</a> object. The correlations are calculated between columns.</p> |
| 15 | <h2>Algorithm</h2> |
| 16 | <p>The linear correlation coefficient <i>r</i><sub><i>ij</i></sub> (also called the <i>product moment correlation coefficient</i> or <i>Pearson's correlation coefficient</i>) between the elements of columns <i>i</i> and <i>j</i> is calculated as:</p> |
| 17 | <table width="100%" style="white-space:pre-wrap"><tr><td align=middle><i>r</i><sub><i>ij</i></sub> = Σ<sub><i>k</i></sub> (<i>x</i><sub><i>ki</i></sub> - <i>x̄</i><sub><i>i</i></sub>)(<i>x</i><sub><i>kj</i></sub> - <i>x̄</i><sub><i>j</i></sub>)/(√ (Σ<sub><i>k</i></sub>(<i>x</i><sub><i>ki</i></sub> - <i>x̄</i><sub><i>i</i></sub>)<sup>2</sup>) √ (Σ<sub><i>k</i></sub>(<i>x</i><sub><i>kj</i></sub> - <i>x̄</i><sub><i>j</i></sub>)<sup>2</sup>)),</table> |
| 18 | <p>where <i>x</i><sub><i>mn</i></sub> is the element <i>m</i> in column <i>n</i>, and <i>x̄</i><sub><i>n</i></sub> is the mean of column <i>n</i>.</p> |
| 19 | <hr> |
| 20 | <address> |
| 21 | <p>© djmw 20151209</p> |
| 22 | </address> |
| 23 | </body> |
| 24 | </html> |