Contact

PEARSON Function (OpenOffice Calc)

Statistical Intermediate OpenOffice Calc

Apache OpenOffice PEARSON returns Pearson’s correlation coefficient. Check signed association, paired samples, covariance identities and nonlinear counterexamples.

Verification status: Eight reference formulas and 1 listed boundary case were recalculated in Apache OpenOffice 4.1.16 on Linux x86-64, Build 9816, after XLSX import, with retained ODS results. Other explanatory calculations are independent references. How formula examples are checked

Quick answer: =PEARSON(B4:B8;A4:A8) returns approximately 0.774596669241 for the worksheet below.

Availability and version history

  • Introduced: First release not established. The OpenOffice.org 3.3 appendix documents PEARSON; that is historical presence evidence.
  • Supported in: Apache OpenOffice 4.1.16; no final supported release established.
  • Scope: Desktop Calc. Formulas below use English names and semicolon argument separators, with complete numeric example ranges.
  • Checked: October 14, 2026. The eight reference formulas were recalculated in Apache OpenOffice 4.1.16 on Linux x86-64, Build 9816, using XLSX import and hard recalculation. Source and independent arithmetic were also checked.

Meaning and units

PEARSON calculates the centered cross-product of two paired samples divided by the square root of their two centered sums of squares. It is Pearson’s signed product-moment correlation, a dimensionless descriptive coefficient between −1 and 1 for nonconstant numeric inputs. Function entry.

Syntax and data requirements

=PEARSON(Data1; Data2)

Exactly two arrays are required, with identical row and column dimensions. A row vector and a column vector of the same length are still different shapes. Keep paired observations aligned; dropping a value from only one side changes the relationship being analyzed. The release calculation logic is the authority for these contracts.

Reproducible worksheet

Enter this compact set of numeric observations starting in row 4. Column D is Y shifted by 10; C and E are exact straight-line transformations of X. Keep these labels outside the formula ranges.

Row A: X B: Y C: negative line D: shifted Y E: positive line F: constant
4 1 2 10 12 3 7
5 2 4 8 14 5 7
6 3 5 6 15 7 7
7 4 4 4 14 9 7
8 5 5 2 15 11 7

These eight formulas were recalculated in Apache OpenOffice 4.1.16 on Linux x86-64, Build 9816, after XLSX import. Saved ODS values match independent arithmetic; results below are rounded to twelve decimal places.

Formula Expected result, approximately
=PEARSON(B4:B8;A4:A8) 0.774596669241
=PEARSON(A4:A8;B4:B8) 0.774596669241
=PEARSON(C4:C8;A4:A8) -1
=PEARSON(D4:D8;A4:A8) 0.774596669241
=PEARSON(E4:E8;A4:A8) 1
=PEARSON(B4:B7;A4:A7) 0.71818484646
=PEARSON(B5:B8;A5:A8) 0.4472135955
=PEARSON(A4:A8;A4:A8) 1

Practical calculation

For the displayed X/Y data, =PEARSON(A4:A8;B4:B8) returns approximately 0.774596669241. The numerator is Σ(x−3)(y−4)=6. The denominator is SQRT(10×6).

The separate CORREL entry delegates to the same Pearson evaluator in this release. Comparing =PEARSON(A4:A8;B4:B8) and =CORREL(A4:A8;B4:B8) is therefore a useful spelling/compatibility check, not two independent statistical methods.

Advanced checks and interpretation

For the displayed data, population-form COVAR is 1.2; the population variances are 2 and 1.2. The identity =COVAR(A4:A8;B4:B8)/SQRT(VARP(A4:A8)*VARP(B4:B8)) reproduces 0.774596669241. All terms must use the same complete pair set and compatible population/sample denominators.

Reversing the two samples leaves Pearson correlation unchanged. That symmetry does not hold for SLOPE or INTERCEPT, where predictor and response have different roles. Squaring PEARSON gives RSQ but removes the sign, so retain r when direction is part of the question.

Boundaries and troubleshooting

The source rejects a zero centered sum of squares in either variable with a division-by-zero error. One usable pair is therefore insufficient, and an all-constant variable has no defined Pearson coefficient. Shape mismatch is a separate invalid-argument condition. A numerical zero coefficient is not the same as an error.

The shared implementation calculates means first and then centered cross-products, avoiding the simplest raw-sum cancellation formula. That does not eliminate all floating-point limits for very large offsets or nearly constant data.

Selected boundary cases were checked in that same native session. Error displays are retained as errors, not interpreted as numeric zero.

Formula Native result or display
=PEARSON(A4:A8;F4:F8) #DIV/0!

Official evidence and checking scope

The saved ODS retained the tested formulas and numeric inputs. A deliberately stale SUM result and an uncached SUM formula confirmed recalculation. Native evidence covers the eight reference formulas and listed boundary cases in the stated 4.1.16 build; other explanatory calculations are independent references. Other releases, locales and import formats were not tested.