10.3. Correlation Tool

Figure 10-4. The Correlation Tool Dialog.

The correlation tool calculates the pairwise correlation coefficients of the given variables. Use this tool to calculate any number of correlation coefficients at the same time. The variables for which the correlations are calulated are specified by the ``Input Range:'' entry. The given range can be grouped either by columns or by rows.

If you have labels, for example the names of the variables, in the first row of the given range, you should check the ``Labels'' checkbox. This leaves the first row (or the first column if the data is grouped by rows) of the input range out of the analysis. In addition, the names of the variables are printed in the output table.

Figure 10-5. The Data

Example 10-1. Using The Correlation Tool

For example, you want to calculate the correlation between three variables, one each in columns A, B, and C. Both variables have 10 values in rows 2 to 11 with labels in row 1 (see Figure 10-5).

First you should enter A1:B11 in the ``Input Range:'' entry by typing this directly into the entry or clicking in the entry field and then selecting that range on the sheet. Select the ``Columns'' radio button next to the ``Grouped By:'' label, since each variable is in its own column. Check the ``Labels'' checkbox since the first row contains labels. Specify the output options described above and press the OK button. (see Figure 10-6).

The results are printed into a table where each column and row is labeled according to the names of the variables. If the names are not given in the input range, Gnumeric generates them. The calculated correlations are given in the table. For example, the correlation of the previous example, i.e, correlation between a variable in a column A and B, can be read in the second column and third row of the results table (see Figure 10-7).

Figure 10-6. The Completed Dialog

Figure 10-7. The Result