SUMXMY2 in Collabora Office: Measure Squared Differences Between Paired Values
Calculate Collabora SUMXMY2 with aligned observations, visible residuals, a reproducible error metric and safeguards against row misalignment.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: SUMXMY2 totals the squared differences (x−y)² between corresponding numeric array entries. With X=(3,4) and Y=(1,2), the expected result is 8, from 2²+2².
Availability and version history
- Introduced: original Collabora release and launch date are not established by the sources reviewed.
- Availability: documented in Collabora Office 26.04 help, scoped to the desktop-help release.
- Platform scope: support in every online or mobile deployment is not inferred from desktop documentation.
- Checked: October 14, 2026. Function-specific documentation and independently derived controls; no native Collabora test was performed.
Syntax and the operation order
=SUMXMY2(arrayX;arrayY)
Subtract corresponding values first, square each difference, then add the squares. This differs from squaring X and Y separately before subtracting them. The direct Collabora section describes subtraction followed by squaring.
The product’s array-function page lists SUMXMY2 among functions with forced array handling for area references. The examples use matching numeric ranges directly and produce one aggregate result. English names and semicolon separators are used.
Example 1: show the differences and their squares
Enter X and Y in A2:B5:
| Row | A · X | B · Y | Difference X−Y | Squared difference |
|---|---|---|---|---|
| 2 | 3 | 1 | 2 | 4 |
| 3 | 4 | 2 | 2 | 4 |
| 4 | −2 | −1 | −1 | 1 |
| 5 | 0 | 3 | −3 | 9 |
Use =A2-B2 in C2 and =C2^2 in D2, then fill both down. Elsewhere enter:
=SUMXMY2(A2:A5;B2:B5)
Expected result: 18, from 4+4+1+9. Negative differences contribute positive squares. A sum of the raw differences would instead be 0, hiding the departures through cancellation.
Example 2: swap the arrays
=SUMXMY2(B2:B5;A2:A5)
Expected result: 18 again. Swapping the arrays reverses the sign of each difference, and squaring removes that sign.
Comparing the original X range with itself gives 0. For finite real numeric controls, a zero sum of squared differences means every included pair is equal in the mathematical model. It does not prove that excluded rows, missing observations or untested coercion cases were valid.
Advanced example: audit a small prediction comparison
Use a separate four-row dataset in H2:I5:
| Row | H · Actual | I · Predicted |
|---|---|---|
| 2 | 10 | 9 |
| 3 | 12 | 13 |
| 4 | 8 | 8 |
| 5 | 15 | 12 |
=SUMXMY2(H2:H5;I2:I5)
Expected squared-error total: 11. The residuals are 1, −1, 0 and 3; their squares are 1, 1, 0 and 9. The function computes this total, not an average or a fitted model.
For these four complete numeric pairs, divide by four to obtain mean squared error 2.75. Taking its square root gives approximately 1.658312395:
=SQRT(SUMXMY2(H2:H5;I2:I5)/4)
This root-mean-square difference returns to the source unit. The denominator four is correct because this controlled table has four included observations. Do not keep a hard-coded denominator when the selected dataset changes or includes unresolved missing values.
Advanced check: expand the algebra independently
For the original four-row control, the sums of X² and Y² are 29 and 15, while the sum of paired products X×Y is 13. The identity gives:
29+15-2*13
Expected result: 18. SUMPRODUCT can compute the paired-product term. This identity is a small explanatory check, not a promise of identical numerical stability for every algebraic form at large magnitudes.
SUMX2MY2 would instead give 14 on the same arrays because it totals x²−y². SUMX2PY2 would give 44. The names differ by only a few characters but represent different operations.
Pair alignment and interpretation
Keep a record identifier beside each observation and prediction. Sorting only one source column destroys the intended pairing while leaving both ranges the same size. A small output is meaningful only when the matched rows describe the intended same cases.
Squaring makes larger departures contribute disproportionately and removes the direction of each error. Retain the signed residual column if systematic overprediction or underprediction matters. A low total alone does not establish that a model is appropriate for future data.
The direct help does not supply a complete mismatch, text, blank, error or precision matrix. These controls deliberately use aligned numeric ranges with no missing positions. Their independently calculated results do not certify arbitrary imported or extreme-value cases in native Collabora.
References and verification
The direct function section and array-handling introduction were reviewed. Worked numeric controls were independently calculated, without native application execution or broader client certification.