Contact

SUMXMY2 Function (OpenOffice Calc)

Math Intermediate OpenOffice Calc

Sum squared pairwise differences with SUMXMY2 in Apache OpenOffice Calc. Use aligned numeric ranges, exact examples and interpretable error measures.

Verification status: Eight ordinary reference formulas were recalculated in Apache OpenOffice 4.1.16 on Linux x86-64, Build 9816, through generated native ODF and GUI hard recalculation. Saved identities, inputs and results were checked. How formula examples are checked

Quick answer: =SUMXMY2(F2:F4;G2:G4) returned 14 in the tested Apache OpenOffice 4.1.16 build. Use the numeric worksheet setup below for these range addresses.

Availability and version history

  • Introduced: First release not established; documented by OpenOffice.org 3.3.
  • Supported in: Apache OpenOffice 4.1.16; this is a verified release, not a final supported version.
  • Scope: Desktop Calc, English function names and semicolon-separated formulas.
  • Checked: October 14, 2026. Eight ordinary reference formulas were recalculated from generated ODF in 4.1.16 on Linux x86-64, Build 9816. Source and independent arithmetic were checked.

What SUMXMY2 returns

SUMXMY2 returns Σ(x−y)² for corresponding positions in two equally shaped arrays. It is a total squared discrepancy. It does not compute Σx²−Σy², and it does not automatically divide by a sample size or degrees of freedom. Release implementation.

Syntax and arguments

SUMXMY2(ArrayX;ArrayY)
  • ArrayX, ArrayY: exactly two aligned arrays or ranges with identical row and column dimensions.
  • Each x is compared with the y at the same position.
  • These native examples use typed numeric ranges; they are not a broad test of mixed-type or missing-pair handling.

Numeric worksheet setup

Enter the following values at the stated addresses. Column I is unused; keep each range’s starting row intact.

Row F G H J K
2 1 2 3 -1 1
3 2 4 2 0 0
4 3 6 1 1 -1

For the two-by-two examples, enter L2=1, M2=2, L3=3, M3=4 and O2=2, P2=4, O3=6, P3=8. These are numeric cells, not text representations of arrays.

Eight reproducible examples

The native column contains saved 4.1.16 results; independent references use high-precision arithmetic and the stated source rules. Values are shown to twelve decimal places where needed. The range examples use the numeric setup above.

Formula Native 4.1.16 result Independent reference
=SUMXMY2(F2:F4;G2:G4) 14 14
=SUMXMY2(F2:F4;F2:F4) 0 0
=SUMXMY2(F2:F4;H2:H4) 8 8
=SUMXMY2(J2:J4;K2:K4) 8 8
=SUMXMY2(L2:M3;O2:P3) 30 30
=SUMXMY2(G2:G4;F2:F4) 14 14
=SUMXMY2(F2:F3;G2:G3) 5 5
=SUMXMY2(J2:J4;J2:J4) 0 0

Practical worksheet

With F2:F4 = 1,2,3 and G2:G4 = 2,4,6, the pairwise differences are −1,−2,−3 and their squared sum is 14. Identical ranges return zero, while reversing the two ranges preserves 14.

If the stated metric is the mean squared difference over these three pairs, divide by 3 to get 14/3≈4.666666666667. Its square root is approximately 2.160246899469 in the original input units. These are chosen descriptive metrics, not an automatically fitted regression standard error.

Advanced interpretation and checks

Expanding the square gives Σ(x−y)²=Σx²+Σy²−2Σxy. For the example, that is 14+56−2*28=14. The calculation is nonnegative for finite real inputs, and zero means every included numeric pair is equal.

For the reflected lists −1,0,1 and 1,0,−1, the squared differences sum to 8. SUMX2MY2 gives zero for those same lists because their squared magnitudes match; this is a useful check against choosing the wrong similar-looking function. The two-by-two native example gives 30.

Boundaries and troubleshooting

The source checks both array dimensions, then forms an elementwise difference matrix and accumulates its squared numeric results. This path differs from the shared string-skipping loop used by SUMX2MY2 and SUMX2PY2. Do not assume identical mixed-type semantics; the present fixture is numeric-only.

Keep pairs aligned when filtering data. Missing values, text, Boolean inputs, shape errors and extreme magnitudes were not executed. If a model requires dropping incomplete pairs, define and apply that rule before calculating rather than treating an apparently plausible total as proof of clean data.

Official evidence and checking scope

The generated ODF produced the informational load warning “Not all attributes could be read.” The sheet was hard-recalculated and saved separately. All eight ordinary function identities, inputs and results were reconciled; a stale SUM cache changed from 999999 to 3 and an uncached SUM returned 7. This establishes the stated examples, not every workbook style or invalid input. Other explanatory identities are independent calculations. The authoring-tool XLSX was not executed in OpenOffice, and its preview values are not the native results reported here.