Returns the sum of the squares of the differences of corresponding values in two arrays.
構文
SUMXMY2(array_x, array_y)引数
array_x必須
The first array or range of values.
array_y必須
The second array or range of values.
This function calculates the difference between each pair of elements in two arrays, squares those differences, and then returns the sum of those squares. It is commonly used in statistical analysis to measure the variance between two sets of data.
=SUMXMY2({1,2,3}, {4,5,6})→27Calculates (1-4)^2 + (2-5)^2 + (3-6)^2 = (-3)^2 + (-3)^2 + (-3)^2 = 9 + 9 + 9 = 27.
Prepare your data
Ensure both arrays have the same number of elements to avoid a #N/A error.
Enter the formula
Type =SUMXMY2(array1, array2) into a cell, selecting your data ranges as the arguments.
The function will return a #N/A error if the arrays do not contain the same number of elements.