Gnumeric · Statistical analysis · Intermediate
Create a Correlation Matrix in Gnumeric
Use the Gnumeric Correlation analysis tool to compare several measurement columns and interpret Pearson correlation.
Official documentation and released 1.12.62 source reviewed; headless formula checks passed; Correlation dialog verification pending · Editorial standards
When you want to compare two or more measurement columns, a correlation matrix gives pairwise Pearson correlation coefficients. A value near +1 shows a strong positive linear association, near −1 a negative linear association, and near zero little linear association.
A small reproducible example
Open paired variables (CSV). The file has X, Y, and Z columns. Y is deliberately calculated as 2 × X + 1.
| X | Y | Z |
|---|---|---|
| 1 | 3 | 5 |
| 2 | 5 | 4 |
| 3 | 7 | 8 |
| 4 | 9 | 7 |
The full dataset contains eight rows. The expected correlation between X and Y is 1.000, because the relationship is exactly linear.
Generate the matrix
- Import the CSV into Gnumeric and confirm all three columns contain numeric cells.
- Open the Correlation analysis dialog within the statistical tools.
- Set the input range to
A1:C9for the full imported dataset and enable Labels, because row 1 contains the headings. - Group the input by columns, choose a new sheet for the result, and confirm the dialog.
- Find the coefficient where the Y row meets the X column in the result. It should be approximately 1.
Why half the matrix is blank: In the released Gnumeric 1.12.62 implementation, the Correlation tool fills the lower triangle and diagonal, not both mirrored halves. Correlation is mathematically symmetric, but the blank upper triangle is expected output, not a calculation error. This layout is verified from the release source, not from a GUI run.
For the full eight-row dataset, the other populated pairwise coefficients, Z–X and Z–Y, should both be approximately 0.939591. The diagonal self-correlations should be approximately 1 for these nonconstant numeric columns. They are calculated correlations, not forced 1s: a constant column has undefined correlation, including with itself.
To check X–Y without relying on a missing mirror cell, return to the imported-data sheet and enter =CORREL(A2:A9,B2:B9) in an unused cell outside A1:C9. Enter =CORREL(B2:B9,A2:A9) in another unused cell if you want to verify the reversed pair; both should be approximately 1. Gnumeric normally uses commas to separate function arguments in English-style locales; locales using a decimal comma may use semicolons instead. For the complete function definition, consult Gnumeric’s official function catalogue. The CORREL guide on this site is still under review.
If a populated result is unexpected, check that the full A1:C9 range is selected, Labels is enabled, and the paired rows still match. If a self-correlation gives an error rather than 1, check for a constant column or too few usable paired numeric values; do not replace the error with a hard-coded 1.
Interpret results responsibly
- Correlation describes a linear association; it does not prove causation.
- Nonlinear relationships can be strong even when a Pearson coefficient is small.
- Missing data can lead to different effective sample sizes for different pairs.
- Before presenting a correlation matrix, examine a scatterplot for outliers.
Verification note: All eight dataset rows and the stated coefficients were independently calculated. The CORREL formula checks, including reversed pairs, self-pairs and a constant-column case, were also run with Gnumeric 1.12.62 headless ssconvert on Debian 13 x86_64, using UTC and the C.UTF-8 locale. The dialog steps and triangular layout remain documentation/source-qualified; the Correlation dialog, generated tool output and other platforms have not been tested.
Official sources: Gnumeric manual: Correlation Tool and the released Gnumeric 1.12.62 source archive. In that release, src/tools/analysis-tools.c selects the half-table CORREL writer; src/tools/dao.c establishes its column/row coordinates; and test/t7204-correlation.pl records a blank upper triangle and calculated diagonal values. These source checks are not native dialog verification.