Contact

COVARIANCE.S in Collabora Office: Sample Covariance and Duplication-Sensitive Denominators

Statistical Intermediate Collabora Office Calc

Compute Collabora sample covariance with an exact n-minus-one audit and show how re-pairing or duplicated records changes the result.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Quick answer: COVARIANCE.S calculates covariance when paired observations are treated as a sample of a population. Its independent numeric model divides their centered cross-product total by n minus one.

Availability and version history

  • Introduced: original Collabora release and launch date are not established by the reviewed sources.
  • Availability: currently documented in Collabora Office 26.04 desktop help.
  • Platform scope: online and mobile deployments are not inferred from this desktop-help release.
  • Checked: October 14, 2026. Function-specific documentation and independent calculations; no native Collabora execution.

Syntax and complete pairs

=COVARIANCE.S(data1;data2)

Both datasets are required. The Collabora reference explicitly identifies the sample interpretation. These examples use equal-length, fully numeric columns whose matching rows belong to the same observation.

The compact help does not give a full missing-data, coercion or error-code table. Do not independently remove labels from each column and assume the resulting rows still form valid pairs.

Example 1: reconstruct the sample denominator

Enter A1:B5:

X Y
2 3
4 5
6 4
8 8
=COVARIANCE.S(A2:A5;B2:B5)

Expected result: 14/3, approximately 4.666667. Both means are 5. X deviations are -3,-1,1,3; Y deviations are -2,0,-1,3. Their paired products are 6,0,-1,9, totaling 14.

The denominator is four minus one, or three. The population model instead gives 3.5, from 14/4. COVARIANCE.P covers that alternative question.

Example 2: a negative row contribution can coexist with positive covariance

The third record has X=6, above the X mean, and Y=4, below the Y mean. Its product is -1. The other contributions still give a positive total of 14.

Covariance describes the aggregate centered pattern. It is not a test that every individual pair must be above both means or below both means.

For a helper audit, calculate the two means separately, multiply each row’s centered X and Y differences, and total those four products. Divide by three only for this exact complete four-pair fixture.

Advanced example: duplicated sample records alter the result

Repeat all four original pairs below themselves, producing eight observations. The means remain 5, and the centered-product total becomes 28.

=COVARIANCE.S(A2:A9;B2:B9)

Expected result: 4, because the sample denominator is seven. The original value was 14/3. Doubling the records did not double the sample denominator from three to six.

This provides a useful arithmetic check after joins or copied imports. More rows do not necessarily represent more independent measurements, and an unchanged mean does not prove that duplication is harmless.

Advanced example: sorting one variable changes the data

Reverse both original columns together. The same pairs occur in a different row order, so expected covariance remains 14/3.

Sort Y alone into 3,4,5,8, while X stays 2,4,6,8. The new centered products are 6,1,0,9, totaling 16. Expected sample covariance becomes 16/3, approximately 5.333333.

This changed answer describes new pairings, not a faster way to compute the old statistic. Sort complete records and retain a shared identifier.

Advanced checks: scale and origin

Adding 20 to every original Y leaves covariance at 14/3, because centering removes the shared offset. Multiplying Y by three changes the expected covariance to 14. Negating Y gives -14/3.

If every X is replaced with 5, the independent centered-product model gives covariance 0. That numeric case is distinct from having too few sample observations for a positive n-minus-one denominator.

The result has the product of the two input units and is not confined to -1 through 1. CORREL and PEARSON address normalized linear association instead.

Error boundaries and format notes

With fewer than two complete numeric observations, the sample model has no positive denominator. The exact Collabora error display is not given in the dedicated section and remains unverified. So do mixed errors, unequal shapes, Boolean/text conversion and extreme-value precision.

The source names COM.MICROSOFT.COVARIANCE.S outside the cited OpenFormula 1.3 standard. That establishes neither first introduction nor universal workbook interoperability. A successful result also does not establish a causal relationship between the paired variables.

References and verification

Complete function-specific documentation reviewed. Worked outputs are independent statistical models or explicitly documented rules, not application screenshots or native test results. Unverified type, error and numerical boundaries retain their stated scope.