<< Click to Display Table of Contents >> SUMXMY2 (sum of (x - y)^2) |
Syntax:
SUMXMY2(Range1, Range2)
Description:
This returns the sum of squares of differences of corresponding values in two arrays.
The equation for this function is:
SUMXMY2 = ∑(x - y)^2
Range1 and Range2 are the arrays whose SumXMY2 is to be calculated. As a rule, you must specify the cell ranges which contain the values here.
Both ranges must have the same number of rows and columns, otherwise the function returns a #N/A error value.
Pairs of values where at least one value is an empty cell or a non-numeric value (text string or logical value) are ignored.
Example:
Cells A1 to A3 contain the following values: 9, 4, 7
Cells B1 to B3 contain the following values: 1, 0, 5
If you calculate SUMXMY2(A1:A3, B1:B3) here, this is equivalent to the following calculation:
(9-1)^2 + (4-0)^2 + (7-5)^2
The result is 84.
See also: